From 8da3fb7b396075fb54cade8c29ba0be045b9e627 Mon Sep 17 00:00:00 2001 From: Barijaona Ramaholimihaso Date: Sat, 22 Sep 2007 06:10:58 +0000 Subject: [PATCH] Avoid "conditional and" for running plugins "interpolate" --- blosxom.cgi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/blosxom.cgi b/blosxom.cgi index 9b5fe21..c998450 100755 --- a/blosxom.cgi +++ b/blosxom.cgi @@ -405,7 +405,14 @@ sub generate { # Plugins: Interpolate # Allow for the first encountered plugin::interpolate subroutine to # override the default built-in interpolate subroutine - my $tmp; foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('interpolate') and defined($tmp = $plugin->interpolate()) and $interpolate = $tmp and last; } + foreach my $plugin (@plugins) { + if ( $plugins{$plugin} > 0 and $plugin->can('interpolate') ) { + if ( my $tmp = $plugin->interpolate() ) { + $interpolate = $tmp; + last; + } + } + } # Head my $head = (&$template($currentdir,'head',$flavour)); -- 2.39.5