summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1997-01-16 07:24:00 +1200
committerChip Salzenberg <chip@atlantic.net>1997-01-16 07:24:00 +1200
commit44a8e56aa037ed0f03f0506f6f85f5ed290c78e1 (patch)
treecb236761929c3161f91de24c86322902758b6efb /pod
parent8227f81cbd3d53a745747c4247824562383badae (diff)
downloadperl-44a8e56aa037ed0f03f0506f6f85f5ed290c78e1.tar.gz
[inseparable changes from patch from perl5.003_20 to perl5.003_21]
BUILD PROCESS Subject: Make MachTen hints file warn about db-recno failures Date: Wed, 8 Jan 1997 12:07:18 +0100 From: Dominic Dunlop <domo@slipper.ip.lu> Files: hints/machten.sh Msg-ID: <v03010d00aef92fba6aca@[194.51.248.78]> (applied based on p5p patch as commit a4c70ab8da3ec1d87c83e5c617f4550814ec1724) Subject: 5.003_20, FreeBSD 3.0 and minor patch Date: Wed, 8 Jan 1997 14:37:47 +0100 From: Ollivier Robert <roberto@eurocontrol.fr> Files: Configure Msg-ID: <Mutt.19970108143747.roberto@caerdonn.eurocontrol.fr> (applied based on p5p patch as commit 50e0d465254be88fb90ac23584812a529741b4b1) CORE LANGUAGE CHANGES Subject: Fix overloading via inherited autoloaded functions Date: Mon, 13 Jan 1997 05:22:47 -0500 (EST) From: Ilya Zakharevich <ilya@math.ohio-state.edu> Files: gv.c lib/overload.pm pod/perldiag.pod t/pragma/overload.t Msg-ID: <199701131022.FAA22830@monk.mps.ohio-state.edu> (applied based on p5p patch as commit a9bc755754f0db5e848e65dfd2e63a96af50ffd4) Subject: Method call fixes: Don't cache in alias, don't skip undef From: Chip Salzenberg <chip@atlantic.net> Files: global.sym gv.c gv.h hv.c op.c pod/perlguts.pod pod/perltoc.pod pp.c pp_ctl.c pp_hot.c proto.h scope.c sv.c t/op/method.t Subject: Formats can be closures From: Chip Salzenberg <chip@atlantic.net> Files: cv.h op.c perly.c perly.c.diff perly.y pp_sys.c sv.h Subject: Quote 'foo' in C<$x{-foo}> From: Chip Salzenberg <chip@atlantic.net> Files: toke.c Subject: Forbid C< x->{y} > and C< x->[0] > under C<strict refs> From: Chip Salzenberg <chip@atlantic.net> Files: op.c pod/perldiag.pod t/pragma/strict-refs Subject: Allow <=> to return undef when operands are not ordered From: Chip Salzenberg <chip@perl.com> Files: MANIFEST pp.c t/op/cmp.t CORE PORTABILITY Subject: Re: Perl 5.003_20: OS/2 patches Date: Fri, 10 Jan 1997 06:02:16 -0500 (EST) From: Ilya Zakharevich <ilya@math.ohio-state.edu> Files: hints/os2.sh os2/Changes os2/os2.c os2/os2ish.h pp_sys.c Msg-ID: <199701101102.GAA19051@monk.mps.ohio-state.edu> (applied based on p5p patch as commit 9a3e71f668bd84b1cf53dd3ea10f588d59ecfebb) Subject: VMS patches for _20 Date: Tue, 14 Jan 1997 17:34:43 -0500 (EST) From: Charles Bailey <bailey@HMIVAX.HUMGEN.UPENN.EDU> Files: configpm dosish.h os2/os2ish.h plan9/plan9ish.h proto.h t/pragma/strict.t t/pragma/subs.t t/pragma/warning.t toke.c unixish.h vms/Makefile vms/config.vms vms/descrip.mms vms/genconfig.pl vms/perly_c.vms vms/test.com vms/vmsish.h x2p/a2p.h x2p/str.c private-msgid: <01IE7MGK7ULQ003K5M@hmivax.humgen.upenn.edu> Subject: Irix 6.3 & 6.4 and perl5.003_20 Date: Mon, 13 Jan 1997 17:42:50 -0500 (EST) From: John Stoffel <jfs@fluent.com> Files: MANIFEST hints/irix_6_3.sh hints/irix_6_4.sh Msg-ID: <199701132242.RAA14601@jfs.Fluent.COM> (applied based on p5p patch as commit 8a1e91d771b51ae31eed1ac5944c63934213fb07) Subject: Patch: MachTen hints, Configure Date: Tue, 14 Jan 1997 13:43:13 +0100 From: Dominic Dunlop <domo@slipper.ip.lu> Files: Configure hints/machten.sh private-msgid: <v03010d00af0123a93670@[194.51.248.75]> Subject: Rename aux.sh to aux_3.sh for MS-LOSS From: Chip Salzenberg <chip@atlantic.net> Files: MANIFEST hints/aux_3.sh DOCUMENTATION Subject: Full documentation generation patch Date: Wed, 15 Jan 97 11:16:28 +0100 From: Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com> Files: MANIFEST pod/roffitall pod/rofftoc Msg-ID: <15309.853323388@lyon.grenoble.hp.com> (applied based on p5p patch as commit a3270a1d7469cab9221ab0050a0e6695bd0047d8) Subject: Document use of pos() and /\G/ Date: Mon, 13 Jan 1997 15:13:12 -0500 From: Gurusamy Sarathy <gsar@engin.umich.edu> Files: pod/perlfunc.pod pod/perlnews.pod pod/perlop.pod pod/perlre.pod pod/perltoc.pod pod/perltrap.pod Msg-ID: <199701132013.PAA26606@aatma.engin.umich.edu> (applied based on p5p patch as commit b2a07c1c241ec86f010fc0ea3bfa54c8ec28be90) Subject: Document new closure warnings From: Chip Salzenberg <chip@atlantic.net> Files: op.c pod/perldiag.pod Subject: Misc. doc patches missing in _20 Date: Tue, 07 Jan 1997 22:55:33 -0500 From: Roderick Schertler <roderick@gate.net> Files: pod/perlsub.pod pod/perltoc.pod pod/perlvar.pod Msg-ID: <102.852695733@eeyore.ibcinc.com> (applied based on p5p patch as commit b88f04ff2985d0899964b90ae56789d88f6b353e) LIBRARY AND EXTENSIONS Subject: Localize info about filesystems being case-forgiving From: Chip Salzenberg <chip@atlantic.net> Files: lib/File/Basename.pm pod/checkpods.PL pod/pod2html.PL pod/pod2latex.PL pod/pod2man.PL pod/pod2text.PL utils/c2ph.PL utils/h2ph.PL utils/h2xs.PL utils/perlbug.PL utils/perldoc.PL utils/pl2pm.PL utils/splain.PL x2p/find2perl.PL x2p/s2p.PL Subject: Eliminate warning from C<use overload> From: Chip Salzenberg <chip@atlantic.net> Files: lib/overload.pm OTHER CORE CHANGES Subject: Fix C< eval { my $x; eval '$x' } > From: Chip Salzenberg <chip@atlantic.net> Files: op.c t/op/misc.t Subject: Don't warn if eval '' uses outer func's lexicals From: Chip Salzenberg <chip@atlantic.net> Files: op.c Subject: Avoid memory wastage in wait(); make pidstatus global From: Chip Salzenberg <chip@atlantic.net> Files: global.sym interp.sym perl.c perl.h pp_sys.c Subject: Forbid ++ and -- on readonly values Date: Fri, 10 Jan 1997 19:47:16 -0800 (PST) From: "John Q. Linux" <jql@accessone.com> Files: pp.c pp_hot.c Msg-ID: <Pine.LNX.3.95.970110193330.11249D-100000@jql.accessone.com> (applied based on p5p patch as commit 74c80e585086695d5428ab316ca82fd6931aeabd) Subject: Keep array from dying during foreach(@array) From: Chip Salzenberg <chip@atlantic.net> Files: cop.h pp_ctl.c Subject: Fix C< $a="simple"; split /($a)/o > From: Chip Salzenberg <chip@atlantic.net> Files: pp.c t/op/misc.t Subject: Fix for anon-lists with tied entries coredump Date: Fri, 10 Jan 1997 02:45:11 -0500 From: Gurusamy Sarathy <gsar@engin.umich.edu> Files: pp.c Msg-ID: <199701100745.CAA13057@aatma.engin.umich.edu> (applied based on p5p patch as commit d976ac8220f8890bb7663152c4870f60e8e018c8) Subject: Don't set SVf_PADBUSY on immortal SVs From: Chip Salzenberg <chip@atlantic.net> Files: op.c Subject: Patch for Object subroutines Date: Tue, 7 Jan 1997 20:56:02 -0500 (EST) From: Ilya Zakharevich <ilya@math.ohio-state.edu> Files: cop.h Msg-ID: <199701080156.UAA15366@monk.mps.ohio-state.edu> (applied based on p5p patch as commit 174150afa5efdafc0e94a18211d3c9aa06b15cd9) Subject: Use an SVt_PVLV to hold stacked OP pointers when debugging From: Chip Salzenberg <chip@atlantic.net> Files: pp.c pp_hot.c Subject: Undo change that freed large pad vars From: Chip Salzenberg <chip@atlantic.net> Files: scope.c TESTS Subject: UNIVERSAL tests From: Roderick Schertler <roderick@gate.net> Files: MANIFEST t/op/universal.t Subject: Test deletion of array during foreach From: Jarkko Hietaniemi <jhi@alpha.hut.fi> Files: t/op/misc.t UTILITIES Subject: Don't search for pod if path is already valid Date: Wed, 08 Jan 1997 15:25:19 -0800 From: Wayne Scott <wscott@ichips.intel.com> Files: utils/perldoc.PL Msg-ID: <199701082325.PAA04521@pdxlx008.intel.com> (applied based on p5p patch as commit 88f0eda82bb679b4e6445ccb17e18d0781c6a5da) Subject: Yet another perldoc option Date: Thu, 3 Oct 1996 00:00:35 +0200 From: Gisle Aas <aas@aas.no> Files: utils/perldoc.PL Msg-ID: <199610022200.AAA15334@furubotn.sn.no> (applied based on p5p patch as commit a2333f3625faa17fb193cfa25c3d598cb59f105f) Subject: Re: perldoc, temp files, async pagers Date: 07 Jan 1997 22:54:14 -0500 From: Roderick Schertler <roderick@gate.net> Files: utils/perldoc.PL Msg-ID: <pzwwtoom8p.fsf@eeyore.ibcinc.com> (applied based on p5p patch as commit 7c36043de26da560a0f7eb04f36d232762c0092c)
Diffstat (limited to 'pod')
-rw-r--r--pod/checkpods.PL7
-rw-r--r--pod/perldiag.pod60
-rw-r--r--pod/perlfunc.pod4
-rw-r--r--pod/perlguts.pod18
-rw-r--r--pod/perlnews.pod15
-rw-r--r--pod/perlop.pod29
-rw-r--r--pod/perlre.pod5
-rw-r--r--pod/perlsub.pod28
-rw-r--r--pod/perltoc.pod43
-rw-r--r--pod/perltrap.pod20
-rw-r--r--pod/perlvar.pod16
-rw-r--r--pod/pod2html.PL6
-rw-r--r--pod/pod2latex.PL6
-rw-r--r--pod/pod2man.PL6
-rw-r--r--pod/pod2text.PL6
-rwxr-xr-xpod/roffitall251
-rwxr-xr-xpod/rofftoc66
17 files changed, 453 insertions, 133 deletions
diff --git a/pod/checkpods.PL b/pod/checkpods.PL
index 5265a19808..c4721a6118 100644
--- a/pod/checkpods.PL
+++ b/pod/checkpods.PL
@@ -12,11 +12,8 @@ use File::Basename qw(&basename &dirname);
# This forces PL files to create target in same directory as PL file.
# This is so that make depend always knows where to find PL derivatives.
-chdir(dirname($0));
-($file = basename($0)) =~ s/\.PL$//;
-$file =~ s/\.pl$//
- if ($Config{'osname'} eq 'VMS' or
- $Config{'osname'} eq 'OS2'); # "case-forgiving"
+chdir dirname($0);
+$file = basename($0, '.PL');
open OUT,">$file" or die "Can't create $file: $!";
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index fb0a2d76c0..d08d2dc452 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -754,6 +754,11 @@ to a matched substring is valid only as part of a regular expression pattern.
Trying to do this in ordinary Perl code produces a value that prints
out looking like SCALAR(0xdecaf). Use the $1 form instead.
+=item Can't use bareword ("%s") as %s ref while \"strict refs\" in use
+
+(F) Only hard references are allowed by "strict refs". Symbolic references
+are disallowed. See L<perlref>.
+
=item Can't use string ("%s") as %s ref while "strict refs" in use
(F) Only hard references are allowed by "strict refs". Symbolic references
@@ -1487,6 +1492,17 @@ will extend the buffer and zero pad the new area.
(F) An attempt was made to use an entry in an overloading table that
somehow no longer points to a valid method. See L<overload>.
+=item Stub found while resolving method `%s' overloading `%s' in package `%s'
+
+(P) Overloading resolution over @ISA tree may be broken by importing stubs.
+Stubs should never be implicitely created, but explicit calls to C<can>
+may break this.
+
+=item Cannot resolve method `%s' overloading `%s' in package `s'
+
+(P) Internal error trying to resolve overloading specified by a method
+name (as opposed to a subroutine reference).
+
=item Operator or semicolon missing before %s
(S) You used a variable or subroutine call where the parser was
@@ -2385,6 +2401,50 @@ something else of the same name (usually a subroutine) is exported
by that module. It usually means you put the wrong funny character
on the front of your variable.
+=item Variable "%s" may be unavailable
+
+(W) An inner (nested) I<anonymous> subroutine is inside a I<named>
+subroutine, and outside that is another subroutine; and the anonymous
+(innermost) subroutine is referencing a lexical variable defined in
+the outermost subroutine. For example:
+
+ sub outermost { my $a; sub middle { sub { $a } } }
+
+If the anonymous subroutine is called or referenced (directly or
+indirectly) from the outermost subroutine, it will share the variable
+as you would expect. But if the anonymous subroutine is called or
+referenced when the outermost subroutine is not active, it will see
+the value of the shared variable as it was before and during the
+*first* call to the outermost subroutine, which is probably not what
+you want.
+
+In these circumstances, it is usually best to make the middle
+subroutine anonymous, using the C<sub {}> syntax. Perl has specific
+support for shared variables in nested anonymous subroutines; a named
+subroutine in between interferes with this feature.
+
+=item Variable "%s" will not stay shared
+
+(W) An inner (nested) I<named> subroutine is referencing a lexical
+variable defined in an outer subroutine.
+
+When the inner subroutine is called, it will probably see the value of
+the outer subroutine's variable as it was before and during the
+*first* call to the outer subroutine; in this case, after the first
+call to the outer subroutine is complete, the inner and outer
+subroutines will no longer share a common value for the variable. In
+other words, the variable will no longer be shared.
+
+Furthermore, if the outer subroutine is anonymous and references a
+lexical variable outside itself, then the outer and inner subroutines
+will I<never> share the given variable.
+
+This problem can usually be solved by making the inner subroutine
+anonymous, using the C<sub {}> syntax. When inner anonymous subs that
+reference variables in outer subroutines are called or referenced,
+they are automatically re-bound to the current values of such
+variables.
+
=item Variable syntax.
(A) You've accidentally run your script through B<csh> instead
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index c1cd67d8ba..65bba93bbb 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -2132,7 +2132,9 @@ like shift().
Returns the offset of where the last C<m//g> search left off for the variable
is in question ($_ is used when the variable is not specified). May be
-modified to change that offset.
+modified to change that offset. Such modification will also influence
+the C<\G> zero-width assertion in regular expressions. See L<perlre> and
+L<perlop>.
=item print FILEHANDLE LIST
diff --git a/pod/perlguts.pod b/pod/perlguts.pod
index a3ae46588e..55014fb404 100644
--- a/pod/perlguts.pod
+++ b/pod/perlguts.pod
@@ -677,6 +677,7 @@ The current kinds of Magic Virtual Tables are:
i vtbl_isaelem @ISA array element
L 0 (but sets RMAGICAL) Perl Module/Debugger???
l vtbl_dbline Debugger?
+ o vtbl_collxfrm Locale transformation
P vtbl_pack Tied Array or Hash
p vtbl_packelem Tied Array or Hash element
q vtbl_packelem Tied Scalar or Handle
@@ -1232,13 +1233,20 @@ Returns a pointer to the stash for a specified package. See C<gv_stashpv>.
HV* gv_stashsv _((SV* sv, I32 create));
-=item GvSV
+=item he_free
-Return the SV from the GV.
+Releases a hash entry, such as while iterating though the hash. See
+C<hv_iternext>.
-=item he_free
+ void he_free _((HV* hv, HE* hent));
+
+=item he_delayfree
+
+Releases a hash entry, such as while iterating though the hash, but
+delays actual freeing of key and value until the end of the current
+statement (or thereabouts) with C<sv_2mortal>. See C<hv_iternext>.
-Releases a hash entry from an iterator. See C<hv_iternext>.
+ void he_delayfree _((HV* hv, HE* hent));
=item hv_clear
@@ -2589,4 +2597,4 @@ API Listing by Dean Roehrich <roehrich@cray.com>.
=head1 DATE
-Version 28: 1996/12/27
+Version 28.1: 1997/1/13
diff --git a/pod/perlnews.pod b/pod/perlnews.pod
index e6d1225a76..3cd71de7d1 100644
--- a/pod/perlnews.pod
+++ b/pod/perlnews.pod
@@ -23,7 +23,8 @@ file in the distribution for details.
There is a new Configure question that asks if you want to maintain
binary compatibility with Perl 5.003. If you choose binary
compatibility, you do not have to recompile your extensions, but you
-might have symbol conflicts if you embed Perl in another application.
+might have symbol conflicts if you embed Perl in another application,
+just as in the 5.003 release.
=head2 New Opcode Module and Revised Safe Module
@@ -186,6 +187,16 @@ function whose prototype you want to retrieve.
Functions documented in the Camel to default to $_ now in
fact do, and all those that do are so documented in L<perlfunc>.
+=head2 C<m//g> does not trigger a pos() reset on failure
+
+The C<m//g> match iteration construct used to reset the iteration
+when it failed to match (so that the next C<m//g> match would start at
+the beginning of the string). You now have to explicitly do a
+C<pos $str = 0;> to reset the "last match" position, or modify the
+string in some way. This change makes it practical to chain C<m//g>
+matches together in conjunction with ordinary matches using the C<\G>
+zero-width assertion. See L<perlop> and L<perlre>.
+
=back
=head2 New Built-in Methods
@@ -652,4 +663,4 @@ Constructed by Tom Christiansen, grabbing material with permission
from innumerable contributors, with kibitzing by more than a few Perl
porters.
-Last update: Tue Dec 24 16:45:14 EST 1996
+Last update: Tue Jan 14 14:03:02 EST 1997
diff --git a/pod/perlop.pod b/pod/perlop.pod
index a8f34c0e57..dd3aeab663 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -695,7 +695,10 @@ In a scalar context, C<m//g> iterates through the string, returning TRUE
each time it matches, and FALSE when it eventually runs out of
matches. (In other words, it remembers where it left off last time and
restarts the search at that point. You can actually find the current
-match position of a string using the pos() function--see L<perlfunc>.)
+match position of a string or set it using the pos() function--see
+L<perlfunc/pos>.) Note that you can use this feature to stack C<m//g>
+matches or intermix C<m//g> matches with C<m/\G.../>.
+
If you modify the string in any way, the match position is reset to the
beginning. Examples:
@@ -711,6 +714,30 @@ beginning. Examples:
}
print "$sentences\n";
+ # using m//g with \G
+ $_ = "ppooqppq";
+ while ($i++ < 2) {
+ print "1: '";
+ print $1 while /(o)/g; print "', pos=", pos, "\n";
+ print "2: '";
+ print $1 if /\G(q)/; print "', pos=", pos, "\n";
+ print "3: '";
+ print $1 while /(p)/g; print "', pos=", pos, "\n";
+ }
+
+The last example should print:
+
+ 1: 'oo', pos=4
+ 2: 'q', pos=4
+ 3: 'pp', pos=7
+ 1: '', pos=7
+ 2: 'q', pos=7
+ 3: '', pos=7
+
+Note how C<m//g> matches change the value reported by C<pos()>, but the
+non-global match doesn't.
+
+
=item q/STRING/
=item C<'STRING'>
diff --git a/pod/perlre.pod b/pod/perlre.pod
index 12f9f51016..a4c0a7d9de 100644
--- a/pod/perlre.pod
+++ b/pod/perlre.pod
@@ -174,7 +174,10 @@ represents backspace rather than a word boundary.) The C<\A> and C<\Z> are
just like "^" and "$" except that they won't match multiple times when the
C</m> modifier is used, while "^" and "$" will match at every internal line
boundary. To match the actual end of the string, not ignoring newline,
-you can use C<\Z(?!\n)>.
+you can use C<\Z(?!\n)>. The C<\G> assertion can be used to mix global
+matches (using C<m//g>) and non-global ones, as described in L<perlop>.
+The actual location where C<\G> will match can also be influenced
+by using C<pos()> as an lvalue. See L<perlfunc/pos>.
When the bracketing construct C<( ... )> is used, \E<lt>digitE<gt> matches the
digit'th substring. Outside of the pattern, always use "$" instead of "\"
diff --git a/pod/perlsub.pod b/pod/perlsub.pod
index bd3eb18154..c83f2da336 100644
--- a/pod/perlsub.pod
+++ b/pod/perlsub.pod
@@ -754,6 +754,34 @@ starts scribbling on your @_ parameter list.
This is all very powerful, of course, and should be used only in moderation
to make the world a better place.
+=head2 Constant Functions
+
+Functions with a prototype of C<()> are potential candidates for
+inlining. If the result after optimization and constant folding is a
+constant then it will be used in place of new-style calls to the
+function. Old-style calls (that is, calls made using C<&>) are not
+affected.
+
+All of the following functions would be inlined.
+
+ sub PI () { 3.14159 }
+ sub ST_DEV () { 0 }
+ sub ST_INO () { 1 }
+
+ sub FLAG_FOO () { 1 << 8 }
+ sub FLAG_BAR () { 1 << 9 }
+ sub FLAG_MASK () { FLAG_FOO | FLAG_BAR }
+
+ sub OPT_BAZ () { 1 }
+ sub BAZ_VAL () {
+ if (OPT_BAZ) {
+ return 23;
+ }
+ else {
+ return 42;
+ }
+ }
+
If you redefine a subroutine which was eligible for inlining you'll get
a mandatory warning. (You can use this warning to tell whether or not a
particular subroutine is considered constant.) The warning is
diff --git a/pod/perltoc.pod b/pod/perltoc.pod
index cbc17857a4..b8353fcdb1 100644
--- a/pod/perltoc.pod
+++ b/pod/perltoc.pod
@@ -68,6 +68,8 @@ delete on slices, flock, keys as an lvalue, my() in Control Structures,
unpack() and pack(), use VERSION, use Module VERSION LIST,
prototype(FUNCTION), $_ as Default
+=item C<m//g> does not trigger a pos() reset on failure
+
=item New Built-in Methods
isa(CLASS), can(METHOD), VERSION( [NEED] ), class(), is_instance()
@@ -426,6 +428,8 @@ $ARGV, @ARGV, @INC, %INC, $ENV{expr}, $SIG{expr}
=item Prototypes
+=item Constant Functions
+
=item Overriding Builtin Functions
=item Autoloading
@@ -1107,7 +1111,8 @@ Precedence
=item General Regular Expression Traps using s///, etc.
Regular Expression, Regular Expression, Regular Expression, Regular
-Expression, Regular Expression, Regular Expression, Regular Expression
+Expression, Regular Expression, Regular Expression, Regular Expression,
+Regular Expression
=item Subroutine, Signal, Sorting Traps
@@ -1417,24 +1422,24 @@ av_shift, av_store, av_undef, av_unshift, CLASS, Copy, croak, CvSTASH,
DBsingle, DBsub, DBtrace, dMARK, dORIGMARK, dowarn, dSP, dXSARGS, dXSI32,
dXSI32, ENTER, EXTEND, FREETMPS, G_ARRAY, G_DISCARD, G_EVAL, GIMME,
G_NOARGS, G_SCALAR, gv_fetchmeth, gv_fetchmethod, gv_stashpv, gv_stashsv,
-GvSV, he_free, hv_clear, hv_delete, hv_exists, hv_fetch, hv_iterinit,
-hv_iterkey, hv_iternext, hv_iternextsv, hv_iterval, hv_magic, HvNAME,
-hv_store, hv_undef, isALNUM, isALPHA, isDIGIT, isLOWER, isSPACE, isUPPER,
-items, ix, LEAVE, MARK, mg_clear, mg_copy, mg_find, mg_free, mg_get,
-mg_len, mg_magical, mg_set, Move, na, New, Newc, Newz, newAV, newHV,
-newRV_inc, newRV_noinc, newSV, newSViv, newSVnv, newSVpv, newSVrv, newSVsv,
-newXS, newXSproto, Nullav, Nullch, Nullcv, Nullhv, Nullsv, ORIGMARK,
-perl_alloc, perl_call_argv, perl_call_method, perl_call_pv, perl_call_sv,
-perl_construct, perl_destruct, perl_eval_sv, perl_free, perl_get_av,
-perl_get_cv, perl_get_hv, perl_get_sv, perl_parse, perl_require_pv,
-perl_run, POPi, POPl, POPp, POPn, POPs, PUSHMARK, PUSHi, PUSHn, PUSHp,
-PUSHs, PUTBACK, Renew, Renewc, RETVAL, safefree, safemalloc, saferealloc,
-savepv, savepvn, SAVETMPS, SP, SPAGAIN, ST, strEQ, strGE, strGT, strLE,
-strLT, strNE, strnEQ, strnNE, sv_2mortal, sv_bless, sv_catpv, sv_catpvn,
-sv_catsv, sv_cmp, sv_cmp, SvCUR, SvCUR_set, sv_dec, sv_dec, SvEND, sv_eq,
-SvGROW, sv_grow, sv_inc, SvIOK, SvIOK_off, SvIOK_on, SvIOK_only,
-SvIOK_only, SvIOKp, sv_isa, SvIV, sv_isobject, SvIVX, SvLEN, sv_len,
-sv_len, sv_magic, sv_mortalcopy, SvOK, sv_newmortal, sv_no, SvNIOK,
+he_free, he_delayfree, hv_clear, hv_delete, hv_exists, hv_fetch,
+hv_iterinit, hv_iterkey, hv_iternext, hv_iternextsv, hv_iterval, hv_magic,
+HvNAME, hv_store, hv_undef, isALNUM, isALPHA, isDIGIT, isLOWER, isSPACE,
+isUPPER, items, ix, LEAVE, MARK, mg_clear, mg_copy, mg_find, mg_free,
+mg_get, mg_len, mg_magical, mg_set, Move, na, New, Newc, Newz, newAV,
+newHV, newRV_inc, newRV_noinc, newSV, newSViv, newSVnv, newSVpv, newSVrv,
+newSVsv, newXS, newXSproto, Nullav, Nullch, Nullcv, Nullhv, Nullsv,
+ORIGMARK, perl_alloc, perl_call_argv, perl_call_method, perl_call_pv,
+perl_call_sv, perl_construct, perl_destruct, perl_eval_sv, perl_free,
+perl_get_av, perl_get_cv, perl_get_hv, perl_get_sv, perl_parse,
+perl_require_pv, perl_run, POPi, POPl, POPp, POPn, POPs, PUSHMARK, PUSHi,
+PUSHn, PUSHp, PUSHs, PUTBACK, Renew, Renewc, RETVAL, safefree, safemalloc,
+saferealloc, savepv, savepvn, SAVETMPS, SP, SPAGAIN, ST, strEQ, strGE,
+strGT, strLE, strLT, strNE, strnEQ, strnNE, sv_2mortal, sv_bless, sv_catpv,
+sv_catpvn, sv_catsv, sv_cmp, sv_cmp, SvCUR, SvCUR_set, sv_dec, sv_dec,
+SvEND, sv_eq, SvGROW, sv_grow, sv_inc, SvIOK, SvIOK_off, SvIOK_on,
+SvIOK_only, SvIOK_only, SvIOKp, sv_isa, SvIV, sv_isobject, SvIVX, SvLEN,
+sv_len, sv_len, sv_magic, sv_mortalcopy, SvOK, sv_newmortal, sv_no, SvNIOK,
SvNIOK_off, SvNIOKp, SvNOK, SvNOK_off, SvNOK_on, SvNOK_only, SvNOK_only,
SvNOKp, SvNV, SvNVX, SvPOK, SvPOK_off, SvPOK_on, SvPOK_only, SvPOK_only,
SvPOKp, SvPV, SvPVX, SvREFCNT, SvREFCNT_dec, SvREFCNT_inc, SvROK,
diff --git a/pod/perltrap.pod b/pod/perltrap.pod
index b8247a4208..4b56dd23d8 100644
--- a/pod/perltrap.pod
+++ b/pod/perltrap.pod
@@ -1108,6 +1108,26 @@ repeatedly, like C</x/> or C<m!x!>.
# perl5 prints: perl5
+=item * Regular Expression
+
+Under perl4 and upto version 5.003, a failed C<m//g> match used to
+reset the internal iterator, so that subsequent C<m//g> match attempts
+began from the beginning of the string. In perl version 5.004 and later,
+failed C<m//g> matches do not reset the iterator position (which can be
+found using the C<pos()> function--see L<perlfunc/pos>).
+
+ $test = "foop";
+ for (1..3) {
+ print $1 while ($test =~ /(o)/g);
+ # pos $test = 0; # to get old behavior
+ }
+
+ # perl4 prints: oooooo
+ # perl5.004 prints: oo
+
+You may always reset the iterator yourself as shown in the commented line
+to get the old behavior.
+
=back
=head2 Subroutine, Signal, Sorting Traps
diff --git a/pod/perlvar.pod b/pod/perlvar.pod
index a049e9d5a1..de9bd22348 100644
--- a/pod/perlvar.pod
+++ b/pod/perlvar.pod
@@ -698,6 +698,22 @@ sometimes it's a string representing the function, and sometimes it's
going to call the subroutine call right then and there! Best to be sure
and quote it or take a reference to it. *Plumber works too. See L<perlsub>.
+If your system has the sigaction() function then signal handlers are
+installed using it. This means you get reliable signal handling. If
+your system has the SA_RESTART flag it is used when signals handlers are
+installed. This means that system calls for which it is supported
+continue rather than returning when a signal arrives. If you want your
+system calls to be interrupted by signal delivery then do something like
+this:
+
+ use POSIX ':signal_h';
+
+ my $alarm = 0;
+ sigaction SIGALRM, new POSIX::SigAction sub { $alarm = 1 }
+ or die "Error setting SIGALRM handler: $!\n";
+
+See L<POSIX>.
+
Certain internal hooks can be also set using the %SIG hash. The
routine indicated by C<$SIG{__WARN__}> is called when a warning message is
about to be printed. The warning message is passed as the first
diff --git a/pod/pod2html.PL b/pod/pod2html.PL
index b97c00ccb4..816fb6ba4c 100644
--- a/pod/pod2html.PL
+++ b/pod/pod2html.PL
@@ -12,10 +12,8 @@ use File::Basename qw(&basename &dirname);
# This forces PL files to create target in same directory as PL file.
# This is so that make depend always knows where to find PL derivatives.
-chdir(dirname($0));
-($file = basename($0)) =~ s/\.PL$//;
-$file =~ s/\.pl$//
- if ($^O eq 'VMS' or $^O eq 'os2'); # "case-forgiving"
+chdir dirname($0);
+$file = basename($0, '.PL');
open OUT,">$file" or die "Can't create $file: $!";
diff --git a/pod/pod2latex.PL b/pod/pod2latex.PL
index 4f79c1297f..9702614ffa 100644
--- a/pod/pod2latex.PL
+++ b/pod/pod2latex.PL
@@ -12,10 +12,8 @@ use File::Basename qw(&basename &dirname);
# This forces PL files to create target in same directory as PL file.
# This is so that make depend always knows where to find PL derivatives.
-chdir(dirname($0));
-($file = basename($0)) =~ s/\.PL$//;
-$file =~ s/\.pl$//
- if ($^O eq 'VMS' or $^O eq 'os2'); # "case-forgiving"
+chdir dirname($0);
+$file = basename($0, '.PL');
open OUT,">$file" or die "Can't create $file: $!";
diff --git a/pod/pod2man.PL b/pod/pod2man.PL
index 6821d84334..5d1e193a34 100644
--- a/pod/pod2man.PL
+++ b/pod/pod2man.PL
@@ -12,10 +12,8 @@ use File::Basename qw(&basename &dirname);
# This forces PL files to create target in same directory as PL file.
# This is so that make depend always knows where to find PL derivatives.
-chdir(dirname($0));
-($file = basename($0)) =~ s/\.PL$//;
-$file =~ s/\.pl$//
- if ($^O eq 'VMS' or $^O eq 'os2' or $^O eq 'amigaos'); # "case-forgiving"
+chdir dirname($0);
+$file = basename($0, '.PL');
open OUT,">$file" or die "Can't create $file: $!";
diff --git a/pod/pod2text.PL b/pod/pod2text.PL
index 033a0d8f55..586da04e0f 100644
--- a/pod/pod2text.PL
+++ b/pod/pod2text.PL
@@ -12,10 +12,8 @@ use File::Basename qw(&basename &dirname);
# This forces PL files to create target in same directory as PL file.
# This is so that make depend always knows where to find PL derivatives.
-chdir(dirname($0));
-($file = basename($0)) =~ s/\.PL$//;
-$file =~ s/\.pl$//
- if ($^O eq 'VMS' or $^O eq 'os2'); # "case-forgiving"
+chdir dirname($0);
+$file = basename($0, '.PL');
open OUT,">$file" or die "Can't create $file: $!";
diff --git a/pod/roffitall b/pod/roffitall
index 3df9386103..6bf47afad4 100755
--- a/pod/roffitall
+++ b/pod/roffitall
@@ -1,86 +1,171 @@
#!/bin/sh
-#psroff -t -man -rC1 -rD1 -rF1 > /tmp/PerlDoc.ps 2>/tmp/PerlTOC.raw \
-nroff -man -rC1 -rD1 -rF1 > /tmp/PerlDoc.txt 2>/tmp/PerlTOC.nr.raw \
- /usr/local/man/man1/perl.1 \
- /usr/local/man/man1/perlnews.1 \
- /usr/local/man/man1/perldata.1 \
- /usr/local/man/man1/perlsyn.1 \
- /usr/local/man/man1/perlop.1 \
- /usr/local/man/man1/perlre.1 \
- /usr/local/man/man1/perlrun.1 \
- /usr/local/man/man1/perllocale.1 \
- /usr/local/man/man1/perlfunc.1 \
- /usr/local/man/man1/perlvar.1 \
- /usr/local/man/man1/perlsub.1 \
- /usr/local/man/man1/perlmod.1 \
- /usr/local/man/man1/perlref.1 \
- /usr/local/man/man1/perldsc.1 \
- /usr/local/man/man1/perllol.1 \
- /usr/local/man/man1/perlobj.1 \
- /usr/local/man/man1/perltie.1 \
- /usr/local/man/man1/perlbot.1 \
- /usr/local/man/man1/perldebug.1 \
- /usr/local/man/man1/perldiag.1 \
- /usr/local/man/man1/perlform.1 \
- /usr/local/man/man1/perlipc.1 \
- /usr/local/man/man1/perlsec.1 \
- /usr/local/man/man1/perltrap.1 \
- /usr/local/man/man1/perlstyle.1 \
- /usr/local/man/man1/perlxs.1 \
- /usr/local/man/man1/perlxstut.1 \
- /usr/local/man/man1/perlguts.1 \
- /usr/local/man/man1/perlcall.1 \
- /usr/local/man/man1/perlembed.1 \
- /usr/local/man/man1/perlpod.1 \
- /usr/local/man/man1/perlbook.1 \
+#
+# Usage: roffitall [-nroff|-psroff|-groff]
+#
+# Authors: Tom Christiansen, Raphael Manfredi
+
+me=roffitall
+tmp=.
+
+#manroot=/usr/local
+#libroot=/usr/local
+
+manroot=$HOME/usr
+libroot=$HOME/usr/lib/perl5
+
+case "$1" in
+-nroff) cmd="nroff -man"; ext='txt';;
+-psroff) cmd="psroff -t"; ext='ps';;
+-groff) cmd="groff -man"; ext='ps';;
+*)
+ echo "Usage: roffitall [-nroff|-psroff|-groff]" >&2
+ exit 1
+ ;;
+esac
+
+toroff=`
+ echo \
+ $manroot/man/man1/perl.1 \
+ $manroot/man/man1/perlnews.1 \
+ $manroot/man/man1/perldata.1 \
+ $manroot/man/man1/perlsyn.1 \
+ $manroot/man/man1/perlop.1 \
+ $manroot/man/man1/perlre.1 \
+ $manroot/man/man1/perlrun.1 \
+ $manroot/man/man1/perllocale.1 \
+ $manroot/man/man1/perlfunc.1 \
+ $manroot/man/man1/perlvar.1 \
+ $manroot/man/man1/perlsub.1 \
+ $manroot/man/man1/perlmod.1 \
+ $manroot/man/man1/perlref.1 \
+ $manroot/man/man1/perldsc.1 \
+ $manroot/man/man1/perllol.1 \
+ $manroot/man/man1/perlobj.1 \
+ $manroot/man/man1/perltie.1 \
+ $manroot/man/man1/perlbot.1 \
+ $manroot/man/man1/perldebug.1 \
+ $manroot/man/man1/perldiag.1 \
+ $manroot/man/man1/perlform.1 \
+ $manroot/man/man1/perlipc.1 \
+ $manroot/man/man1/perlsec.1 \
+ $manroot/man/man1/perltrap.1 \
+ $manroot/man/man1/perlstyle.1 \
+ $manroot/man/man1/perlapio.1 \
+ $manroot/man/man1/perlxs.1 \
+ $manroot/man/man1/perlxstut.1 \
+ $manroot/man/man1/perlguts.1 \
+ $manroot/man/man1/perlcall.1 \
+ $manroot/man/man1/perlembed.1 \
+ $manroot/man/man1/perlpod.1 \
+ $manroot/man/man1/perlbook.1 \
\
- /usr/local/man/man3/diagnostics.3 \
- /usr/local/man/man3/integer.3 \
- /usr/local/man/man3/less.3 \
- /usr/local/man/man3/lib.3 \
- /usr/local/man/man3/overload.3 \
- /usr/local/man/man3/sigtrap.3 \
- /usr/local/man/man3/strict.3 \
- /usr/local/man/man3/subs.3 \
+ $libroot/man/man3/blib.3 \
+ $libroot/man/man3/diagnostics.3 \
+ $libroot/man/man3/integer.3 \
+ $libroot/man/man3/less.3 \
+ $libroot/man/man3/lib.3 \
+ $libroot/man/man3/localle.3 \
+ $libroot/man/man3/overload.3 \
+ $libroot/man/man3/sigtrap.3 \
+ $libroot/man/man3/strict.3 \
+ $libroot/man/man3/subs.3 \
+ $libroot/man/man3/vars.3 \
\
- /usr/local/man/man3/AnyDBM_File.3 \
- /usr/local/man/man3/AutoLoader.3 \
- /usr/local/man/man3/AutoSplit.3 \
- /usr/local/man/man3/Benchmark.3 \
- /usr/local/man/man3/Carp.3 \
- /usr/local/man/man3/Config.3 \
- /usr/local/man/man3/Cwd.3 \
- /usr/local/man/man3/DB_File.3 \
- /usr/local/man/man3/Devel::SelfStubber.3 \
- /usr/local/man/man3/DynaLoader.3 \
- /usr/local/man/man3/English.3 \
- /usr/local/man/man3/Env.3 \
- /usr/local/man/man3/Exporter.3 \
- /usr/local/man/man3/ExtUtils::Liblist.3 \
- /usr/local/man/man3/ExtUtils::MakeMaker.3 \
- /usr/local/man/man3/ExtUtils::Manifest.3 \
- /usr/local/man/man3/ExtUtils::Mkbootstrap.3 \
- /usr/local/man/man3/Fcntl.3 \
- /usr/local/man/man3/File::Basename.3 \
- /usr/local/man/man3/File::CheckTree.3 \
- /usr/local/man/man3/File::Find.3 \
- /usr/local/man/man3/FileHandle.3 \
- /usr/local/man/man3/File::Path.3 \
- /usr/local/man/man3/Getopt::Long.3 \
- /usr/local/man/man3/Getopt::Std.3 \
- /usr/local/man/man3/I18N::Collate.3 \
- /usr/local/man/man3/IPC::Open2.3 \
- /usr/local/man/man3/IPC::Open3.3 \
- /usr/local/man/man3/Net::Ping.3 \
- /usr/local/man/man3/POSIX.3 \
- /usr/local/man/man3/Safe.3 \
- /usr/local/man/man3/SelfLoader.3 \
- /usr/local/man/man3/Socket.3 \
- /usr/local/man/man3/Sys::Hostname.3 \
- /usr/local/man/man3/Term::Cap.3 \
- /usr/local/man/man3/Term::Complete.3 \
- /usr/local/man/man3/Test::Harness.3 \
- /usr/local/man/man3/Text::Abbrev.3 \
- /usr/local/man/man3/Text::Soundex.3 \
- /usr/local/man/man3/TieHash.3 \
- /usr/local/man/man3/Time::Local.3
+ $libroot/man/man3/AnyDBM_File.3 \
+ $libroot/man/man3/AutoLoader.3 \
+ $libroot/man/man3/AutoSplit.3 \
+ $libroot/man/man3/Benchmark.3 \
+ $libroot/man/man3/Carp.3 \
+ $libroot/man/man3/Config.3 \
+ $libroot/man/man3/Cwd.3 \
+ $libroot/man/man3/DB_File.3 \
+ $libroot/man/man3/Devel::SelfStubber.3 \
+ $libroot/man/man3/DynaLoader.3 \
+ $libroot/man/man3/English.3 \
+ $libroot/man/man3/Env.3 \
+ $libroot/man/man3/Exporter.3 \
+ $libroot/man/man3/ExtUtils::Embed.3 \
+ $libroot/man/man3/ExtUtils::Install.3 \
+ $libroot/man/man3/ExtUtils::Liblist.3 \
+ $libroot/man/man3/ExtUtils::MakeMaker.3 \
+ $libroot/man/man3/ExtUtils::Manifest.3 \
+ $libroot/man/man3/ExtUtils::Mkbootstrap.3 \
+ $libroot/man/man3/ExtUtils::Mksymlists.3 \
+ $libroot/man/man3/Fatal.3 \
+ $libroot/man/man3/Fcntl.3 \
+ $libroot/man/man3/File::Basename.3 \
+ $libroot/man/man3/File::CheckTree.3 \
+ $libroot/man/man3/File::Copy.3 \
+ $libroot/man/man3/File::Compare.3 \
+ $libroot/man/man3/File::Find.3 \
+ $libroot/man/man3/File::Path.3 \
+ $libroot/man/man3/File::stat.3 \
+ $libroot/man/man3/FileCache.3 \
+ $libroot/man/man3/FileHandle.3 \
+ $libroot/man/man3/FindBin.3 \
+ $libroot/man/man3/Getopt::Long.3 \
+ $libroot/man/man3/Getopt::Std.3 \
+ $libroot/man/man3/I18N::Collate.3 \
+ $libroot/man/man3/IO.3 \
+ $libroot/man/man3/IO::File.3 \
+ $libroot/man/man3/IO::Handle.3 \
+ $libroot/man/man3/IO::Pipe.3 \
+ $libroot/man/man3/IO::Seekable.3 \
+ $libroot/man/man3/IO::Select.3 \
+ $libroot/man/man3/IO::Socket.3 \
+ $libroot/man/man3/IPC::Open2.3 \
+ $libroot/man/man3/IPC::Open3.3 \
+ $libroot/man/man3/Math::BigFloat.3 \
+ $libroot/man/man3/Math::BigInt.3 \
+ $libroot/man/man3/Math::Complex.3 \
+ $libroot/man/man3/Net::Ping.3 \
+ $libroot/man/man3/Net::hostent.3 \
+ $libroot/man/man3/Net::netent.3 \
+ $libroot/man/man3/Net::protoent.3 \
+ $libroot/man/man3/Net::servent.3 \
+ $libroot/man/man3/Opcode.3 \
+ $libroot/man/man3/POSIX.3 \
+ $libroot/man/man3/Pod::Text.3 \
+ $libroot/man/man3/Safe.3 \
+ $libroot/man/man3/Search::Dict.3 \
+ $libroot/man/man3/SelectSaver.3 \
+ $libroot/man/man3/SelfLoader.3 \
+ $libroot/man/man3/Shell.3 \
+ $libroot/man/man3/Socket.3 \
+ $libroot/man/man3/Symbol.3 \
+ $libroot/man/man3/Sys::Hostname.3 \
+ $libroot/man/man3/Sys::Syslog.3 \
+ $libroot/man/man3/Term::Cap.3 \
+ $libroot/man/man3/Term::Complete.3 \
+ $libroot/man/man3/Test::Harness.3 \
+ $libroot/man/man3/Text::Abbrev.3 \
+ $libroot/man/man3/Text::ParseWords.3 \
+ $libroot/man/man3/Text::Soundex.3 \
+ $libroot/man/man3/Text::Tabs.3 \
+ $libroot/man/man3/Tie::Hash.3 \
+ $libroot/man/man3/Tie::RefHash.3 \
+ $libroot/man/man3/Tie::Scalar.3 \
+ $libroot/man/man3/Tie::SubstrHash.3 \
+ $libroot/man/man3/Time::Local.3 \
+ $libroot/man/man3/Time::gmtime.3 \
+ $libroot/man/man3/Time::localtime.3 \
+ $libroot/man/man3/Time::tm.3 \
+ $libroot/man/man3/UNIVERSAL.3 \
+ $libroot/man/man3/User::grent.3 \
+ $libroot/man/man3/User::pwent.3 | \
+perl -ne 'map { -r && print "$_ " } split'`
+
+#psroff -t -man -rC1 -rD1 -rF1 > $tmp/PerlDoc.ps 2>$tmp/PerlTOC.raw
+#nroff -man -rC1 -rD1 -rF1 > $tmp/PerlDoc.txt 2>$tmp/PerlTOC.nr.raw
+
+run="$cmd -rC1 -rD1 -rF1 >$tmp/PerlDoc.$ext 2>$tmp/PerlTOC.$ext.raw"
+echo "$me: running $run"
+eval $run $toroff
+echo "$me: parsing TOC"
+./rofftoc $tmp/PerlTOC.$ext.raw > $tmp/PerlTOC.tmp.man
+run="$cmd $tmp/PerlTOC.tmp.man >$tmp/PerlTOC.$ext"
+echo "$me: running $run"
+eval $run
+rm -f $tmp/PerlTOC.tmp.man $tmp/PerlTOC.$ext.raw
+echo "$me: leaving you with $tmp/PerlDoc.$ext and $tmp/PerlTOC.$ext"
+
diff --git a/pod/rofftoc b/pod/rofftoc
index e69de29bb2..a2d0e7ba20 100755
--- a/pod/rofftoc
+++ b/pod/rofftoc
@@ -0,0 +1,66 @@
+# feed this into perl
+ eval 'exec perl -S $0 ${1+"$@"}'
+ if $running_under_some_shell;
+
+# Usage: rofftoc PerlTOC.xxx.raw
+#
+# Post-processes roffitall output. Called from roffitall to produce
+# a formatted table of contents.
+#
+# Author: Tom Christiansen
+
+print <<'EOF';
+.de NP
+'.sp 0.8i
+.tl ''- % -''
+'bp
+'sp 0.5i
+.tl ''\fB\s+2Perl Table of Contents\s0\fR''
+'sp 0.3i
+..
+.wh -1i NP
+.af % i
+.sp 0.5i
+.tl ''\fB\s+5Perl Table of Contents\s0\fR''
+.sp 0.5i
+.nf
+.na
+EOF
+while (<>) {
+ #chomp;
+ s/Index://;
+ ($type, $page, $desc) = split ' ', $_, 3;
+ $desc =~ s/^"(.*)"$/$1/;
+ if ($type eq 'Title') {
+ ($name = $desc) =~ s/ .*//;
+ next;
+ } elsif ($type eq 'Name') {
+ #print STDERR $page, "\t", $desc;
+ print ".ne 5\n";
+ print ".in 0\n";
+ print ".sp\n";
+ print ".ft B\n";
+ print "$desc\n";
+ print ".ft P\n";
+ print ".in 5n\n";
+ } elsif ($type eq 'Header') {
+ print ".br\n", $page, "\t", $desc;
+ } elsif ($type eq 'Subsection') {
+ print ".br\n", $page, "\t\t", $desc;
+ } elsif ($type eq 'Item') {
+ next if $desc =~ /\\bu/;
+ next unless $name =~ /POSIX|func/i;
+ print ".br\n", $page, "\t\t\t", $desc;
+ }
+}
+__END__
+Index:Title 1 "PERL 1"
+Index:Name 1 "perl - Practical Extraction and Report Language"
+Index:Header 1 "NAME"
+Index:Header 1 "SYNOPSIS"
+Index:Header 2 "DESCRIPTION"
+Index:Item 2 "\(bu Many usability enhancements"
+Index:Item 2 "\(bu Simplified grammar"
+Index:Item 2 "\(bu Lexical scoping"
+Index:Item 2 "\(bu Arbitrarily nested data structures"
+Index:Item 2 "\(bu Modularity and reusability"