X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fblosxom.git;a=blobdiff_plain;f=blosxom.cgi;h=b80cfbcc1b3e2c3fcb0fc0a8fa9e71df75e63406;hp=02230245f3c086c61dd0f0135cb8e4f26aa11c70;hb=74eb1a75bb6accd3cda923bc1dfe6d2d1a877246;hpb=c73392f240218cc9480aa672afb632a70e64311f diff --git a/blosxom.cgi b/blosxom.cgi index 0223024..b80cfbc 100755 --- a/blosxom.cgi +++ b/blosxom.cgi @@ -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 = ''; @@ -157,7 +157,7 @@ $flavour = ''; if ( $path_info[$#path_info] =~ /(.+)\.(.+)$/ ) { $flavour = $2; - $1 ne 'index' and $path_info .= "/$1.$2"; + $path_info .= "/$1.$2" if $1 ne 'index'; pop @path_info; } else { $flavour = param('flav') || $default_flavour; @@ -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;