Friday, August 13, 2010

Converting POD To html ( Plain Old Documentation to HTML Conversion)

First you should know what is POD, so for Writing Documentation in Perl Modules Check Article "Plain OLD Documentation". After reading this article you will know what is POD and then point comes to convert it to distributable format i.e. html format, so no one will have to look into your perl code and one can know what all is there in that particular module.

There is a module in Perl Called as "pod2html" which gives details on how to convert pod to html.
 Following is the command line for converting pod 2 html :

 pod2html --help --htmlroot= --infile=
                           --outfile=  --podpath=:...:
                           --podroot= --libpods=:...:
                           --recurse --norecurse --verbos
                           --index --noindex --title=

--htmlroot: Root path when creating HTML File from pod.
--infile: Specify the pod file name to convert to html 
--outfile: HTML Filename to be created, if not given then output will go to STDOUT
--index : Creates index at TOP of HTML File (Default)
--noindex: Oppsite of "--index", don't create index at top
--recurse: Recurse into subdirectories specified in podpath(default)
--norecurse: Do not recurse
--title: Title of resulting HTML File
--verbose: Display progress messages
--podroot: Base directory for finding library pods



Example: pod2html --infile=Test.pm --outfile=Test.html --header --index --backlink="Go Back to Top"

 For further study: POD::HTMLPlain OLD Documentation