the 'eval' in run() needed to die on error
This commit is contained in:
parent
dfb9844dfb
commit
c2991d974d
|
@ -22,6 +22,7 @@ sub run {
|
||||||
$module = "Gitolite::Triggers::$module" if $module !~ /^Gitolite::/;
|
$module = "Gitolite::Triggers::$module" if $module !~ /^Gitolite::/;
|
||||||
|
|
||||||
eval "require $module";
|
eval "require $module";
|
||||||
|
_die "$@" if $@;
|
||||||
my $subref;
|
my $subref;
|
||||||
eval "\$subref = \\\&$module" . "::" . "$sub";
|
eval "\$subref = \\\&$module" . "::" . "$sub";
|
||||||
_die "module '$module' does not exist or does not have sub '$sub'" unless ref($subref) eq 'CODE';
|
_die "module '$module' does not exist or does not have sub '$sub'" unless ref($subref) eq 'CODE';
|
||||||
|
|
Loading…
Reference in a new issue