X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fextras.t;h=474ad3845a7d907623a115aac56ac7c9ce2c9d28;hb=4981fd9f6100db8709dbad55b043d342a83a4424;hp=cef6a6c31aecdb645cf1ea4d627296f42247a2c9;hpb=8f0df510535f01d82740865bf25e3fc29631c772;p=p5sagit%2Fstrictures.git diff --git a/t/extras.t b/t/extras.t index cef6a6c..474ad38 100644 --- a/t/extras.t +++ b/t/extras.t @@ -90,16 +90,17 @@ use strictures; { 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/, @@ -109,14 +110,16 @@ use strictures; { 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"; }