]> git.deb.at Git - pkg/blosxom.git/blobdiff - blosxom.cgi
Avoid "conditional and" for fixing $depth
[pkg/blosxom.git] / blosxom.cgi
index 02230245f3c086c61dd0f0135cb8e4f26aa11c70..1adc8ef49d404072c39ac1e7ce6554dbef5c3646 100755 (executable)
@@ -137,7 +137,7 @@ $url =~ s!/$!!;
 $datadir =~ s!/$!!; $plugin_dir =~ s!/$!!; $static_dir =~ s!/$!!;
   
 # Fix depth to take into account datadir's path
-$depth and $depth += ($datadir =~ tr[/][]) - 1;
+$depth += ($datadir =~ tr[/][]) - 1 if $depth;
 
 # Global variable to be used in head/foot.{flavour} templates
 $path_info = '';
@@ -241,7 +241,7 @@ foreach my $plugin ( @plugin_list ) {
   else {
     eval { require $plugin };
   }
-  $@ and warn "error finding or loading blosxom plugin $plugin_name - skipping\n" and next;
+  $@ 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;
 }
 shift @INC foreach @plugin_dirs;