Permalink
Browse files

Localize $@ when evaling

  • Loading branch information...
symkat committed Nov 18, 2015
1 parent e558bc9 commit 23d01ebb7dcdd7d81284ed175a52e461853bef54
Showing with 2 additions and 0 deletions.
  1. +1 −0 lib/URI.pm
  2. +1 −0 lib/URI/urn.pm
View
@@ -129,6 +129,7 @@ sub implementor
# check we actually have one for the scheme:
unless (@{"${ic}::ISA"}) {
# Try to load it
local $@;
eval "require $ic";
die $@ if $@ && $@ !~ /Can\'t locate.*in \@INC/;
return undef unless @{"${ic}::ISA"};
View
@@ -30,6 +30,7 @@ sub _init {
no strict 'refs';
unless (@{"${impclass}::ISA"}) {
# Try to load it
local $@;
eval "require $impclass";
die $@ if $@ && $@ !~ /Can\'t locate.*in \@INC/;
$impclass = "URI::urn" unless @{"${impclass}::ISA"};

0 comments on commit 23d01eb

Please sign in to comment.