X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=installhtml;h=5a76ba099fe27d341219d2337510a0956787d288;hb=66e2fd5444a96049971bab49da0a163e8fa5e52d;hp=967f0c6d1e3b4f202d6d1a9cb3bc0dc16841e2be;hpb=ab9905e6609a9cb347463da24528dc909d8edc7b;p=p5sagit%2Fp5-mst-13.2.git diff --git a/installhtml b/installhtml index 967f0c6..5a76ba0 100755 --- a/installhtml +++ b/installhtml @@ -4,6 +4,7 @@ use strict; use Config; # for config options in the makefile +use File::Spec; use Getopt::Long; # for command-line parsing use Cwd; use Pod::Html 'anchorify'; @@ -293,15 +294,6 @@ sub parse_command_line { } -sub absolute_path { - my($cwd, $path) = @_; - return "$cwd/$path" unless $path =~ m:/:; - # add cwd if path is not already an absolute path - $path = "$cwd/$path" if (substr($path,0,1) ne '/'); - return $path; -} - - sub create_index { my($html, $dir) = @_; (my $pod = $dir) =~ s,^.*/,,; @@ -391,8 +383,8 @@ sub split_on_item { print "splitting files by item.\n" if $verbose && $#splititem >= 0; $pwd = getcwd(); - my $splitter = absolute_path($pwd, "$splitpod/splitpod"); - my $perl = absolute_path($pwd, $^X); + my $splitter = File::Spec->rel2abs("$splitpod/splitpod", $pwd); + my $perl = File::Spec->rel2abs($^X, $pwd); foreach my $pod (@splititem) { # figure out the directory to split into $pod =~ s,^([^/]*)$,/$1,;