From: Tobias Leich Date: Mon, 16 Nov 2009 21:35:12 +0000 (+0100) Subject: output path X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=de71a5b8edeb81e1b31d89f6805a286b9d9382fb;p=sdlgit%2FSDL-Site.git output path --- diff --git a/tools/PM-Pod2html-snippet.pl b/tools/PM-Pod2html-snippet.pl index 816558f..737f3b8 100644 --- a/tools/PM-Pod2html-snippet.pl +++ b/tools/PM-Pod2html-snippet.pl @@ -3,15 +3,18 @@ use strict; use warnings; -use File::Spec; use Pod::Xhtml; +use File::Spec::Functions qw(rel2abs splitpath splitdir catpath catdir catfile canonpath); -#system('git pull'); +my $input_path = 'C:/SDL_perl/lib/pods'; -my $input_path = 'C:/SDL_perl/lib/pods'; -my $output_path = 'F:/htdocs/SDL-Site/pages'; -my $parser = Pod::Xhtml->new(FragmentOnly => 1); -my %module_names = (); +my ($volume, $dirs) = splitpath(rel2abs(__FILE__)); +my @directories = splitdir(canonpath($dirs)); +pop(@directories); +my $parent_dir = catpath($volume, catdir(@directories)); +my $output_path = catdir($parent_dir, 'pages'); +my $parser = Pod::Xhtml->new(FragmentOnly => 1); +my %module_names = (); my $fh; read_file($input_path);