testcases: correctly enable lexical pragmata

eval 'package foo; use strict;' enables strict within eval, it does
not leak into the surrounding scope.
Also fix various warnings/compile errors found due to now enabled
strict and warnings.
This commit is contained in:
Maik Fischer
2011-11-21 21:04:00 +01:00
committed by Michael Stapelberg
parent 0a65b770e8
commit 1b1d7941ec
19 changed files with 42 additions and 41 deletions

View File

@ -66,11 +66,11 @@ use Data::Dumper;
use AnyEvent::I3;
use Time::HiRes qw(sleep);
use Test::Deep qw(eq_deeply cmp_deeply cmp_set cmp_bag cmp_methods useclass noclass set bag subbagof superbagof subsetof supersetof superhashof subhashof bool str arraylength Isa ignore methods regexprefonly regexpmatches num regexponly scalref reftype hashkeysonly blessed array re hash regexpref hash_each shallow array_each code arrayelementsonly arraylengthonly scalarrefonly listmethods any hashkeys isa);
use v5.10;
use strict;
use warnings;
__
$tester->bail_out("$@") if $@;
feature->import(":5.10");
strict->import;
warnings->import;
@_ = ($class);
goto \&Exporter::import;