Jenda Krynicky wrote:

From: "JupiterHost.Net" <[EMAIL PROTECTED]>

Jenda Krynicky wrote:

From: "JupiterHost.Net" <[EMAIL PROTECTED]>

Is there an easy way to view the POD from a local module in a
browser to see what it will look like in CPAN?


I would generate the HTML file by the pod2html script and then look
at the created file.

pod2html --infile=The/Module.pm --outfile=The/Module.html

The trick is, if I do that the html is the pod for pod2html.

It doesn't seem to like .pm files, only .pod :(


That's strange. Within the makeppd script I use to create the PPM distributions I call the pod2html like this:

        pod2html.bat "-htmlroot=." "$file.pm" "-outfile=$file.html"

where $file is eg "Sender". And I do get the right docs.

Mail::Sender is one of my favs BTW :) Thanks for it!

How exactly do you call the script? Could you post your module?

The directory ../x/pmod has some custom .pm files with pod after the __END__ instead of embedded in the code.


#!/usr/bin/perl

use strict;
use warnings;
use CGI qw(header param);
use Pod::Html;

print header();

my $pmfile = defined param('mod') && -e '../x/pmod/'.param('mod') ? param('mod') : 'CGI.pm';

print "<p>----$pmfile--</p>" if -e "../x/pmod/$pmfile"; # just a temporary sanity check...

pod2html('/usr/bin/pod2html',
  "--title=$pmfile pod2html",
  '--backlink=Back to Top',
  '--css=http://search.cpan.org/s/style.css',
  "--infile=../x/pmod/$pmfile"
);

I copied CGI.pm to ../x/mod/CGI.pm so it can default to that.

Jenda

Thanks!

Lee.M - JupiterHost.Net

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to