« auto/share/dist/Nes/cgi-bin/plugin/unregister_captcha.pl
↑ Summary
auto/share/dist/Nes/examples/tutorial/lucky.pl »
| 1 | #!/bin/perl | ||
| 2 | |||
| 3 | # ----------------------------------------------------------------------------- | ||
| 4 | # | ||
| 5 | # Nes by Skriptke | ||
| 6 | # Copyright 2009 - 2010 Enrique F. Castañón Barbero | ||
| 7 | # Licensed under the GNU GPL. | ||
| 8 | # | ||
| 9 | # CPAN: | ||
| 10 | # http://search.cpan.org/dist/Nes/ | ||
| 11 | # | ||
| 12 | # Sample: | ||
| 13 | # http://nes.sourceforge.net/ | ||
| 14 | # | ||
| 15 | # Repository: | ||
| 16 | # http://github.com/Skriptke/nes | ||
| 17 | # | ||
| 18 | # Version 1.03 | ||
| 19 | # | ||
| 20 | # source.pl | ||
| 21 | # | ||
| 22 | # ----------------------------------------------------------------------------- | ||
| 23 | |||
| 24 | |||
| 25 | use strict; | ||
| 26 | use Nes; | ||
| 27 | |||
| 28 | my $nes = Nes::Singleton->new(); | ||
| 29 | my $cfg = $nes->{'CFG'}; | ||
| 30 | my $q = $nes->{'query'}->{'q'}; | ||
| 31 | my $config = $nes->{'CFG'}; | ||
| 32 | my $action = $q->{'action'}; | ||
| 33 | my $item = $q->{'item'}; | ||
| 34 | my $source = $q->{'source'}; | ||
| 35 | |||
| 36 | if ( $source ) { | ||
| 37 | |||
| 38 | my $dir_plugin = $cfg->{'plugin_top_dir'}; | ||
| 39 | |||
| 40 | # Insecure dependency in require while running with -T switch at | ||
| 41 | if ($dir_plugin =~ /^([-\@\w.\\\/]+)$/) { | ||
| 42 | $dir_plugin = $1; | ||
| 43 | } | ||
| 44 | |||
| 45 | push( @INC, $dir_plugin ); | ||
| 46 | do "$dir_plugin/debug_info.pl"; | ||
| 47 | |||
| 48 | } | ||
| 49 | |||
| 50 | 1; |