print "1..0 # Skip -- Perl configured without B module\n";
exit 0;
}
- if ($Config::Config{'extensions'} !~ /\bData\/Dumper\b/) {
- print
- "1..0 # Skip: Data::Dumper was not built, needed by OptreeCheck\n";
- exit 0;
- }
- require 'test.pl';
+ # require 'test.pl'; # now done by OptreeCheck
}
use OptreeCheck;
use Config;
checkOptree ( name => 'local $a',
prog => 'local $a',
+ errs => ['Name "main::a" used only once: possible typo at -e line 1.'],
bcopts => '-basic',
expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
4 <@> leave[1 ref] vKP/REFC ->(end)
checkOptree ( name => 'local $a=undef',
prog => 'local $a=undef',
+ errs => ['Name "main::a" used only once: possible typo at -e line 1.'],
note => 'locals are rare, probly not worth doing',
bcopts => '-basic',
expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
checkOptree ( name => 'local $a=()',
prog => 'local $a=()',
+ errs => ['Name "main::a" used only once: possible typo at -e line 1.'],
#todo => 'probly not worth doing',
bcopts => '-exec',
expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');