Skip to content

Commit

Permalink
replacing stringy eval with load should keep load in eval
Browse files Browse the repository at this point in the history
  • Loading branch information
stdweird committed Jan 12, 2017
1 parent 0519729 commit a63c624
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/main/perl/CacheManager/DB.pm
Expand Up @@ -54,8 +54,10 @@ BEGIN {
my @to_try = sort keys %FORMAT_DISPATCH;
foreach my $db (@to_try) {
local $@;
load $db;
$db->import;
eval {
load $db;
$db->import;
};
push(@db_backends, $db) unless $@;
}
if (!scalar @db_backends) {
Expand Down
4 changes: 3 additions & 1 deletion src/main/perl/Fetch/ProfileCache.pm
Expand Up @@ -329,7 +329,9 @@ sub process_profile

my ($class, $t) = $self->choose_interpreter($profile);
local $@;
load $class;
eval {
load $class;
};
die "Couldn't load interpreter $class: $@" if $@;

$t = $class->interpret_node(@$t);
Expand Down

0 comments on commit a63c624

Please sign in to comment.