summaryrefslogtreecommitdiff
path: root/ext/Pod-Html
diff options
context:
space:
mode:
authorRicardo Signes <rjbs@cpan.org>2012-02-22 09:33:45 -0500
committerRicardo Signes <rjbs@cpan.org>2012-02-22 09:36:03 -0500
commitac2b477c8b4b647797d42877de5b1a1d34c94073 (patch)
treef1652474b06d2457a0bfc9b215b304b7f7b49852 /ext/Pod-Html
parent83f6fd9ff6f14d4a5860f024047acdd235268d52 (diff)
downloadperl-ac2b477c8b4b647797d42877de5b1a1d34c94073.tar.gz
unixify paths a bit more systematicaly in Pod-Html
Rather than unixifying paths sort of once off, we now do what I threatened earlier: unixify all the --switch supplied paths during command line parsing. There are other bits of File::Spec being sprinkled around, quite possibly in too-interior sections of the program, but this change gets *all* tests passing on Win32 as well as GNU/Linux. I think an audit of filepath normalization "border security" is still due, but this may tide us over for now.
Diffstat (limited to 'ext/Pod-Html')
-rw-r--r--ext/Pod-Html/lib/Pod/Html.pm36
1 files changed, 15 insertions, 21 deletions
diff --git a/ext/Pod-Html/lib/Pod/Html.pm b/ext/Pod-Html/lib/Pod/Html.pm
index d2c2cb2955..694c5b07e5 100644
--- a/ext/Pod-Html/lib/Pod/Html.pm
+++ b/ext/Pod-Html/lib/Pod/Html.pm
@@ -289,12 +289,6 @@ sub pod2html {
$Htmlroot = "" if $Htmlroot eq "/";
$Htmldir =~ s#/\z##;
- # I think this, and many other unixifications, belongs in
- # parse_command_line or some other higher-level location to get them all
- # unixified at once. Right now, I think we may be unixifying things too
- # late and ad hoc. -- rjbs, 2012-02-21
- $Htmlfile = _unixify($Htmlfile);
-
if ( $Htmlroot eq ''
&& defined( $Htmldir )
&& $Htmldir ne ''
@@ -508,21 +502,21 @@ sub parse_command_line {
@Podpath = split(":", $opt_podpath) if defined $opt_podpath;
- $Backlink = $opt_backlink if defined $opt_backlink;
- $Cachedir = $opt_cachedir if defined $opt_cachedir;
- $Css = $opt_css if defined $opt_css;
- $Header = $opt_header if defined $opt_header;
- $Htmldir = $opt_htmldir if defined $opt_htmldir;
- $Htmlroot = $opt_htmlroot if defined $opt_htmlroot;
- $Doindex = $opt_index if defined $opt_index;
- $Podfile = $opt_infile if defined $opt_infile;
- $Htmlfile = $opt_outfile if defined $opt_outfile;
- $Poderrors = $opt_poderrors if defined $opt_poderrors;
- $Podroot = $opt_podroot if defined $opt_podroot;
- $Quiet = $opt_quiet if defined $opt_quiet;
- $Recurse = $opt_recurse if defined $opt_recurse;
- $Title = $opt_title if defined $opt_title;
- $Verbose = $opt_verbose if defined $opt_verbose;
+ $Backlink = $opt_backlink if defined $opt_backlink;
+ $Cachedir = _unixify($opt_cachedir) if defined $opt_cachedir;
+ $Css = $opt_css if defined $opt_css;
+ $Header = $opt_header if defined $opt_header;
+ $Htmldir = _unixify($opt_htmldir) if defined $opt_htmldir;
+ $Htmlroot = _unixify($opt_htmlroot) if defined $opt_htmlroot;
+ $Doindex = $opt_index if defined $opt_index;
+ $Podfile = _unixify($opt_infile) if defined $opt_infile;
+ $Htmlfile = _unixify($opt_outfile) if defined $opt_outfile;
+ $Poderrors = $opt_poderrors if defined $opt_poderrors;
+ $Podroot = _unixify($opt_podroot) if defined $opt_podroot;
+ $Quiet = $opt_quiet if defined $opt_quiet;
+ $Recurse = $opt_recurse if defined $opt_recurse;
+ $Title = $opt_title if defined $opt_title;
+ $Verbose = $opt_verbose if defined $opt_verbose;
warn "Flushing directory caches\n"
if $opt_verbose && defined $opt_flush;