my $story = (&$template($path,'story',$flavour));
# Plugins: Story
- foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('story') and $entries = $plugin->story($path, $fn, \$story, \$title, \$body) }
+ foreach my $plugin (@plugins) {
+ if ( $plugins{$plugin} > 0 and $plugin->can('story') ) {
+ $entries = $plugin->story( $path, $fn, \$story, \$title, \$body );
+ }
+ }
if ($content_type =~ m{\bxml\b}) {
# Escape <, >, and &, and to produce valid RSS
my $foot = (&$template($currentdir,'foot',$flavour));
# Plugins: Foot
- foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('foot') and $entries = $plugin->foot($currentdir, \$foot) }
+ foreach my $plugin (@plugins) {
+ if ( $plugins{$plugin} > 0 and $plugin->can('foot') ) {
+ $entries = $plugin->foot( $currentdir, \$foot );
+ }
+ }
$foot = &$interpolate($foot);
$output .= $foot;