Pod::Xhtml can generate well-formed XHTML documents from POD format documentation.
SYNOPSIS
This module inherits from Pod::Parser, hence you can use this familiar interface:
use Pod::Xhtml;
my $parser = new Pod::Xhtml;
$parser->parse_from_file( $infile, $outfile );
# or use filehandles instead
$parser->parse_from_filehandle($in_fh, $out_fh);
# or get the XHTML as a scalar
my $parsertoo = new Pod::Xhtml( StringMode => 1 );
$parsertoo->parse_from_file( $infile, $outfile );
my $xhtml = $parsertoo->asString;
# or get a reference to the XHTML string
my $xhtmlref = $parsertoo->asStringRef;
# to parse some other pod file to another output file all you need to do is...
$parser->parse_from_file( $anotherinfile, $anotheroutfile );
There are options specific to Pod::Xhtml that you can pass in at construction time, e.g.:
my $parser = new Pod::Xhtml(StringMode => 1, MakeIndex => 0);
See "OPTIONS". For more information also see Pod::Parser which this module inherits from.
new Pod::Xhtml( [ OPTIONS ] )
Create a new object. Optionally pass in some options in the form 'new Pod::Xhtml( StringMode => 1);'
$parser->parse_from_file( INPUTFILE, [OUTPUTFILE] )
Read POD from the input file, output to the output file (or STDOUT if no file is given). See Pod::Parser docs for more. Note that you can parse multiple files with the same object. All your options will be preserved, as will any text you added with the add*Text methods.
$parser->parse_from_filehandle( [INPUTFILEHANDLE, [OUTPUTFILEHANDLE]] )
Read POD from the input filehandle, output to the output filehandle (STDIN/STDOUT if no filehandle(s) given). See Pod::Parser docs for more. Note that you can parse multiple files with the same object. All your options will be preserved, as will any text you added with the add*Text methods.
$parser->asString
Get the XHTML as a scalar. You'll probably want to use this with the StringMode option.
$parser->asStringRef
As above, but you get a reference to the string, not the string itself.
$parser->addHeadText( $text )
Inserts some text just before the closing head tag. For example you can add a link to a stylesheet. May be called many times to add lots of text. Note: you need to call this some time before any output is done, e.g. straight after new(). Make sure that you only insert valid XHTML fragments.
$parser->addBodyOpenText( $text ) / $parser->addBodyCloseText( $text )
Inserts some text right at the beginning (or ending) of the body element. For example you can add a navigation header and footer. May be called many times to add lots of text. Note: you need to call this some time before any output is done, e.g. straight after new(). Make sure that you only insert valid XHTML fragments.
Product's homepage
Requirements:
· Perl