{
my $safe = new Safe;
# because of opcodes used in "use strict":
- $safe->permit(qw(:default require caller));
+ $safe->permit(qw(:default require));
local $Storable::Eval = sub { $safe->reval(shift) };
$freezed = freeze $obj[0]->[1];
$bits |= $bitmask{$s} || 0;
}
if (@wrong) {
- my $useno = {
- __PACKAGE__.'::import' => 'use',
- __PACKAGE__.'::unimport' => 'no'
- }->{ (caller(1))[3] };
require Carp;
- Carp::croak("Don't know how to '$useno ".__PACKAGE__." qw(@wrong)'");
+ Carp::croak("Unknown 'strict' tag(s) '@wrong'");
}
$bits;
}
}
eval qq(use strict 'garbage');
-print +($@ =~ /^Don't know how to 'use strict qw\(garbage\)/)
+print +($@ =~ /^Unknown 'strict' tag\(s\) 'garbage'/)
? "ok ".++$i."\n" : "not ok ".++$i."\t# $@";
eval qq(no strict 'garbage');
-print +($@ =~ /^Don't know how to 'no strict qw\(garbage\)/)
+print +($@ =~ /^Unknown 'strict' tag\(s\) 'garbage'/)
? "ok ".++$i."\n" : "not ok ".++$i."\t# $@";
eval qq(use strict qw(foo bar));
-print +($@ =~ /^Don't know how to 'use strict qw\(foo bar\)/)
+print +($@ =~ /^Unknown 'strict' tag\(s\) 'foo bar'/)
? "ok ".++$i."\n" : "not ok ".++$i."\t# $@";
eval qq(no strict qw(foo bar));
-print +($@ =~ /^Don't know how to 'no strict qw\(foo bar\)/)
+print +($@ =~ /^Unknown 'strict' tag\(s\) 'foo bar'/)
? "ok ".++$i."\n" : "not ok ".++$i."\t# $@";