From: Barijaona Ramaholimihaso Date: Sat, 22 Sep 2007 11:24:57 +0000 (+0000) Subject: Avoid "conditional and" for checking after plugins "start" and stuffing @plugins X-Git-Tag: debian/2.1.2-2~79 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=4f915f2efa07e9e95b3bb6d2310ec3d39b81bf72;p=pkg%2Fblosxom.git Avoid "conditional and" for checking after plugins "start" and stuffing @plugins --- diff --git a/blosxom.cgi b/blosxom.cgi index fd8124a..c51ca2a 100755 --- a/blosxom.cgi +++ b/blosxom.cgi @@ -250,8 +250,15 @@ foreach my $plugin ( @plugin_list ) { else { eval { require $plugin }; } - $@ and warn "$@ error finding or loading blosxom plugin $plugin_name - skipping\n" and next; - $plugin_name->start() and ( $plugins{$plugin_name} = $on_off ) and push @plugins, $plugin_name; + + if ($@) { + warn "error finding or loading blosxom plugin '$plugin_name': $@"; + next; + } + if ( $plugin_name->start() and ( $plugins{$plugin_name} = $on_off ) ) { + push @plugins, $plugin_name; + } + } shift @INC foreach @plugin_dirs;