develooper Front page | perl.perl5.porters | Postings from September 2003

[PATCH 5.8.1] Fix broken splitpod program

Thread Next
From:
Steve Hay
Date:
September 29, 2003 03:49
Subject:
[PATCH 5.8.1] Fix broken splitpod program
Message ID:
3F780E6F.3020704@uk.radan.com
The attached patch fixes the splitpod program in perl-5.8.1 which 
doesn't currently split POD files on =item properly.

I submitted a patch for a related problem in March 
(http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2003-03/msg00720.html) 
which changed

    if (s/=item (\S+)/$1/) {

to

    if (/=item (\S+)/ and $1 ne '*') {
        s/=item (\S+)/$1/;

but when the patch was applied (as #19140) a small adjustment was made, 
so that the above became this:

    if (/=item (\S+)/ and $1 ne '*') {
        s/=item //;

This looks harmless enough, but unfortunately $1 is actually used later 
in the "if" block, and that s/=item // has clobbered it :-(

I didn't spot this at the time, and have only just spotted it now that I 
come to build Perl 5.8.1 "for real".  Obviously I omitted testing the 
POD conversion utilities during the testing of all those perl-5.8.1-RC's :-(

Anyway, the attached patch fixes it, hopefully in a less fragile way.

- Steve

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About