summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Signes <rjbs@cpan.org>2012-03-05 22:31:52 -0500
committerRicardo Signes <rjbs@cpan.org>2012-03-12 13:25:23 -0400
commit495a00a19fe0c6e9948090f8539f58599860bd4d (patch)
tree63a38301df5276b704dd1c15abfbc56042e73aa2
parenta6bf7a5c6762f0da58cf810c3e2dd2949dd4fa92 (diff)
downloadperl-495a00a19fe0c6e9948090f8539f58599860bd4d.tar.gz
Sisyphus's fix for pod2html
-rw-r--r--ext/Pod-Html/lib/Pod/Html.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/Pod-Html/lib/Pod/Html.pm b/ext/Pod-Html/lib/Pod/Html.pm
index 8fc74a439b..c16b6573e7 100644
--- a/ext/Pod-Html/lib/Pod/Html.pm
+++ b/ext/Pod-Html/lib/Pod/Html.pm
@@ -325,7 +325,16 @@ sub pod2html {
or die "$0: error open $Dircache for writing: $!\n";
print $cache join(":", @Podpath) . "\n$Podroot\n";
+ my $_updirs_only = ($Podroot =~ /\.\./) && !($Podroot =~ /[^\.\\\/]/);
foreach my $key (keys %Pages) {
+ if($_updirs_only) {
+ my $_dirlevel = $Podroot;
+ while($_dirlevel =~ /\.\./) {
+ $_dirlevel =~ s/\.\.//;
+ # Assume $Pages{$key} has '/' separators (html dir separators).
+ $Pages{$key} =~ s/^[\w\s\-]+\///;
+ }
+ }
print $cache "$key $Pages{$key}\n";
}