Avoid "conditional and" for running plugins "interpolate"
[matthijs/upstream/blosxom.git] / blosxom.cgi
index 9b5fe21a53779a7aee9e65a4fd1daa2bb6924821..c998450d3307823b7a9898f19c1b43a6663c1a0e 100755 (executable)
@@ -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));