11 my $input_path = 'C:/SDL_perl/lib/pods';
12 my $output_path = 'F:/htdocs/SDL-Site/pages';
13 my $parser = Pod::Xhtml->new(FragmentOnly => 1);
14 my %module_names = ();
17 read_file($input_path);
20 open($fh, '>', File::Spec->catfile($output_path, 'documentation.html-inc'));
21 binmode($fh, ":utf8");
22 print($fh "<div class=\"pod\">\n<h1>Documentation (latest development branch)</h1>");
23 for my $module_name (sort keys %module_names)
25 print($fh '<a href="' . $module_names{$module_name} . '">',
30 print($fh "</div>\n");
36 my @files = <$path/*>;
40 read_file($_) if(-d $_);
45 $file_name =~ s/^$input_path\/*//;
46 my $module_name = $file_name;
47 $module_name =~ s/\//::/g;
48 $module_name =~ s/(\.pm|\.pod)$//i;
49 $file_name =~ s/\//-/g;
50 $file_name =~ s/(\.pm|\.pod)$/.html-inc/i;
51 my $file_path = $file_name;
52 $file_path =~ s/\-inc$//;
53 $module_names{$module_name} = $file_path;
54 $file_name = File::Spec->catfile($output_path, $file_name);
56 $parser->parse_from_file($_, $file_name);