develooper Front page | perl.perl5.porters | Postings from April 2009

Re: [PATCH] re building perltoc.pod

Thread Previous | Thread Next
From:
Craig A. Berry
Date:
April 24, 2009 11:28
Subject:
Re: [PATCH] re building perltoc.pod
Message ID:
c9ab31fc0904241128w20ec2aa2icea4b33441c791e4@mail.gmail.com
On Wed, Apr 22, 2009 at 12:53 PM, Nicholas Clark <nick@ccl4.org> wrote:
> On Wed, Apr 22, 2009 at 06:45:55PM +0100, Robin Barker wrote:

>> Also (from a clean build), the call to pod/buildtoc warns that perltoc.pod is missing, when that is the file it is building.
>> I have added some extra logic to not warn about missing files when those files are the ones being build.

On VMS the symptom is:

Can't open perltoc.pod: file currently locked by another user at
[.pod]buildtoc. line 434, <> chunk 324.

because the top-level code in output_perltoc() has it open for write
when the loop in podset() encounters it in the list of things to
index, and files are not opened shared by default on VMS.  Not that
trying to index itself is likely to provide meaningful results
anywhere.

> Thanks for spotting and proposing a fix for this. However, I'm not sure if it's
> the most elegant solution. I *think* (but have not verified this) that
> pod/buildtoc can (and therefore should) be split into two scripts. One is
> pod/buildtoc, and (just) builds pod/perlpod.pod. The other is all the other
> functionality.
>
> This will work if building everything but perltoc.pod doesn't need any of the
> results of the "# Find all the mdoules" logic, and work very well if building
> perltoc.pod doesn't need any part of pod.lst

I hadn't noticed this thread when I pushed:

http://perl5.git.perl.org/perl.git/commit/0b01631df09052ad8dfccb35c493ca7ae2243a2d

which addresses other problems not noted here, the worst one being that before

@@ -381,6 +384,8 @@ sub podset {
     local @ARGV = @_;
     my $pod;

+    return unless scalar(@ARGV);
+
     while(<>) {
        tr/\015//d;
        if (s/^=head1 (NAME)\s*/=head2 /) {

it would just hang waiting for input from stdin because @ARGV was
empty.  I'm sure there's some other problem upstream that is causing
%Modules (and thus podset()'s local @ARGV) to be empty, but that's
still a to-do.

I have also not yet taken a swing at handling extension names that are
derived from case-leveled filenames.  Comparing output generated on
Mac OS X with output generated on VMS reveals lots of differences that
look like:


@@ -35336,7 +37843,7 @@

 =back

-=head2 Tie::Memoize - add data to hash when needed
+=head2 tie::memoize, Tie::Memoize - add data to hash when needed

 =over 4

Thread Previous | 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