Pod::Simple::HTMLBatch(3perl) | Perl Programmers Reference Guide | Pod::Simple::HTMLBatch(3perl) |
Pod::Simple::HTMLBatch - convert several Pod files to several HTML files
perl -MPod::Simple::HTMLBatch -e 'Pod::Simple::HTMLBatch::go' in out
This module is used for running batch-conversions of a lot of HTML documents
This class is NOT a subclass of Pod::Simple::HTML (nor of bad old Pod::Html) -- although it uses Pod::Simple::HTML for doing the conversion of each document.
The normal use of this class is like so:
use Pod::Simple::HTMLBatch; my $batchconv = Pod::Simple::HTMLBatch->new; $batchconv->some_option( some_value ); $batchconv->some_other_option( some_other_value ); $batchconv->batch_convert( \@search_dirs, $output_dir );
Note that this class also provides (but does not export) the function Pod::Simple::HTMLBatch::go. This is basically just a shortcut for "Pod::Simple::HTMLBatch->batch_convert(@ARGV)". It's meant to be handy for calling from the command line.
However, the shortcut requires that you specify exactly two command-line arguments, "indirs" and "outdir".
Example:
% mkdir out_html % perl -MPod::Simple::HTMLBatch -e Pod::Simple::HTMLBatch::go @INC out_html (to convert the pod from Perl's @INC files under the directory ./out_html)
(Note that the command line there contains a literal atsign-I-N-C. This is handled as a special case by batch_convert, in order to save you having to enter the odd-looking "" as the first command-line parameter when you mean "just use whatever's in @INC".)
Example:
% mkdir ../seekrut % chmod og-rx ../seekrut % perl -MPod::Simple::HTMLBatch -e Pod::Simple::HTMLBatch::go . ../seekrut (to convert the pod under the current dir into HTML files under the directory ./seekrut)
Example:
% perl -MPod::Simple::HTMLBatch -e Pod::Simple::HTMLBatch::go happydocs . (to convert all pod from happydocs into the current directory)
A common value you might want would be just "." for the current directory:
$batchconv->batch_convert( "." , ...);
(Exactly what separator character should be used, is gotten from $Config::Config{'path_sep'}, via the Config module.)
(Note that a missing or undefined value means a different thing in the first slot than in the second. That's so that "batch_convert()" with no arguments (or undef arguments) means "go from @INC, into the current directory.)
Note that you can also call "batch_convert" as a class method, like so:
Pod::Simple::HTMLBatch->batch_convert( ... );
That is just short for this:
Pod::Simple::HTMLBatch-> new-> batch_convert(...);
That is, it runs a conversion with default options, for whatever inputdirs and output dir you specify.
The following are all accessor methods -- that is, they don't do anything on their own, but just alter the contents of the conversion object, which comprises the options for this particular batch conversion.
We show the "put" form of the accessors below (i.e., the syntax you use for setting the accessor to a specific value). But you can also call each method with no parameters to get its current value. For example, "$self->contents_file()" returns the current value of the contents_file attribute.
<html> <head><title>Perl Documentation</title></head> <body class='contentspage'> <h1>Perl Documentation</h1>
<p class='contentsfooty'>Generated by Pod::Simple::HTMLBatch v3.01 under Perl v5.008 <br >At Fri May 14 22:26:42 2004 GMT, which is Fri May 14 14:26:42 2004 local time.</p>
TODO
call add_css($someurl) to add stylesheet as alternate call add_css($someurl,1) to add as primary stylesheet call add_javascript subclass Pod::Simple::HTML and set $batchconv->html_render_class to that classname and maybe override $page->batch_mode_page_object_init($self, $module, $infile, $outfile, $depth) or maybe override $batchconv->batch_mode_page_object_init($page, $module, $infile, $outfile, $depth) subclass Pod::Simple::Search and set $batchconv->search_class to that classname
Pod::Simple, Pod::Simple::HTMLBatch, perlpod, perlpodspec
Questions or discussion about POD and Pod::Simple should be sent to the pod-people@perl.org mail list. Send an empty email to pod-people-subscribe@perl.org to subscribe.
This module is managed in an open GitHub repository, <https://github.com/perl-pod/pod-simple/>. Feel free to fork and contribute, or to clone <git://github.com/perl-pod/pod-simple.git> and send patches!
Patches against Pod::Simple are welcome. Please send bug reports to <bug-pod-simple@rt.cpan.org>.
Copyright (c) 2002 Sean M. Burke.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.
Pod::Simple was created by Sean M. Burke <sburke@cpan.org>. But don't bother him, he's retired.
Pod::Simple is maintained by:
2020-07-21 | perl v5.28.1 |