auto/share/dist/Nes/examples/nesblog/scripts/source.pl untested

filter: Statementstmt 0.0% 0 / 19 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 25 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
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;