auto/share/dist/Nes/cgi-bin/plugin/captcha.pl untested

filter: Statementstmt 0.0% 0 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod n/a totaltotal 0.0% 0 / 22 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/bin/perl
2  
3 # ------------------------------------------------------------------------------
4 #
5 # NES by - Skriptke
6 # Copyright 2009 - 2010 Enrique F. Castañón
7 # Licensed under the GNU GPL.
8 # http://nes.sourceforge.net/
9 #
10 # Version 0.9 pre
11 #
12 # captcha.pl
13 #
14 # ------------------------------------------------------------------------------
15  
16 use strict;
17 use Nes;
18 use captcha_plugin;
19  
20 my $nes = Nes::Singleton->new();
21  
22 my $out = $nes->{'container'}->get_out_content();
23 my $captcha = nes_captcha_plugin->new($out);
24  
25 $nes->{'container'}->set_out_content( $captcha->go() );
26  
27 my $nes_tags = {};
28 $nes_tags->{'this_plugin'} = 'captcha_plugin';
29  
30 foreach my $name ( keys %{$captcha->{'captcha'}} ) {
31 $captcha->{'captcha'}{$name}->verify();
32 }
33
34 $nes->{'container'}->add_tags(%$nes_tags);
35  
36 # don't forget to return a true value from the file
37 1;
38