This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
12 years agoThe parser should always close the file handle that it opened.
Nicholas Clark [Fri, 24 Feb 2012 15:13:29 +0000 (16:13 +0100)]
The parser should always close the file handle that it opened.

Previously it would leave the file handle open if it was (equal to) stdin,
on the assumption that this must have been because no script name was
supplied on the interpreter command line, so the interpreter was defaulting
to reading the script from standard input.

However, if the program has closed STDIN, then the next file handle opened
(for any reason) will have file descriptor 0. So in this situation, the
handle that require opened to read the module would be mistaken for the above
situation and left open. Effectively, this leaked a file handle.

This is now fixed, by explicitly tracking from parser creation time whether
it should keep the file handle open, and only setting this flag when
defaulting to reading the main program from standard input. This resolves
RT #37033.

12 years agoMove the close-on-exec logic to one place, at the end of S_open_script().
Nicholas Clark [Thu, 23 Feb 2012 16:45:26 +0000 (17:45 +0100)]
Move the close-on-exec logic to one place, at the end of S_open_script().

Now that the logic for stdin is implemented as an early return of NULL from
S_open_script(), in all cases that reach the end of S_open_script(), rsfp
is non-NULL, and a file handle that we wish to set to close on exec.

12 years agoChange S_open_script() to return NULL to signal "read from stdin".
Nicholas Clark [Thu, 23 Feb 2012 16:35:31 +0000 (17:35 +0100)]
Change S_open_script() to return NULL to signal "read from stdin".

Move the logic to assign PerlIO_stdin() to rsfp from S_open_script() to its
only caller, S_parse_body().

12 years agoIn perl.c, change S_open_script() to return rsfp.
Nicholas Clark [Thu, 23 Feb 2012 14:44:33 +0000 (15:44 +0100)]
In perl.c, change S_open_script() to return rsfp.

Previously it was being passed &rsfp as a parameter, because it was
returning another value, fdscript. However, the return value has been
ignored since commit cc69b689ee7c2745 removed suidperl in January 2009.

12 years agoIn struct yy_parser, change lex_flags to a U8, from part of a bitfield.
Nicholas Clark [Thu, 23 Feb 2012 10:41:01 +0000 (11:41 +0100)]
In struct yy_parser, change lex_flags to a U8, from part of a bitfield.

lex_flags holds 4 flag bits, with multiple flag bits manipulated together
at times, so they can't be split out into individual bitfields. This change
permits the C compiler to generate simpler code, reducing toke.o by about
400 bytes on this platform, but doesn't change the size of the structure.

lex_flags was added in commit 802a15e9c01d1a0b in August 2011, so is not in
any stable release.

12 years agoImprove the tests for -x
Nicholas Clark [Sun, 26 Feb 2012 14:24:21 +0000 (15:24 +0100)]
Improve the tests for -x

Test the error message generated when -x can't find a "#!perl" line.
Test that this error message still appears when -x is used with -e.

12 years agoImprove the tests for the -n and -p switches.
Nicholas Clark [Sun, 26 Feb 2012 13:15:02 +0000 (14:15 +0100)]
Improve the tests for the -n and -p switches.

Verify that -p actually runs the code in the program body.
Verify that -n doesn't implicitly print out the contents of $_.
For both, verify that an END block runs after the implicit loop.

12 years agoSimplify platform specific code in t/run/cloexec.t
Nicholas Clark [Sun, 26 Feb 2012 13:10:35 +0000 (14:10 +0100)]
Simplify platform specific code in t/run/cloexec.t

Don't assign to two lexical variables, $Is_VMS and $Is_Win32, only to use
them immediately for the same purpose - to skip the entire test.
In turn, there's no need to conditionally set $quote to a value suitable for
VMS or Win32, when neither OS ever runs the test.

The code has been this way since the file was added by commit
742218b34f58f961 in Nov 2006. Hence I don't think that the vestigial $quote
logic corresponds to pre-commit version that did run on these platforms.
Instead I infer that it has come from t/op/exec.t, used as a template for
running sub-scripts in a portable fashion.

12 years agoperldiag: Reflow for better splain output
Father Chrysostomos [Mon, 27 Feb 2012 01:25:24 +0000 (17:25 -0800)]
perldiag: Reflow for better splain output

12 years agoAdd an example how to fix '%s: command not found'
Max Maischein [Sun, 19 Feb 2012 20:04:34 +0000 (21:04 +0100)]
Add an example how to fix '%s: command not found'

12 years agoIncrease $attributes::VERSION to 0.18
Father Chrysostomos [Mon, 27 Feb 2012 00:15:03 +0000 (16:15 -0800)]
Increase $attributes::VERSION to 0.18

12 years agodoco improvement for attributes.pm
David Cantrell [Mon, 27 Feb 2012 00:13:18 +0000 (16:13 -0800)]
doco improvement for attributes.pm

It seems that many people have trouble understanding how to add custom
attributes to their subroutines.  Here's a doc patch that will
hopefully make things clearer:

12 years agoMake CPAN upstream for File::Temp
Father Chrysostomos [Sat, 25 Feb 2012 22:39:49 +0000 (14:39 -0800)]
Make CPAN upstream for File::Temp

It was set to undef, which meant it hadn’t been discussed.  In actuality,
it is actively maintained on CPAN.  See, for instance:

    https://rt.cpan.org/Ticket/Display.html?id=75077#txn-1038945

So this brings Maintainers.pl closer in line with reality.

12 years agoDon’t ‘normalise’ hints for bare ‘no feature’
Father Chrysostomos [Sat, 25 Feb 2012 22:26:13 +0000 (14:26 -0800)]
Don’t ‘normalise’ hints for bare ‘no feature’

‘Normalise’ in this case means to set $^H to indicate that features
are in %^H (FEATURE_BUNDLE_CUSTOM) and to make %^H contain the current
feature set.

Since ‘no feature’ sets the default feature bundle in $^H, this is
unnecessary in that case.

12 years agoregen/feature.pl: Show perl.h line num in error msg
Father Chrysostomos [Sat, 25 Feb 2012 22:14:07 +0000 (14:14 -0800)]
regen/feature.pl: Show perl.h line num in error msg

12 years agoperlfunc: bad wording
Father Chrysostomos [Sat, 25 Feb 2012 22:00:30 +0000 (14:00 -0800)]
perlfunc: bad wording

It is not features not in the current version, but those not in the
requested version, that are disabled.

12 years agoarybase.xs: Wrap PL_check safely
Father Chrysostomos [Sat, 25 Feb 2012 21:57:30 +0000 (13:57 -0800)]
arybase.xs: Wrap PL_check safely

12 years agoIncrease $arybase::VERSION to 0.05
Father Chrysostomos [Sat, 25 Feb 2012 21:54:51 +0000 (13:54 -0800)]
Increase $arybase::VERSION to 0.05

12 years agodon't taint $$ determined by getpid()
Zefram [Sat, 25 Feb 2012 20:32:09 +0000 (20:32 +0000)]
don't taint $$ determined by getpid()

Reading $$ in a tainted expression was tainting the internal sv_setiv()
on $$.  Since the value being set came directly from getpid(), it's
always safe, so override the tainting there.  Fixes [perl #109688].

12 years agoupdate perlfunc.html generator
Zefram [Sat, 25 Feb 2012 19:19:06 +0000 (19:19 +0000)]
update perlfunc.html generator

The format of the individual function HTML files has changed.  The index
generator needs to update to successfully extract the NAME sections.
Fixes [perl #107870].

12 years agodelay allocating trans table until needed
Zefram [Sat, 25 Feb 2012 15:41:17 +0000 (15:41 +0000)]
delay allocating trans table until needed

Previously, a table was being allocated for OP_TRANS(|R), in a
PVOP arrangement, as soon as the op was built.  However, it wasn't
used immediately, and for UTF8-flagged ops it would be thrown away,
replaced by an SV-based translation table in a SVOP or PADOP arrangement.
This mutation of the op structure occurred in pmtrans(), some time after
original op building.  If an error occurred before pmtrans(), requiring
the op to be freed, op_clear() would be misled by the UTF8 flags into
treating the PV as an SV or pad index, causing crashes in the latter
case [perl #102858].  op_clear() was implicitly assuming that pmtrans()
had been performed, due to lacking any explicit indication of the op's
state of construction.

Now, the PV table is allocated by pmtrans(), when it's actually going to
populate it.  The PV doesn't get allocated at all for UTF8-flagged ops.
Prior to pmtrans(), the op_pv/op_sv/op_padix field is all bits zero,
so there's no problem with freeing the op.

12 years agoUpdate the link for Module-Build/core integration
Chris 'BinGOs' Williams [Fri, 24 Feb 2012 21:17:55 +0000 (21:17 +0000)]
Update the link for Module-Build/core integration

12 years agomktables: Correct Unicode 6.1 omission
Karl Williamson [Fri, 24 Feb 2012 16:32:58 +0000 (09:32 -0700)]
mktables: Correct Unicode 6.1 omission

Unicode 6.1 erroneously omitted Takri as a script that uses two
characters, and have voted to publish the correction that this patch
makes.  There isn't an official Corrigendum yet.

12 years agocorrect a Pod foible that broke blead
Ricardo Signes [Fri, 24 Feb 2012 16:08:51 +0000 (11:08 -0500)]
correct a Pod foible that broke blead

12 years agoAdd description of new change process for http://dev.perl.org
Max Maischein [Fri, 24 Feb 2012 13:41:11 +0000 (14:41 +0100)]
Add description of new change process for dev.perl.org

Leo prefers now direct pull requests via Github.

12 years agoregcomp.c: Add cast to silence Solaris warning
Karl Williamson [Thu, 23 Feb 2012 16:01:54 +0000 (09:01 -0700)]
regcomp.c: Add cast to silence Solaris warning

12 years agoRemove ExtUtils-CBuilder's MANIFEST.SKIP
David Golden [Thu, 23 Feb 2012 14:01:48 +0000 (09:01 -0500)]
Remove ExtUtils-CBuilder's MANIFEST.SKIP

Apparently, 'make distclean' tries to use it in confusing and
counterproducive ways.  Easier to remove it than fix the other.

12 years agowork harder to get useful diagnostics on Win32
Ricardo Signes [Thu, 23 Feb 2012 00:24:22 +0000 (19:24 -0500)]
work harder to get useful diagnostics on Win32

The pod2html tests can do diffs of big hunks, and so they try to
use /usr/bin/diff to show how things differ.  If there is no such
program, we just say "it wasn't good."

Unfortunately, Win32 is where we keep having problems, and where
we are least likely to have diff available.  When there is no diff,
we now use Test::More::is, which will output the whole differing file.

Noisy, yes, but now smoke reports with failing Pod::Html tests will
be more useful.

12 years agoExtUtils::CBuilder: add support information
David Golden [Wed, 22 Feb 2012 22:45:06 +0000 (17:45 -0500)]
ExtUtils::CBuilder: add support information

Adds a documentation note about support.  Adds a README.patching
file with instructions for bumping versions, Changes, etc.

12 years agoUpdate Maintainers.pl for new ExtUtils::CBuilder
David Golden [Wed, 22 Feb 2012 21:29:11 +0000 (16:29 -0500)]
Update Maintainers.pl for new ExtUtils::CBuilder

Also updates release instructions with a reminder to
update Maintainers.pl

12 years agoadd ext/Pod-Functions/.gitignore
David Golden [Wed, 22 Feb 2012 21:20:02 +0000 (16:20 -0500)]
add ext/Pod-Functions/.gitignore

12 years agoExtUtils::CBuilder - add dual-life support files
David Golden [Wed, 22 Feb 2012 20:47:56 +0000 (15:47 -0500)]
ExtUtils::CBuilder - add dual-life support files

Adds Makefile.PL, LICENSE, etc. and updates Changes for
work in blead from 5.14.0

12 years agoignore all MYMETA files, not just .yml
David Golden [Wed, 22 Feb 2012 20:29:08 +0000 (15:29 -0500)]
ignore all MYMETA files, not just .yml

12 years ago"no feature" now means reset to default
Ricardo Signes [Tue, 21 Feb 2012 00:35:33 +0000 (19:35 -0500)]
"no feature" now means reset to default

See https://rt.perl.org/rt3/Ticket/Display.html?id=108776

"no feature" now resets to the default feature set.  To disable all
features (which is likely to be a pretty special-purpose request, since
it presumably won't match any named set of semantics) you can now
write "no feature ':all'"

12 years agounixify paths a bit more systematicaly in Pod-Html
Ricardo Signes [Wed, 22 Feb 2012 14:33:45 +0000 (09:33 -0500)]
unixify paths a bit more systematicaly in Pod-Html

Rather than unixifying paths sort of once off, we now do what I
threatened earlier: unixify all the --switch supplied paths during
command line parsing.

There are other bits of File::Spec being sprinkled around, quite
possibly in too-interior sections of the program, but this change
gets *all* tests passing on Win32 as well as GNU/Linux.

I think an audit of filepath normalization "border security" is
still due, but this may tide us over for now.

12 years agodon't assume that filesys starts at / in Pod-Html
Ricardo Signes [Wed, 22 Feb 2012 03:54:58 +0000 (22:54 -0500)]
don't assume that filesys starts at / in Pod-Html

The test expectations for the --htmlroot feature wanted to look for
an absolute path, so it concatenated / with the relative-to-root path.

That failed on Win32, where the cwd was C:\etc

I added a new token to the test-expectations-munger for the absolute
cwd.  I'm not 100% sure about the features' behavior, but the tests
are now less platform-specific.  I look forward to input on whether
the code is doing the right thing now...

12 years agounixify the --outfile arg to pod2html
Ricardo Signes [Wed, 22 Feb 2012 03:19:56 +0000 (22:19 -0500)]
unixify the --outfile arg to pod2html

I think we probably need a more systematic regimen of of unixify
calls, but for now, this gets tests passing on Win32.

12 years agoMake corelist-perldelta.pl keep the existing heading
Max Maischein [Tue, 21 Feb 2012 17:59:26 +0000 (18:59 +0100)]
Make corelist-perldelta.pl keep the existing heading

86c08a2ca2546ef08513c65dabf686423cade2f3 changed
Porting/corelist-perldelta.pl to be more accepting in section headings
when reading in an existing perldelta.

caaa1415975f6b8763b186234d77803148a4fd37 changed it to output
the correctly pluralized form of "Pragmata".

corelist-perldelta.pl used the same data structure for both, input
and output. This patch divides up the logic between input and output
in two data structures, and keeps the heading of the input
file when generating a fresh pod section.

12 years agoFix typo
Max Maischein [Tue, 21 Feb 2012 17:13:49 +0000 (18:13 +0100)]
Fix typo

12 years agoPluralize "Modules and Pragma" to "Modules and Pragmata"
Max Maischein [Tue, 21 Feb 2012 17:13:38 +0000 (18:13 +0100)]
Pluralize "Modules and Pragma" to "Modules and Pragmata"

12 years agoAdd perl5158delta.pod
Max Maischein [Tue, 21 Feb 2012 16:47:25 +0000 (17:47 +0100)]
Add perl5158delta.pod

12 years agoAdd epigraph for 5.15.8
Max Maischein [Tue, 21 Feb 2012 16:16:58 +0000 (17:16 +0100)]
Add epigraph for 5.15.8

12 years agoFix bug in pod2html crossreferencing
Marc Green [Tue, 7 Feb 2012 16:32:54 +0000 (11:32 -0500)]
Fix bug in pod2html crossreferencing

12 years agomakerel should not add -uncommitted to tarballs
Ricardo Signes [Mon, 20 Feb 2012 22:35:29 +0000 (17:35 -0500)]
makerel should not add -uncommitted to tarballs

For some time now (I suspect since 691ce773f), makerel has always tried
to build releases as perl-5.x.y-uncommitted.tar.gz.  This always
confuses and/or panics new release engineers, who see the error before
the "don't worry, use -s ''" advice in the RMG.

This change just makes makerel skip the usually-#ifdef-ed-away line that
is getting that -uncommitted.  makerel still picks up other
locally-applied patches, but will skip uncommitted.

12 years agoMerge branch 'release-5.15.8' into blead
Max Maischein [Mon, 20 Feb 2012 23:01:14 +0000 (00:01 +0100)]
Merge branch 'release-5.15.8' into blead

12 years agoFix typos in pod/perldelta.pod origin/release-5.15.8 v5.15.8
Max Maischein [Mon, 20 Feb 2012 22:08:57 +0000 (23:08 +0100)]
Fix typos in pod/perldelta.pod

12 years agoUpdate pod/perldelta.pod from the version numbers
Max Maischein [Mon, 20 Feb 2012 20:20:55 +0000 (21:20 +0100)]
Update pod/perldelta.pod from the version numbers

12 years agoadd new release to perlhist
Max Maischein [Mon, 20 Feb 2012 19:47:13 +0000 (20:47 +0100)]
add new release to perlhist

12 years agoUpdate Module::CoreList for v5.15.8
Max Maischein [Mon, 20 Feb 2012 19:36:46 +0000 (20:36 +0100)]
Update Module::CoreList for v5.15.8

12 years agoClean out XXX in preparation for Module::CoreList update
Max Maischein [Mon, 20 Feb 2012 19:19:52 +0000 (20:19 +0100)]
Clean out XXX in preparation for Module::CoreList update

12 years agoBump versions from 5.15.7 to 5.15.8
Max Maischein [Mon, 20 Feb 2012 18:41:33 +0000 (19:41 +0100)]
Bump versions from 5.15.7 to 5.15.8

12 years agoUpdate perldelta.pod for 5.15.8 for review
Max Maischein [Mon, 20 Feb 2012 18:31:23 +0000 (19:31 +0100)]
Update perldelta.pod for 5.15.8 for review

Pending remains the list of changed/upgraded module versions, to be
done after the version bump.

12 years agohandy.h: Silence Solaris compiler warning
Karl Williamson [Mon, 20 Feb 2012 01:04:03 +0000 (18:04 -0700)]
handy.h: Silence Solaris compiler warning

Making this an unsigned constant silences the scary and wrong Solaris
warnings about integer overflow

12 years agopodcheck.t: Typo in pod
Karl Williamson [Sun, 19 Feb 2012 00:39:27 +0000 (17:39 -0700)]
podcheck.t: Typo in pod

12 years agoAvoid defining the same global between perl and re.pm
Tony Cook [Sun, 19 Feb 2012 10:55:50 +0000 (21:55 +1100)]
Avoid defining the same global between perl and re.pm

This caused -Uusedl builds to fail due to the duplicate symbol.

A more complex fix can be expected after 5.16.

12 years agoMake t/porting/authors.t work on Windows
Max Maischein [Sun, 19 Feb 2012 20:07:02 +0000 (21:07 +0100)]
Make t/porting/authors.t work on Windows

The Windows shell cmd.exe does not know about single quotes. Double
quotes are the only thing available here. This patch selects the kind
of quote to use based on the operating system and constructs
the pipeline accordingly.

12 years agoRevert updates to compression libraries
Ricardo Signes [Sun, 19 Feb 2012 16:12:43 +0000 (11:12 -0500)]
Revert updates to compression libraries

Revert "Update Compress-Raw-Bzip2 to CPAN version 2.049"
This reverts commit db98b5a25ac5537be04f17243c5e929aceb3560b.

Revert "Update Compress-Raw_Zlib to CPAN version 2.049"
This reverts commit 8b782679b6ea1247bd559efc311e7366582feaad.

Revert "Update IO-Compress to CPAN version 2.049"
This reverts commit 785e05e1c22f7d7c6ed38839cc28cc6d13a286de.

12 years agoepigraphs.pod: Rmv illegal spaces after | in L<>
Karl Williamson [Sun, 19 Feb 2012 15:57:29 +0000 (08:57 -0700)]
epigraphs.pod: Rmv illegal spaces after | in L<>

12 years agoperlintro: Add missing closing ">"
Karl Williamson [Sun, 19 Feb 2012 15:56:07 +0000 (08:56 -0700)]
perlintro: Add missing closing ">"

12 years ago...and add unadded file
Ricardo Signes [Sun, 19 Feb 2012 14:55:02 +0000 (09:55 -0500)]
...and add unadded file

12 years agoremove MANIFEST entries for pruned files
Ricardo Signes [Sun, 19 Feb 2012 14:29:52 +0000 (09:29 -0500)]
remove MANIFEST entries for pruned files

12 years agoRefactor the Tk event loop to allow for other event loops
Max Maischein [Sun, 19 Feb 2012 13:09:55 +0000 (14:09 +0100)]
Refactor the Tk event loop to allow for other event loops

Term::ReadLine supports any event loop, including unpubished ones and
simple IO::Select loops without the need to rewrite existing code for
any particular framework.

12 years agoIn S_validate_suid(), move declarations after the first statement.
Nicholas Clark [Sun, 19 Feb 2012 08:38:52 +0000 (09:38 +0100)]
In S_validate_suid(), move declarations after the first statement.

Otherwise exacting C89 compilers refuse to build the code. And at least
one Win32 compiler is exacting on this.

12 years agoRefactor code in Data::Dumper to assume that >=5.8.0 is the common case.
Nicholas Clark [Sat, 18 Feb 2012 14:01:32 +0000 (15:01 +0100)]
Refactor code in Data::Dumper to assume that >=5.8.0 is the common case.

The 5.8.0 versions of &init_refaddr_format and &format_refaddr are now
compiled by default, and then redefined with their 5.6.x replacements if
it turns out that we're on 5.6.1 or 5.6.2.

Previously both versions were compiled, and the correct pair bound using
typeglob assignment.

12 years agoFix typo in 985213f2fede57.
Craig A. Berry [Sun, 19 Feb 2012 05:06:16 +0000 (23:06 -0600)]
Fix typo in 985213f2fede57.

Which broke the build on both VMS and Win32.

12 years agoRemove gete?[ug]id caching
Ævar Arnfjörð Bjarmason [Sun, 12 Feb 2012 18:56:35 +0000 (18:56 +0000)]
Remove gete?[ug]id caching

Currently we cache the UID/GID and effective UID/GID similarly to how
we used to cache getpid() before v5.14.0-251-g0e21945. Remove this
magical behavior in favor of always calling getpid(), getgid()
etc. This resolves RT #96208.

A minimal testcase for this is the following by Leon Timmermans
attached to RT #96208:

    eval { require 'syscall.ph'; 1 } or eval { require 'sys/syscall.ph'; 1 } or die $@;

    if (syscall(&SYS_setuid, $ARGV[0] + 0 || 1000) >= 0 or die "$!") {
            printf "\$< = %d, getuid = %d\n", $<, syscall(&SYS_getuid);
    }

I.e. if we call the sete?[ug]id() functions unbeknownst to perl the
$<, $>, $( and $) variables won't be updated. This results in the same
sort of issues we had with $$ before v5.14.0-251-g0e21945, and
getppid() before my v5.15.7-407-gd7c042c patch.

I'm completely eliminating the PL_egid, PL_euid, PL_gid and PL_uid
variables as part of this patch, this will break some CPAN modules,
but it'll be really easy before the v5.16.0 final to reinstate
them. I'd like to remove them to see what breaks, and how easy it is
to fix it.

These variables are not part of the public API, and the modules using
them could either use the Perl_gete?[ug]id() functions or are working
around the bug I'm fixing with this commit.

The new PL_delaymagic_(egid|euid|gid|uid) variables I'm adding are
*only* intended to be used internally in the interpreter to facilitate
the delaymagic in Perl_pp_sassign. There's probably some way not to
export these to programs that embed perl, but I haven't found out how
to do that.

12 years agoAdd t/porting/pending-author.t, fixing a limitation of t/porting/authors.t
Nicholas Clark [Wed, 15 Feb 2012 16:26:53 +0000 (17:26 +0100)]
Add t/porting/pending-author.t, fixing a limitation of t/porting/authors.t

t/porting/pending-author.t attempts to avoid the problem of C<make test>
passing 100%, but the subsequent git commit causing F<t/porting/authors.t>
to fail, because it uses a "new" e-mail address.

This test is only run if one is building inside a git checkout, B<and> one
has made local changes. Otherwise it's skipped.

12 years agot/porting/authors.t only needs to pass the Author to checkAUTHORS.pl
Nicholas Clark [Wed, 15 Feb 2012 15:11:42 +0000 (16:11 +0100)]
t/porting/authors.t only needs to pass the Author to checkAUTHORS.pl

Commit 3ea0c581844689ab didn't go far enough in pruning the input.
When Porting/checkAUTHORS.pl is invoked with --tap it uses
parse_commits_from_stdin_authors() instead of parse_commits_from_stdin(),
which only looks for lines matching /^Author:/

This reduces runtime by a further 8%.

12 years agoCorrect the location of t/porting/perlfunc.t in perldelta.pod
Nicholas Clark [Sat, 18 Feb 2012 22:10:05 +0000 (23:10 +0100)]
Correct the location of t/porting/perlfunc.t in perldelta.pod

It was somewhere completely wrong, thanks to no human double checking of
a git rebase during development.

12 years agoLonger filenames for while_readdir.t.
Craig A. Berry [Sat, 18 Feb 2012 21:10:19 +0000 (15:10 -0600)]
Longer filenames for while_readdir.t.

With filenames varying between only one and five characters in
length, it was fairly easy to get two files differing only in
case ('A' and 'a', for example).  Which on non-case-sensitive file
systems could generate a warning at unlink time because it would
unlink 'a' and then check for the existence of 'a' and get true
because 'A' was still there and indistinguishable from 'a'.

So just use longer filenames to make the possibility of collision
vanishingly small.

12 years agoperlvar: $] is not deprecated
Father Chrysostomos [Sat, 18 Feb 2012 19:16:31 +0000 (11:16 -0800)]
perlvar: $] is not deprecated

See <20011022034838.B1676@blackrider> and commit 0c8d858bc.

12 years agoUpdate IO-Compress to CPAN version 2.049
Chris 'BinGOs' Williams [Sat, 18 Feb 2012 16:24:52 +0000 (16:24 +0000)]
Update IO-Compress to CPAN version 2.049

  [DELTA]

  2.049 18 February 2012

      * IO::Compress::Zip
        Error in t/cz-03zlib-v1.t that caused warnings with 5.15
        [RT# 110736: warnings from cpan/IO-Compress/t/cz-03zlib-v1.t]

12 years agoUpdate Compress-Raw_Zlib to CPAN version 2.049
Chris 'BinGOs' Williams [Sat, 18 Feb 2012 16:22:43 +0000 (16:22 +0000)]
Update Compress-Raw_Zlib to CPAN version 2.049

  [DELTA]

  2.049 30 January 2012

      * Include zlib 1.2.6 source.

12 years agoUpdate Compress-Raw-Bzip2 to CPAN version 2.049
Chris 'BinGOs' Williams [Sat, 18 Feb 2012 16:18:48 +0000 (16:18 +0000)]
Update Compress-Raw-Bzip2 to CPAN version 2.049

  [DELTA]

  2.049 18 February 2012

      * No Changes

12 years agoUpdate perlfaq to CPAN version 5.0150039
Chris 'BinGOs' Williams [Sat, 18 Feb 2012 15:50:37 +0000 (15:50 +0000)]
Update perlfaq to CPAN version 5.0150039

  [DELTA]

  5.0150039 Sat 18 Feb 2012 15:33:17 +0100
    * Rewrite "How do I create a module?" (ranguard)
    * Remove more old questions (ranguard)
    * Improve Email::MIME example (madsen)
    * Fix to regex (RT #74215)

12 years agopopulate the Future Deprecations section
Ricardo Signes [Thu, 16 Feb 2012 23:45:46 +0000 (18:45 -0500)]
populate the Future Deprecations section

These items aggregate the bullets put forth on the perl5-porters
list, omitting those to which there was an immediate objection.

12 years agoMerge the Pod::Functions refactoring to blead.
Nicholas Clark [Sat, 18 Feb 2012 12:23:26 +0000 (13:23 +0100)]
Merge the Pod::Functions refactoring to blead.

12 years agoDescribe the update to Pod::Functions in perldelta.
Nicholas Clark [Fri, 17 Feb 2012 20:36:31 +0000 (21:36 +0100)]
Describe the update to Pod::Functions in perldelta.

12 years agoAdd metadata to perlfunc.pod for which version or feature added a function.
Nicholas Clark [Tue, 14 Feb 2012 12:41:07 +0000 (13:41 +0100)]
Add metadata to perlfunc.pod for which version or feature added a function.

Whilst this isn't used (yet), it makes sense to put it in now, before any
external program decides that parsing the private Pod::Function blocks in
perlfunc.pod is fair game, and then becomes dependent on their format.

12 years agoTest that Pod::Function's descriptions are stylistically consistent.
Nicholas Clark [Tue, 14 Feb 2012 12:34:56 +0000 (13:34 +0100)]
Test that Pod::Function's descriptions are stylistically consistent.

Function descriptions should start with a lowercase letter, or the proper
noun SysV.

12 years agoTest that functions in the groups in perlfunc.pod are in sorted order.
Nicholas Clark [Mon, 30 Jan 2012 19:05:33 +0000 (20:05 +0100)]
Test that functions in the groups in perlfunc.pod are in sorted order.

This ensures consistency in the documentation, and that the functions in
%Pod::Functions::Kinds are in sorted order.

12 years agoTest that every function in perlfunc.pod has a summary for Pod::Functions.
Nicholas Clark [Mon, 30 Jan 2012 17:41:54 +0000 (18:41 +0100)]
Test that every function in perlfunc.pod has a summary for Pod::Functions.

Historically Pod::Functions has failed to get updated when functions are
added. This should solve that.

12 years agoAdd t/porting/perlfunc.t so that porting tests catch problems with perlfunc
Nicholas Clark [Mon, 30 Jan 2012 13:47:13 +0000 (14:47 +0100)]
Add t/porting/perlfunc.t so that porting tests catch problems with perlfunc

Pod::Functions is now generated from pod/perlfunc.pod by
ext/Pod-Functions/Functions_pm.PL

If it can't parse pod/perlfunc.pod, it will abort, which will cause the
build to break. It's really not possible for it to carry on, hence aborting
is the only option. However, innocent-seeming changes to documentation
shouldn't break the build, and we expect everyone to run (at least)
the porting tests, hence this test, to catch such problems before it's too
late. To avoid duplicating the parsing logic, we make Functions_pm.PL take
a --tap option, to test that all is well.

12 years agoIn the generated Pod::Functions, store all function data with tab separation.
Nicholas Clark [Mon, 30 Jan 2012 11:27:40 +0000 (12:27 +0100)]
In the generated Pod::Functions, store all function data with tab separation.

Previously the data was stored with a comma separated list inside a tab
separated list.

12 years agoGenerate Pod::Functions from perlfunc.pod
Nicholas Clark [Mon, 30 Jan 2012 11:15:36 +0000 (12:15 +0100)]
Generate Pod::Functions from perlfunc.pod

This avoids it getting out of synchronisation.

12 years agoAdd a dependency for ext/Pod-Functions/Functions_pm.PL on pod/perlfunc.pod
Nicholas Clark [Mon, 30 Jan 2012 11:01:08 +0000 (12:01 +0100)]
Add a dependency for ext/Pod-Functions/Functions_pm.PL on pod/perlfunc.pod

This ensures that it gets re-run, and lib/Pod/Functions.pm rebuilt, if
perlfunc.pod is changed.

12 years agoEnsure Pod::Simple is built before Pod::Functions.
Nicholas Clark [Mon, 30 Jan 2012 10:41:13 +0000 (11:41 +0100)]
Ensure Pod::Simple is built before Pod::Functions.

This will allow Pod::Functions to use Pod::Simple as part of its build
process.

12 years agoChange ext/Pod-Functions to generate Functions.pm from a Perl script.
Nicholas Clark [Sun, 29 Jan 2012 17:21:27 +0000 (17:21 +0000)]
Change ext/Pod-Functions to generate Functions.pm from a Perl script.

For the first step, simply output the current file in one hit.

12 years agoAdd annotations to perlfunc.pod for Pod::Functions.
Nicholas Clark [Sun, 29 Jan 2012 14:56:01 +0000 (14:56 +0000)]
Add annotations to perlfunc.pod for Pod::Functions.

In the list for "Perl Functions by Category" each item is annotated with its
type as used internally by Pod::Functions.

In the "Alphabetical Listing of Perl Functions" each function is annotated
with the summary description returned by %Pod::Functions::Flavor.

12 years agoMove Pod::Functions from lib/ to ext/
Nicholas Clark [Sun, 29 Jan 2012 13:00:41 +0000 (13:00 +0000)]
Move Pod::Functions from lib/ to ext/

12 years agoBring the joy of strict and warnings to Functions.t
Nicholas Clark [Sun, 29 Jan 2012 12:23:31 +0000 (12:23 +0000)]
Bring the joy of strict and warnings to Functions.t

This reveals that use_ok() was not in a BEGIN block, and in turn that the
test count needs to be declared before this BEGIN block runs. Now fixed.

12 years agoTerser code in Pod::Functions to generate $Type_Description and @Type_Order.
Nicholas Clark [Sun, 29 Jan 2012 12:06:05 +0000 (12:06 +0000)]
Terser code in Pod::Functions to generate $Type_Description and @Type_Order.

12 years agoTeach Pod::Functions that each, keys and values also operate on arrays.
Nicholas Clark [Mon, 23 Jan 2012 22:38:43 +0000 (23:38 +0100)]
Teach Pod::Functions that each, keys and values also operate on arrays.

These were added to the section 'Functions for real @ARRAYs' in perlfunc.pod
by commit a5ce339cb0c533c9 in Sep 2010.

As ever, tweak the golden results in the test to match these changes.

12 years agoAdd all missing functions to Pod::Functions.
Nicholas Clark [Mon, 23 Jan 2012 22:16:56 +0000 (23:16 +0100)]
Add all missing functions to Pod::Functions.

evalbytes was added to perlfunc.pod by commit 7289c5e6ca773d7c in Nov 2011.
fc was added to perlfunc.pod by commit 628253b8ba8b9cbe in Jan 2012.
say was added by commit 0d863452f5cac863 in Dec 2005.
state was added.pod by commit 36fb85f3330d45ee in Jul 2006.
__FILE__, __LINE__ and __PACKAGE__ were added by commit cfa52385fa426b5e in
Aug 2011, and __SUB__ by commit 84ed01088568ffe9 in Nov 2011.

Again, tweak the golden results in the test to match these changes.

12 years agoTeach Pod::Functions about 'Keywords related to the switch feature'.
Nicholas Clark [Mon, 23 Jan 2012 21:44:52 +0000 (22:44 +0100)]
Teach Pod::Functions about 'Keywords related to the switch feature'.

Commit 0d863452f5cac863 in Dec 2005 added the switch feature, along with
documentation in perlfunc.pod, but did not update Pod::Functions.

Again, tweak the golden results in the test to match these changes.

12 years agoUpdate Pod::Functions with changes from perlfunc.pod
Nicholas Clark [Mon, 23 Jan 2012 20:47:16 +0000 (21:47 +0100)]
Update Pod::Functions with changes from perlfunc.pod

Updated description of Binary from commit 5dac7880bdc47787 in Feb 2011.
Updated description of Flow from commit cf2649810f00335b in Jul 2005, and
added the "the" which has always been missing from Pod::Function's version.
Updated description of Modules from commit 3b10bc60979cfe9a in Jan 2010.
Updated description of Objects from commit 353c650532037e40 in Oct 2007.
The description of Namespaces had always differed from that in perlfunc.pod.

Remove stray tabs from the descriptions of gets and sprintf.
Commit 19799a22062ef658 (May 1999) added lock to perlfunc.pod without a
it is the only function in "Threads", move it to "Misc", instead of creating
a category just for it.
use always had two entries with different descriptions in the __DATA__
section. This isn't actually sensible, as the code that builds the exported
data structures ends up taking Types from both, and using the last
description that it sees. So merge the two together to reflect this.

Drop the CHANGES section from the Pod, which is both incomplete and
redundant, given that version control does this job much better.

Tweak the golden results in the test to match these changes.

12 years agoIn perlfunc.pod, sort the descriptions more consistently.
Nicholas Clark [Mon, 23 Jan 2012 16:51:48 +0000 (17:51 +0100)]
In perlfunc.pod, sort the descriptions more consistently.

The order is neither strictly lexical, nor strictly dictionary, but now for
all cases __FOO__ follows foo, and qx// is after qw//.

In the "Regular expressions and pattern matching" summary, put qr// in the
correct position alphabetically.

12 years agoAdd 4 functions missing from perlfunc.pod's 'Perl Functions by Category'.
Nicholas Clark [Mon, 23 Jan 2012 16:32:17 +0000 (17:32 +0100)]
Add 4 functions missing from perlfunc.pod's 'Perl Functions by Category'.

C<readline> added to 'Input and output functions'
Documentation on readline was added by commit 8490252049bf42d3 in Aug 1997.
That commit also added readpipe without adding it to a category group, an
omission that was fixed by commit 4319b00c03e6a517 in Nov 2011.

C<sysseek> added to 'Functions for fixed-length data or records'
Documentation on sysseek was added by commit 137443ea0a858c43 in Apr 1997,
which implemented sysseek.

C<prototype> added to both 'Keywords related to the control flow of your Perl
program' and 'Miscellaneous functions', as Pod::Functions places it in both.
Commit da0045b73af6f504 in Jul 1996, included 'Add documentation for new
"prototype" operator', but only added the main documentation, not an entry
in a category group.

C<lock> added to 'Miscellaneous functions'.
Documentation on lock was added by commit 19799a22062ef658 in May 1999.

12 years agocorrectly clone eval context frames
Zefram [Sat, 18 Feb 2012 11:31:48 +0000 (11:31 +0000)]
correctly clone eval context frames

When cloning stacks (only used for Win32 fork emulation, not for ordinary
threads), the CV referenced by an eval context frame wasn't being cloned.
This led to crashes when Win32 forked inside an eval [perl #109718].

12 years agoRevert "Increase the fallback value of MAXPATHLEN"
Dominic Hargreaves [Fri, 3 Feb 2012 19:40:30 +0000 (19:40 +0000)]
Revert "Increase the fallback value of MAXPATHLEN"

This reverts commit ffa23acf6bf9670bd1d5fdc9a958c918b6cf3d06.

This change was made without realisation that the fallback value for
MAXPATHLEN on POSIX systems comes (in perl.h) from _POSIX_MAX_PATH,
so the fallback value here was not used.