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

[PATCH 5.8.0 DOC] Fix missing functions when splitting perlfunc

Thread Next
Steve Hay
March 20, 2003 03:54
[PATCH 5.8.0 DOC] Fix missing functions when splitting perlfunc
Message ID:
The patch below fixes three minor problems relating to the perlfunc manpage:

1. Three functions described in pod/perlfunc.pod (readpipe, sysopen and 
tied) have no entry in the __DATA__ section at the end of 
lib/Pod/  This means that when the perlfunc manpage is 
split using pod/splitpod, no pages are created for those functions.

2. Two functions (-X and qr//) are described one way by their "=item" in 
pod/perlfunc.pod but are described in another, different, way in the 
__DATA__ section at the end of lib/Pod/  This also means 
that those functions are omitted when the perlfunc manpage is split.

3. There is a bug in the pod/splitpod utility itself which means that if 
a manpage that is being split contains an "=item" that has many "=item 
*" subsections then those subsections are all missing from the split 
page created.  Specifically, when the perlfunc manpage is split the page 
created for the pack() function is missing all of the rules described in 
subsections after "The following rules apply:".

To test this patch, run the "installhtml" program (in the root of the 
Perl source tree) with arguments such as the following:

perl .\installhtml --podroot=C:/Temp/perl-5.8.0 --podpath=pod --recurse 
--splititem=pod/perlfunc --splitpod=pod --htmldir=C:/Temp/perldocs 

This will convert all POD documents found in the "pod" sub-directory of 
"C:/Temp/perl-5.8.0", split the perlfunc manpage using the splitpod 
program found in the "pod" sub-directory itself, and output HTML files 
into "C:/Temp/perldocs".  The directory "C:/Temp/perldocs/pod/perlfunc" 
should then contain HTML conversions of the split pieces of the perlfunc 
manpage, and amongst them should be the files "readpipe.html", 
"sysopen.html", "tied.html", "qrPATTERN.html" and "X.html". Furthermore, 
the "pack.html" page should be complete, rather than being cut off 
before the list of rules.

Please copy any discussion on this patch to me -- I'm not subscribed to 
the perl5-porters list.



diff -ru perl-5.8.0.orig/lib/Pod/ 
--- perl-5.8.0.orig/lib/Pod/    2002-06-01 
19:03:22.000000000 +0100
+++ perl-5.8.0/lib/Pod/    2003-03-20 11:10:38.000000000 +0000
@@ -287,6 +287,7 @@
readdir    I/O    get a directory from a directory handle
readline    I/O    fetch a record from a file
readlink    File    determine where a symbolic link is pointing
+readpipe    Process    execute a system command and collect standard output
recv    Socket    receive a message over a Socket
redo    Flow    start this loop iteration over again
ref    Objects    find out the type of thing being referenced
@@ -338,6 +339,7 @@
substr    String    get or alter a portion of a stirng
symlink    File    create a symbolic link to a file
syscall    I/O,Binary    execute an arbitrary system call
+sysopen    File    open a file, pipe, or descriptor
sysread    I/O,Binary    fixed-length unbuffered input from a filehandle
sysseek    I/O,Binary    position I/O pointer on handle used with 
sysread and syswrite
system    Process    run a separate program
@@ -345,6 +347,7 @@
tell    I/O    get current seekpointer on a filehandle
telldir    I/O    get current seekpointer on a directory handle
tie    Objects    bind a variable to an object class
+tied    Objects    get a reference to the object underlying a tied variable
time    Time    return number of seconds since 1970
times    Process,Time    return elapsed time for self and child processes
tr///    String    transliterate a string
diff -ru perl-5.8.0.orig/pod/perlfunc.pod perl-5.8.0/pod/perlfunc.pod
--- perl-5.8.0.orig/pod/perlfunc.pod    2002-07-19 00:35:02.000000000 +0100
+++ perl-5.8.0/pod/perlfunc.pod    2003-03-20 11:11:25.000000000 +0000
@@ -246,11 +246,11 @@

=over 8


-=item I<-X> EXPR
+=item -X EXPR

-=item I<-X>
+=item -X

A file test, where X is one of the letters listed below.  This unary
operator takes one argument, either a filename or a filehandle, and
@@ -3714,7 +3714,7 @@

=item qq/STRING/

-=item qr/STRING/
+=item qr/PATTERN/

=item qx/STRING/

diff -ru perl-5.8.0.orig/pod/splitpod perl-5.8.0/pod/splitpod
--- perl-5.8.0.orig/pod/splitpod    2002-06-01 19:03:44.000000000 +0100
+++ perl-5.8.0/pod/splitpod    2003-03-20 11:11:52.000000000 +0000
@@ -10,7 +10,8 @@

    next unless /^=(?!cut)/ .. /^=cut/;

-    if (s/=item (\S+)/$1/) {
+    if (/=item (\S+)/ and $1 ne '*') {
+    s/=item (\S+)/$1/;
    #$cur = "POSIX::" . $1;
    $next{$cur} = $1;
    $cur = $1;
--- END PATCH ---

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About