Skip to content

Commit

Permalink
Do not re-load Plugins if they're already present.
Browse files Browse the repository at this point in the history
Resolves GH #112
  • Loading branch information
toddr committed Oct 8, 2018
1 parent 6dec4b8 commit 081f2fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Template/Plugins.pm
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ sub _load {
$file =~ s|::|/|g;
$self->debug("loading $module.pm (PLUGIN_NAME)")
if $self->{ DEBUG };
$ok = eval { require "$file.pm" };
$ok = eval { $module->isa("Template::Plugin") or require "$file.pm" };
$error = $@;
}
else {
Expand All @@ -203,7 +203,7 @@ sub _load {
$self->debug("loading $file.pm (PLUGIN_BASE)")
if $self->{ DEBUG };

$ok = eval { require "$file.pm" };
$ok = eval { $pkg->isa("Template::Plugin") or require "$file.pm" };
last unless $@;

$error .= "$@\n"
Expand Down

0 comments on commit 081f2fb

Please sign in to comment.