{
local $ENV{PERL_STRICTURES_EXTRA} = 1;
- local $strictures::extra_load_states = undef;
+ local %strictures::extra_load_states = ();
local @INC = (sub {
die "Can't locate $_[1] in \@INC (...).\n"
if $extras{$_[1]};
{
open my $fh, '>', \(my $str = '');
+ my $e;
{
local *STDERR = $fh;
eval qq{
#line 1 "t/load_fail.t"
use strictures;
1;
- } or die "$@";
+ } or $e = "$@";
}
+ die $e if defined $e;
- strictures->import;
like(
$str,
qr/Missing were:\n\n indirect multidimensional bareword::filehandles/,
{
open my $fh, '>', \(my $str = '');
+ my $e;
{
local *STDERR = $fh;
eval qq{
#line 1 "t/load_fail.t"
use strictures;
1;
- } or die "$@";
+ } or $e = "$@";
}
+ die $e if defined $e;
is $str, '', "extra dep load failure is not reported a second time";
}