4 use File::Basename qw(&basename &dirname);
6 # List explicitly here the variables you want Configure to
7 # generate. Metaconfig only looks for shell variables, so you
8 # have to mention them as if they were shell variables, not
9 # %Config entries. Thus you write
11 # to ensure Configure will look for $Config{startperl}.
15 $file .= '.com' if $^O eq 'VMS';
17 chdir("pod") or die "Can't chdir to pod: $!";
18 open OUT,">$file" or die "Can't create $file: $!";
20 print "Extracting $file (with variable substitutions)\n";
22 # In this section, perl variables will be expanded during extraction.
23 # You can use $Config{...} to use Configure variables.
25 print OUT <<"!GROK!THIS!";
27 eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
28 if \$running_under_some_shell;
31 # In the following, perl variables are not expanded during extraction.
33 print OUT <<'!NO!SUBS!';
38 pod2html - convert .pod files to .html files
42 pod2html --help --htmlroot=<name> --infile=<name> --outfile=<name>
43 --podpath=<name>:...:<name> --podroot=<name>
44 --libpods=<name>:...:<name> --recurse --norecurse --verbose
45 --index --noindex --title=<name>
49 Converts files from pod format (see L<perlpod>) to HTML format.
53 pod2html takes the following arguments:
61 Displays the usage message.
67 Sets the base URL for the HTML files. When cross-references are made,
68 the HTML root is prepended to the URL.
74 Specify the pod file to convert. Input is taken from STDIN if no
81 Specify the HTML file to create. Output goes to STDOUT if no outfile
88 Specify the base directory for finding library pods.
92 --podpath=name:...:name
94 Specify which subdirectories of the podroot contain pod files whose
95 HTML converted forms can be linked-to in cross-references.
99 --libpods=name:...:name
101 List of page names (eg, "perlfunc") which contain linkable C<=item>s.
107 Use Netscape HTML directives when applicable.
113 Do not use Netscape HTML directives (default).
119 Generate an index at the top of the HTML file (default behaviour).
125 Do not generate an index at the top of the HTML file.
132 Recurse into subdirectories specified in podpath (default behaviour).
138 Do not recurse into subdirectories specified in podpath.
144 Specify the title of the resulting HTML file.
150 Display progress messages.
156 Tom Christiansen, E<lt>tchrist@perl.comE<gt>.
160 See L<Pod::Html> for a list of known bugs in the translator.
164 L<perlpod>, L<Pod::Html>
168 This program is distributed under the Artistic License.
177 close OUT or die "Can't close $file: $!";
178 chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
179 exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';