Back | ||||||||
Driver scripts | ||||||||
The Pdoc alone won't do very much. Scripts need to be written to use the lib for transforming once set of files into a new format. Only one driver script is currently available:
|
||||||||
perlmod2www.pl | ||||||||
For quick access to the documentation, execute the script with the '-h' option.
perlmod2www.pl converts Perl packages/modules into HTML format.
-wroot: each link to other pages in the HTML tree are created as relative path. If you want to create links for a specific site, define the -wroot option with the url where the top HTML tree will be accessible (note: remember to put the url between single quotes). Examples
In these examples, the following are assumed:
perlmod2www.pl -source /home/me/MyLib/ -target /home/www/htdocs/pdoc/MyLib/
This should be sufficient to get your Perl modules properly rendered and visible either directly through a web browser (open the /home/www/htdocs/pdoc/MyLib/index.html file) or via your web server (www.mysite.org/pdoc/MyLib).The perlmod2www.pl script skips by default the CVS and blib dirctories. You can skip others using the -skip option: perlmod2www.pl -source /home/me/MyLib/ -target /home/www/htdocs/pdoc/MyLib/ -skip SubDir1,SubDir2
In this case, the sub-directories SubDir1 and SubDir2 (wherever they are) will be skipped.You can prepare the documentation for a specific site using the -wroot option: perlmod2www.pl -source /home/me/MyLib/ -target /home/www/htdocs/pdoc/MyLib/ -wroot 'http://some.other.site/development/pdoc/MyLib'
In this case, all the links generated in the html files will be based on the http://some.other.site/development/pdoc/MyLib location.You can place the Pdoc/Html/Data/perl.css file in some specific location on your server and refer to such file when generating the documentation: perlmod2www.pl -source /home/me/MyLib/ -target /home/www/htdocs/pdoc/MyLib/ -css_url /css/perl.css
In this case, all the generated html files will use the /css/perl.css url to get the CSS file. This imply that the Pdoc/Html/Data/perl.css file has been copied, in this example, to /home/www/htdocs/css/ server directory.You can use alternate CSS files as the default proposed in Pdoc too: perlmod2www.pl -source /home/me/MyLib/ -target /home/www/htdocs/pdoc/MyLib/ -css /home/me/my_perl.css
In this case, the /home/me/my_perl.css will be used to produce the /home/www/htdocs/pdoc/MyLib/perl.css file.If a Perl library is using modules from another library (let say /home/me/OtherLib/), than you can render such library too and cross-link the two on the server: perlmod2www.pl -source /home/me/OtherLib/ -target /home/www/htdocs/pdoc/OtherLib/
perlmod2www.pl -source /home/me/MyLib/ -target /home/www/htdocs/pdoc/MyLib/ -xl /home/me/OtherLib,/home/www/htdocs/pdoc/OtherLib
The first line generates the OtherLib documentation, the second line will cross-link any module from OtherLib used in MyLib. The -xl option gets the original source code path and the target html path separated by a comma as argument. See also the -xltable option to specify a file with a list of cross-references in case there are too much for one single command line.You can add a personalised touch to the rendered documentation using a specific header and/or footer to the web pages: perlmod2www.pl -source /home/me/MyLib/ -target /home/www/htdocs/pdoc/MyLib/ -doc_header /home/me/my_header.html -doc_footer /home/me/my_footer.html
Each top and bottom rendered page will get the piece of HTML code defined in the files /home/me/my_header.html and /home/me/my_footer.html respectively.There are some extra data that can be added to the rendered Perl module pages accessible via a toolbar created in these pages: perlmod2www.pl -source /home/me/MyLib/ -target /home/www/htdocs/pdoc/MyLib/ -webcvs '/cgi/webcvs.cgi' -raw
With the -webcvs option, a WebCvs link will be added in the toolbar to access the module CVS status, provided that webcvs has been installed and handles the library under a CVS repository. The -raw option will add a RawContent link to view the Perl module content in plain text.
|
||||||||
Back |