Permalink
Browse files

Item14308: Don't die if RELEASE or VERSION don't eval

Some old plugins set $RELEASE = $VERSION,  this crashes the dependency
comparison.
  • Loading branch information...
gac410 committed Jan 25, 2017
1 parent bb6bfeb commit 913c0b3250d0fa4ffbea1feea3207d1512fb7275
Showing with 4 additions and 2 deletions.
  1. +4 −2 core/lib/Foswiki/Configure/Dependency.pm
@@ -784,7 +784,8 @@ sub extractModuleVersion {
my $exp = $1;
$exp =~ s/\$RELEASE/\$mod_release/g;
eval("\$mod_version =~ $exp;");
- die "1-Failed to eval $1 from $_ in $file at line $.: $@\n"
+ print STDERR
+"Dependency.pm 1-Failed to eval $1 from $_ in $file at line $.: $@\n"
if ($@);
last;
}
@@ -800,7 +801,8 @@ sub extractModuleVersion {
)
{
eval( "\$mod_" . lc($1) . " = $2;" );
- die "2-Failed to eval $2 from $_ in $file at line $.: $@\n"
+ print STDERR
+"Dependency.pm 2-Failed to eval $2 from $_ in $file at line $.: $@\n"
if ($@);
next;
}

0 comments on commit 913c0b3

Please sign in to comment.