Skip to content

Commit

Permalink
Move die handler localization out of eval block
Browse files Browse the repository at this point in the history
  • Loading branch information
xdg committed Jul 24, 2018
1 parent 2c05f52 commit 881d3e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Path/Tiny.pm
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ sub THAW { return path( $_[2] ) }
my $HAS_UU; # has Unicode::UTF8; lazily populated

sub _check_UU {
local $SIG{__DIE__}; # prevent outer handler from being called
!!eval {
local $SIG{__DIE__}; # prevent outer handler from being called
require Unicode::UTF8;
Unicode::UTF8->VERSION(0.58);
1;
};
}

my $HAS_PU; # has PerlIO::utf8_strict; lazily populated
my $HAS_PU; # has PerlIO::utf8_strict; lazily populated

sub _check_PU {
local $SIG{__DIE__}; # prevent outer handler from being called
!!eval {
local $SIG{__DIE__}; # prevent outer handler from being called
require PerlIO::utf8_strict;
PerlIO::utf8_strict->VERSION(0.003);
1;
Expand Down

0 comments on commit 881d3e5

Please sign in to comment.