diff options
author | Ricardo Signes <rjbs@cpan.org> | 2012-03-05 22:31:52 -0500 |
---|---|---|
committer | Ricardo Signes <rjbs@cpan.org> | 2012-03-12 13:25:23 -0400 |
commit | 495a00a19fe0c6e9948090f8539f58599860bd4d (patch) | |
tree | 63a38301df5276b704dd1c15abfbc56042e73aa2 /ext/Pod-Html/lib/Pod/Html.pm | |
parent | a6bf7a5c6762f0da58cf810c3e2dd2949dd4fa92 (diff) | |
download | perl-495a00a19fe0c6e9948090f8539f58599860bd4d.tar.gz |
Sisyphus's fix for pod2html
Diffstat (limited to 'ext/Pod-Html/lib/Pod/Html.pm')
-rw-r--r-- | ext/Pod-Html/lib/Pod/Html.pm | 9 |
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"; } |