in reply to Re: pod2html includes markup (like B< >) in TITLE
in thread pod2html includes markup (like B< >) in TITLE

Whaddaya know, I'm doing this in 5.6 (I use ActiveState's Perl Development Kit to wrap my app up in a nice little (?) .exe file, and I forget whether I have to pay big bucks to upgrade it for 5.8.) That should be the ticket though.

Thanks,
Brig

UPDATE

I took a quick look at the PAR slideshow. Thanks for the pointer.

In the meantime, while upgrading Pod::Html should fix this particular problem, the deeper problem is my avoiding the problem of getting --title=title to work. On first reading the pod2html man page, my attempts at following the instructions failed, but considering the documentation from Pod::Html and its additional option of --backlink I realized that I wanted an automated (vs. command-line) solution to my problem of generating both .htm and .txt files anyway. And that another crack at --title was worthwhile.

Thus, I can put the following script in a folder that contains a program's *_Readme.pod file and put the package file someplace accessible like E:/aa/perl/lib. Double-clicking the script from Windows Explorer rebuilds the .htm and .txt files from whatever I've done with my .pod file. And now I get all those little 'Back to Top' links. :-)

# Creates Readme.htm and Readme.txt files from Readme.pod use strict; push @INC, 'E:/aa/perl/lib'; require 'podtools.pl'; my $pod_filename = 'BW_Readme.pod'; # filename of pod input my $htm_filename = 'BW_Readme.htm'; # filename of htm output my $title = 'BW123321™ Readme'; # title for the htm window; # ™ is actually the (TM) symbol my $txt_filename = 'BW_Readme.txt'; # filename of txt output podtools::pod2_htm_txt( $pod_filename, $htm_filename, $title, $txt_filename, );

and the podtools.pl package file in my E:/aa/perl/lib folder:

package podtools; use strict; use Pod::Html; use Pod::Text; sub pod2_htm_txt { # Creates htm and txt files from a given pod file and htm title my ( $pod_filename, $htm_filename, $title, $txt_filename, ) = @_; # Build the '.htm' file pod2html( "--infile=$pod_filename", "--outfile=$htm_filename", "--title=$title", '--backlink=Back to Top', # implants backlink after =head1 ); # Build the '.txt' file my $parser = Pod::Text->new ( loose => 1, # prints blank lines after =head1 width => 78, quotes => 'none', ); # Read POD from first file and write to second. $parser->parse_from_file ( $pod_filename, $txt_filename ); } 1;

Replies are listed 'Best First'.
Re: Re: Re: pod2html includes markup (like B< >) in TITLE
by PodMaster (Abbot) on Jan 07, 2004 at 08:49 UTC
    You don't have to pay for free things ===> PAR. Also, you don't have to upgrade perl to upgrade Pod::Html.

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.