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 authored and atoomic committed Apr 28, 2024
1 parent bff44ff commit 819f986
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 @@ -186,7 +186,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 @@ -200,7 +200,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 819f986

Please sign in to comment.