platform/upstream/perl.git
14 years agoMore updates to perl5115delta.pod
Steve Hay [Sat, 20 Feb 2010 00:29:55 +0000 (00:29 +0000)]
More updates to perl5115delta.pod

14 years agoAvoid returning an undefined SV*
Rafael Garcia-Suarez [Fri, 19 Feb 2010 09:53:24 +0000 (10:53 +0100)]
Avoid returning an undefined SV*

14 years agoRegen headers after previous patches
Rafael Garcia-Suarez [Fri, 19 Feb 2010 09:11:43 +0000 (10:11 +0100)]
Regen headers after previous patches

14 years agoMake a missing right brace on \N{ fatal
Karl Williamson [Thu, 18 Feb 2010 22:06:51 +0000 (15:06 -0700)]
Make a missing right brace on \N{ fatal

It was decided that this should be a fatal error instead of a warning.

Also some comments were updated..

14 years agoPATCH: [perl #56444] delayed interpolation of \N{...}
Karl Williamson [Thu, 18 Feb 2010 20:41:09 +0000 (13:41 -0700)]
PATCH: [perl #56444] delayed interpolation of \N{...}

make regen embed.fnc
needs to be run on this patch.

This patch fixes Bugs #56444 and #62056.

Hopefully we have finally gotten this right.  The parser used to handle
all the escaped constants, expanding \x2e to its single byte equivalent.
The problem is that for regexp patterns, this is a '.', which is a
metacharacter and has special meaning that \x2e does not.  So things
were changed so that the parser didn't expand things in patterns.  But
this causes problems for \N{NAME}, when the pattern doesn't get
evaluated until runtime, as for example when it has a scalar reference
in it, like qr/$foo\N{NAME}/.  We want the value for \N{NAME} that was
in effect at the point during the parsing phase that this regex was
encountered in, but we don't actually look at it until runtime, when
these bug reports show that it is gone.  The solution is for the
tokenizer to parse \N{NAME}, but to compile it into an intermediate
value that won't ever be considered a metacharacter.  We have chosen to
compile NAME to its equivalent code point value, and express it in the
already existing \N{U+...} form.  This indicates to the regex compiler
that the original input was a named character and retains the value it
had at that point in the parse.

This means that \N{U+...} now always must imply Unicode semantics for
the string or pattern it appeared in.  Previously there was an
inconsistency, where effectively \N{NAME} implied Unicode semantics, but
\N{U+...} did not necessarily.  So now, any string or pattern that has
either of these forms is utf8 upgraded.

A complication is that a charnames handler can return a sequence of
multiple characters instead of just one.  To deal with this case, the
tokenizer will generate a constant of the form \N{U+c1.c2.c2...}, where
c1 etc are the individual characters.  Perhaps this will be made a
public interface someday, but I decided to not expose it externally as
far as possible for now in case we find reason to change it.  It is
possible to defeat this by passing it in a single quoted string to the
regex compiler, so the documentation will be changed to discourage that.

A further complication is that \N can have an additional meaning: to
match a non-newline.  This means that the two meanings have to be
disambiguated.

embed.fnc was changed to make public the function regcurly() in
regcomp.c so that it could be referred to in toke.c to see if the ... in
\N{...} is a legal quantifier like {2,}.  This is used in the
disambiguation.

toke.c was changed to update some out-dated relevant comments.
It now parses \N in patterns.  If it determines that it isn't a named
sequence, it passes it through unchanged.  This happens when there is no
brace after the \N, or no closing brace, or if the braces enclose a
legal quantifier.  Previously there has been essentially no restriction
on what can come between the braces so that a custom translator can
accept virtually anything.  Now, legal quantifiers are assumed to mean
that the \N is a "match non-newline that quantity of times".

I removed the #ifdef'd out code that had been left in in case pack U
reverted to earlier behavior.  I did this because it complicated things,
and because the change to pack U has been in long enough and shown that
it is correct so it's not likely to be reverted.

\N meaning a named character is handled differently depending on whether
this is a pattern or not.  In all cases, the output will be upgraded to
utf8 because a named character implies Unicode semantics.  If not a
pattern, the \N is parsed into a utf8 string, as before.  Otherwise it
will be parsed into the intermediate \N{U+...} form.  If the original
was already a valid \N{U+...} constant, it is passed through unchanged.

I now check that the sequence returned by the charnames handler is not
malformed, which was lacking before.

The code in regcomp.c which dealt with interfacing with the charnames
handler has been removed.  All the values should be determined by the
time regcomp.c gets involved.  The affected subroutine is necessarily
restructured.

An EXACT-type node is generated for the character sequence.  Such a node
has a capacity of 255 bytes, and so it is possible to overflow it.  This
wasn't checked for before, but now it is, and a warning issued and the
overflowing characters are discarded.

14 years agoUpdate perldelta for 5.12 to warn vendors about deprecate.pm
Jesse Vincent [Thu, 18 Feb 2010 19:03:23 +0000 (11:03 -0800)]
Update perldelta for 5.12 to warn vendors about deprecate.pm

(See [perl #72670])

14 years agort #72866 - add magic to arrayrefs assigned to *Foo::ISA
Tony Cook [Thu, 18 Feb 2010 09:59:33 +0000 (20:59 +1100)]
rt #72866 - add magic to arrayrefs assigned to *Foo::ISA

The fix for rt #60220 (26d68d86) updated the isa cache when an
arrayref was assigned to some *ISA, but didn't add the magic to the
new @ISA to catch any further updates to it.  Add the magic, and
tests.

14 years agoAvoid a panic from the UTF-8 length cache if the length overflows 32 bits.
Nicholas Clark [Thu, 18 Feb 2010 15:38:11 +0000 (15:38 +0000)]
Avoid a panic from the UTF-8 length cache if the length overflows 32 bits.

Rather than storing a value, and having it wrap to a wrong value, treat such
lengths as "still unknown". This is a work around until a proper solution is
designed an implemented.

14 years agoIn Perl_reg_temp_copy(), ensure SvMAGIC() is NULL in the new REGEXP.
Nicholas Clark [Thu, 18 Feb 2010 15:23:49 +0000 (15:23 +0000)]
In Perl_reg_temp_copy(), ensure SvMAGIC() is NULL in the new REGEXP.

Change c2123ae380a372d5 exposed the fact that Perl_reg_temp_copy() didn't
reset SvMAGIC() to NULL after block copying the "parent" regexp. The analagous
problem with SvSTASH() was fixed with change b9ad13acb338e137.

14 years agoKeep perl5115delta.pod up to date
Steve Hay [Thu, 18 Feb 2010 09:46:59 +0000 (09:46 +0000)]
Keep perl5115delta.pod up to date

14 years agoUpgrade podlators from 2.3.0 to 2.3.1
Steve Hay [Thu, 18 Feb 2010 09:46:16 +0000 (09:46 +0000)]
Upgrade podlators from 2.3.0 to 2.3.1

Ensures that all $VERSIONs are bumped in files that have changed since
Perl 5.11.4.

14 years agoUpdate perl5115delta.pod with today's changes
Steve Hay [Thu, 18 Feb 2010 00:28:17 +0000 (00:28 +0000)]
Update perl5115delta.pod with today's changes

14 years agoUpgrade CPAN from 1.94_55 to 1.94_56
Steve Hay [Thu, 18 Feb 2010 00:17:57 +0000 (00:17 +0000)]
Upgrade CPAN from 1.94_55 to 1.94_56

Ensures that all $VERSIONs are bumped in files that have changed since
Perl 5.11.4.

14 years agoMerge branch 'pod-perlrepository' of git://github.com/avar/perl into blead
Jesse Vincent [Wed, 17 Feb 2010 15:31:58 +0000 (07:31 -0800)]
Merge branch 'pod-perlrepository' of git://github.com/avar/perl into blead

* 'pod-perlrepository' of git://github.com/avar/perl:
  Mention why it's a good idea to use topic branches for everything
  Adjusted the git config user.name/user.email example for what 99% of users would like to do
  Prefix commands universally with "%". Most of the POD used that convention but a few cases didn't
  Don't recommend that people manually fiddle with their F<.git/config>, instead they should edit it with L<git-config(1)>
  Note that checking out from git via http:// is at least 4x slower than git://

14 years agoMake the new Socket implementation of inet_pton consistent with the existing Socket6...
Jesse Vincent [Wed, 17 Feb 2010 14:45:30 +0000 (06:45 -0800)]
Make the new Socket implementation of inet_pton consistent with the existing Socket6 implementation of inet_pton.

Fix for release-blocking ticket [perl #72884]

> |https://rt.cpan.org/Ticket/Display.html?id=52497|4411113f|NJH/IO-Socket-Multicast6-0.03.tar.gz   |

I'll describe what's happening here, and leave it to everyone else to decide
which of the interacting events is the bug, or where the fix might be.

So the *entire* change is this:

commit 4411113f31b3f00171bb335092b02104d29d7cd7
Author: Rafael Garcia-Suarez <rgarciasuarez@gmail.com>
Date:   Fri Mar 27 13:19:16 2009 +0100

    Add inet_pton and inet_ntop to the list of functions exported by Socket

diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm
index 6b268ef..7d130ba 100644
--- a/ext/Socket/Socket.pm
+++ b/ext/Socket/Socket.pm
@@ -198,6 +198,7 @@ use XSLoader ();
 @ISA = qw(Exporter);
 @EXPORT = qw(
        inet_aton inet_ntoa
+       inet_pton inet_ntop
        sockaddr_family
        pack_sockaddr_in unpack_sockaddr_in
        pack_sockaddr_un unpack_sockaddr_un

and test fails like this:

$  /home/nick/Sandpit/snap5.9.x-v5.11.4-85-g95c9bfa/bin/perl5.11.4 -Mblib t/35mcastsend.t
1..11
Constant subroutine IO::Socket::Multicast6::AF_INET6 redefined at /home/nick/Sandpit/snap5.9.x-v5.11.4-85-g95c9bfa/lib/perl5/5.11.4/Exporter.pm line 64.
 at /home/nick/.cpan/build/IO-Socket-Multicast6-0.03-CqGAYT/blib/lib/IO/Socket/Multicast6.pm line 10
Prototype mismatch: sub IO::Socket::Multicast6::AF_INET6 () vs none at /home/nick/Sandpit/snap5.9.x-v5.11.4-85-g95c9bfa/lib/perl5/5.11.4/Exporter.pm line 64.
 at /home/nick/.cpan/build/IO-Socket-Multicast6-0.03-CqGAYT/blib/lib/IO/Socket/Multicast6.pm line 10
Constant subroutine IO::Socket::Multicast6::PF_INET6 redefined at /home/nick/Sandpit/snap5.9.x-v5.11.4-85-g95c9bfa/lib/perl5/5.11.4/Exporter.pm line 64.
 at /home/nick/.cpan/build/IO-Socket-Multicast6-0.03-CqGAYT/blib/lib/IO/Socket/Multicast6.pm line 10
Prototype mismatch: sub IO::Socket::Multicast6::PF_INET6 () vs none at /home/nick/Sandpit/snap5.9.x-v5.11.4-85-g95c9bfa/lib/perl5/5.11.4/Exporter.pm line 64.
 at /home/nick/.cpan/build/IO-Socket-Multicast6-0.03-CqGAYT/blib/lib/IO/Socket/Multicast6.pm line 10
ok 1 - use IO::Socket::Multicast6;
ok 2 - Create IPv4 multicast socket
ok 3 - Combined IPv4 destination address and port
ok 4 - Separate IPv4 destination address and port
Bad arg length for Socket::pack_sockaddr_in, length is 16, should be 4 at t/35mcastsend.t line 26.

The warnings aren't actually really relevant. The "problem"s are:

IO::Socket::Multicast6 isa IO::Socket::INET6
IO::Socket::INET6 isa IO::Socket

so they chose to inherit all behaviour from IO::Socket. In turn

IO::Socket isa IO::Handle isa Exporter.

IO::Socket chooses to export everything that Socket does:

sub import {
    my $pkg = shift;
    if (@_ && $_[0] eq 'sockatmark') { # not very extensible but for now, fast
Exporter::export_to_level('IO::Socket', 1, $pkg, 'sockatmark');
    } else {
my $callpkg = caller;
Exporter::export 'Socket', $callpkg, @_;
    }
}

So, this means that all those choices and delegation of behaviour (and
responsibility) means that all those modules export whatever Socket exports.
OO modules.

So, now they also export inet_pton and inet_ntop.

The test is careful to only import what it needs:

use strict;
use Socket6 qw/ inet_pton pack_sockaddr_in6/;
use Socket qw/  pack_sockaddr_in /;
use Test::More tests => 11;

in particular, it wants inet_pton from Socket6, and only pack_sockaddr_in
from Socket. So at that point, main::inet_pton is Socket6::inet_pton

Then it does this, correctly in a BEGIN block:

BEGIN { use_ok( 'IO::Socket::Multicast6' ); }

The side effect of this is to import all exports from IO::Socket::Multicast6.
Which, from the above chain of inheritance, is @Socket::EXPORT.

So at this point, main::inet_pton is rebound to Socket::inet_pton

And the test fails, because they differ, and it expected (and wanted)
Socket6::inet_pton(). Socket6::inet_pton() returns 4 bytes for AF_INET, 16
bytes for AF_INET6. Socket::inet_pton() returns 16 for both.
Socket::pack_sockaddr_in() wants 4 bytes.

Now, to add to the fun:

    use IO::Socket::Multicast6 ();

and

    use IO::Socket::Multicast6;

of course mean different things. The former suppresses all exports.
It turns out that with Test::More::isa_ok() has no way of doing the former:

$ cat use_ok.pl

use warnings;
use strict;

use Test::More tests => 3;

package clash;

BEGIN { main::use_ok 'Socket' };

package crunch;

BEGIN { main::use_ok 'Socket', () };

package biff;

BEGIN { main::use_ok 'Socket', 'sockaddr_family' };

package main;

sub dump_lowercase_keys {
    my $package = shift;

    print "For package $package:\n";

    no strict 'refs';
    print "    $_\n" foreach sort grep {!tr/A-Z//} keys %{"${package}::"};

    print "\n";
}

dump_lowercase_keys $_ foreach qw (clash crunch biff);
__END__

$ perl use_ok.pl
1..3
ok 1 - use Socket;
ok 2 - use Socket;
ok 3 - use Socket;
For package clash:
    inet_aton
    inet_ntoa
    pack_sockaddr_in
    pack_sockaddr_un
    sockaddr_family
    sockaddr_in
    sockaddr_un
    unpack_sockaddr_in
    unpack_sockaddr_un

For package crunch:
    inet_aton
    inet_ntoa
    pack_sockaddr_in
    pack_sockaddr_un
    sockaddr_family
    sockaddr_in
    sockaddr_un
    unpack_sockaddr_in
    unpack_sockaddr_un

For package biff:
    sockaddr_family

So, there's no clean way to rewrite that test with use_ok to suppress imports.

So, to summarise, it's due to

A cascade of modules blindly exporting everything that Socket exports
Socket::inet_pton() and Socket6::inet_pton() differing in behaviour
A test that fails to realise that it's importing everything via use_ok

This one ranks as blocker because:

    Socket::inet_pton() and Socket::inet_ntop() are not in any stable release

    Hence we have the option to change them if we do it *NOW*.

I think that the right fix is the appended patch. This makes the new Socket
implementation of inet_pton consistent with the existing Socket6
implementation of inet_pton.

14 years agoDocumentation fix in perldoc's usage statement. (-A -> -v)
Offer Kaye [Wed, 17 Feb 2010 14:37:10 +0000 (06:37 -0800)]
Documentation fix in perldoc's usage statement.  (-A -> -v)

Reported in: <5694251002150108m12a3d68flb196f14a45103149@mail.gmail.com>

14 years agoChange my email address from work to home
Steve Hay [Wed, 17 Feb 2010 09:27:51 +0000 (09:27 +0000)]
Change my email address from work to home

14 years agoKeep perl5115delta.pod up to date
Steve Hay [Tue, 16 Feb 2010 23:23:55 +0000 (23:23 +0000)]
Keep perl5115delta.pod up to date

14 years agoMention why it's a good idea to use topic branches for everything
Ævar Arnfjörð Bjarmason [Tue, 16 Feb 2010 18:19:18 +0000 (18:19 +0000)]
Mention why it's a good idea to use topic branches for everything

Most of this is derived from Dan Golden's E-Mail to me on
perl5-porters with the subject "[PATCH] Add comments to gv.c about
variable implementation" where I'd submitted a patch without using a
topic branch.

14 years agoAdjusted the git config user.name/user.email example for what 99% of users would...
Ævar Arnfjörð Bjarmason [Tue, 16 Feb 2010 17:46:46 +0000 (17:46 +0000)]
Adjusted the git config user.name/user.email example for what 99% of users would like to do

Almost nobody wants to set user.name/user.email on a per-repository
basis as the previous example suggested. I put in a new example that
shows how to use C<git config --global> along with an example of how
to set user.email just for F<perl-git>

I replaced Leon Brocard's name with mine because he didn't fit into
the multiple E-Mail address example and I couldn't think of another
example.

14 years agoPrefix commands universally with "%". Most of the POD used that convention but a...
Ævar Arnfjörð Bjarmason [Tue, 16 Feb 2010 17:36:58 +0000 (17:36 +0000)]
Prefix commands universally with "%". Most of the POD used that convention but a few cases didn't

14 years agoDon't recommend that people manually fiddle with their F<.git/config>, instead they...
Ævar Arnfjörð Bjarmason [Tue, 16 Feb 2010 17:33:43 +0000 (17:33 +0000)]
Don't recommend that people manually fiddle with their F<.git/config>, instead they should edit it with L<git-config(1)>

14 years agoFix another place where I typoed book's name
Jesse Vincent [Tue, 16 Feb 2010 17:28:01 +0000 (09:28 -0800)]
Fix another place where I typoed book's name

14 years agoDoc fix. Thanks to Bram.
Jesse Vincent [Tue, 16 Feb 2010 17:26:30 +0000 (09:26 -0800)]
Doc fix. Thanks to Bram.

14 years agoNote that checking out from git via http:// is at least 4x slower than git://
Ævar Arnfjörð Bjarmason [Tue, 16 Feb 2010 17:23:25 +0000 (17:23 +0000)]
Note that checking out from git via  is at least 4x slower than git://

Tested on a 10 MiB/s connection in London, although this is also
IO/CPU bound since Git needs to resolve deltas and check out after the
repository has made it across the wire.

14 years agoFix #72850 - reading $! shouldn't SEGV if Strerror(errno) returns NULL.
Nicholas Clark [Tue, 16 Feb 2010 16:16:33 +0000 (16:16 +0000)]
Fix #72850 - reading $! shouldn't SEGV if Strerror(errno) returns NULL.

This can happen on some OSes for out of range errno values. The bug was
introduced with 0097b436152452e4, which in turn fixed #61976.

Test case by Steve Peters.

14 years ago$name =~ /Phill?ipp?e?/ && $name eq "Philippe" # FAIL
Philippe Bruhat (BooK) [Tue, 16 Feb 2010 16:16:47 +0000 (17:16 +0100)]
$name =~ /Phill?ipp?e?/ && $name eq "Philippe" # FAIL

14 years agoAdded a sucker for the August 20 release
Jesse Vincent [Tue, 16 Feb 2010 16:06:01 +0000 (08:06 -0800)]
Added a sucker for the August 20 release

14 years agoUpdated release schedule through July 2010
Jesse Vincent [Tue, 16 Feb 2010 15:40:08 +0000 (07:40 -0800)]
Updated release schedule through July 2010

14 years agoRemove unused variable
H.Merijn Brand [Tue, 16 Feb 2010 11:15:11 +0000 (12:15 +0100)]
Remove unused variable

14 years agoDoc adjustment about lock(), by Daniel Frederick Crisman
Rafael Garcia-Suarez [Mon, 15 Feb 2010 23:00:32 +0000 (00:00 +0100)]
Doc adjustment about lock(), by Daniel Frederick Crisman

14 years agoAdd our repository URL as a 'repository' key in META.yml.
Nicholas Clark [Mon, 15 Feb 2010 14:56:54 +0000 (14:56 +0000)]
Add our repository URL as a 'repository' key in META.yml.

14 years agoBump version's $VERSION
Steve Hay [Sun, 14 Feb 2010 23:52:41 +0000 (23:52 +0000)]
Bump version's $VERSION

version.pm was changed by 61a0cb1c57a82d328c88c2dd525c91495edb2db9
and Jesse confirms that the $VERSION should be bumped as a result.

14 years agoMake distclean work again on Win32
Steve Hay [Sun, 14 Feb 2010 23:49:20 +0000 (23:49 +0000)]
Make distclean work again on Win32

Cf. 71eaafb1e6768e777bc805cc8490b55c6e77da64

14 years agoFirst stab at a perl5115delta.pod with just under a week to go
Steve Hay [Sun, 14 Feb 2010 22:46:51 +0000 (22:46 +0000)]
First stab at a perl5115delta.pod with just under a week to go

14 years agoUpdate AUTHORS and Porting/checkAUTHORS.pl with new names and aliases
Steve Hay [Sun, 14 Feb 2010 19:58:51 +0000 (19:58 +0000)]
Update AUTHORS and Porting/checkAUTHORS.pl with new names and aliases

14 years agoConvert Perl_sv_pos_u2b_proper() to Perl_sv_pos_u2b_flags().
Nicholas Clark [Sun, 14 Feb 2010 12:31:44 +0000 (12:31 +0000)]
Convert Perl_sv_pos_u2b_proper() to Perl_sv_pos_u2b_flags().

Change from a value/return offset pointer to passing a Unicode offset, and
returning a byte offset. The optional length value/return pointer remains.
Add a flags argument, passed to SvPV_flags(). This allows the caller to
specify whether mg_get() should be called on sv.

14 years agoRemove a vestigial STRLEN case and convert a label to lowercase.
Nicholas Clark [Sun, 14 Feb 2010 16:04:35 +0000 (16:04 +0000)]
Remove a vestigial STRLEN case and convert a label to lowercase.

(Tweaking 777f7c561610dee6.)

14 years agoRemoves 32-bit limit on substr arguments. The full range of IV and UV is available...
Eric Brine [Fri, 12 Feb 2010 01:28:29 +0000 (20:28 -0500)]
Removes 32-bit limit on substr arguments. The full range of IV and UV is available for the pos and len arguments, with safe conversion to STRLEN where it's smaller than an IV.

14 years ago[PATCH] Support for SystemTap's dtrace compatibility layer and issues linking miniperl
H.Merijn Brand [Sat, 13 Feb 2010 18:09:53 +0000 (19:09 +0100)]
[PATCH] Support for SystemTap's dtrace compatibility layer and issues linking miniperl

SystemTaps' dtrace binary lives in /usr/bin, so add a check to Configure
for that.

Additionally link the dtrace .o file into miniperl, which is an issue
with SystemTap and also reported on p5p to affect OpenSolaris in

Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
14 years agoBump Safe's version to 2.22
Rafael Garcia-Suarez [Thu, 11 Feb 2010 21:57:31 +0000 (22:57 +0100)]
Bump Safe's version to 2.22

14 years agobump to CPAN 1.12. Only Makefile.PL changes not affecting CORE
Reini Urban [Thu, 11 Feb 2010 11:56:39 +0000 (12:56 +0100)]
bump to CPAN 1.12. Only Makefile.PL changes not affecting CORE

14 years agoSilence spurious warning in new Safe test
Rafael Garcia-Suarez [Thu, 11 Feb 2010 21:36:54 +0000 (22:36 +0100)]
Silence spurious warning in new Safe test

This warning is emitted by perl when re-throwing the exception, so add a
TODO test to suppress it. However, fixing that will imply a core change.

14 years agoRemove npl addresses from "my" files
Robin Barker [Thu, 11 Feb 2010 16:39:13 +0000 (16:39 +0000)]
Remove npl addresses from "my" files

14 years agodelete orphaned text
Robin Barker [Thu, 11 Feb 2010 17:57:45 +0000 (17:57 +0000)]
delete orphaned text

14 years agoRevised opening line of perl man page
David Golden [Thu, 11 Feb 2010 20:04:54 +0000 (15:04 -0500)]
Revised opening line of perl man page

This patch was reviewed with Larry Wall via IRC.  His stipulation was
that both historical glossses be preserved to humorous effect.

14 years agorevert perl -h changes
David Golden [Thu, 11 Feb 2010 19:15:10 +0000 (14:15 -0500)]
revert perl -h changes

14 years agoBug in Safe 2.21 re propagating exceptions
Tim Bunce [Thu, 11 Feb 2010 10:29:17 +0000 (11:29 +0100)]
Bug in Safe 2.21 re propagating exceptions

An exception thrown from a closure gets lost.
I've boiled it down to this:

   perl -MSafe -e 'Safe->new->reval(q{sub { die @_ }})->(qq{ok\n})'

That should die with "ok".

The problem is that the closure that wraps any returned code ref if
threads are enabled is acting as an eval block so hiding the exception.

14 years ago[perl #72590] Panic if 'use strict' and forget 'my'
Rafael Garcia-Suarez [Thu, 11 Feb 2010 09:32:01 +0000 (10:32 +0100)]
[perl #72590] Panic if 'use strict' and forget 'my'

That bug happens when we detect a compilation error in the statement
being parsed, and when the continuation of the parsing of that same
statement needs to load the file unicore/Name.pl via charnames.pm.
In that case perl gets confused, fails to parse Name.pl because
the parser is already in error, and also fails to properly rewind
to a normal error-reporting state.

This patch does not attempt to fix the whole error-reporting process;
instead, it simply prevents perl from trying to load charnames if it has
already recorded a parse error. So, in a way, it hides the bug under
the carpet. However, this is a safe fix, suitable for a code-freeze
stage.

14 years agokeep -h to 80 characters or less
David Golden [Thu, 11 Feb 2010 03:54:43 +0000 (22:54 -0500)]
keep -h to 80 characters or less

14 years agoHelp new users learn how to get help
David Golden [Thu, 11 Feb 2010 03:13:59 +0000 (22:13 -0500)]
Help new users learn how to get help

14 years agoNote a change in warnings::register's behavior in 5.10 that wasn't documented at...
Jesse Vincent [Thu, 11 Feb 2010 02:05:08 +0000 (18:05 -0800)]
Note a change in warnings::register's behavior in 5.10 that wasn't documented at the time. Resolves [perl #62522]

14 years agoPer Jesse, ignoring the skipping the tests form threaded OpenBSD
Steve Peters [Thu, 11 Feb 2010 01:41:48 +0000 (19:41 -0600)]
Per Jesse, ignoring the skipping the tests form threaded OpenBSD
builds.  See RT #71504 for the mess that this is avoiding.

14 years agoFix for non-regexps being upgraded to SVt_REGEXP
Nicholas Clark [Tue, 9 Feb 2010 16:11:34 +0000 (08:11 -0800)]
Fix for non-regexps being upgraded to SVt_REGEXP

$ ./perl -lwe '$a = ${qr//}; $a = 2; print re::is_regexp(\$a)'
1

It is possible for arbitrary SVs (eg PAD entries) to be upgraded to
SVt_REGEXP.  (This is new with first class regexps)

Whilst the example above does not SEGV, it will be possible to write
code that will cause SEGVs (or worse) at the point when the scalar is freed,
because the code in sv_clear() assumes that all scalars of type
SVt_REGEXP *are* regexps, and passes them to pregfree2(), which assumes that
pointers within are valid.

14 years agoregenerated Configure after backport cat ../perl/Configure >Configure
H.Merijn Brand [Tue, 9 Feb 2010 15:44:30 +0000 (16:44 +0100)]
regenerated Configure after backport cat ../perl/Configure >Configure

Please keep them sorted

14 years agoMerge branch 'blead' of ssh://perl5.git.perl.org/gitroot/perl into blead
Jesse Vincent [Tue, 9 Feb 2010 15:35:19 +0000 (07:35 -0800)]
Merge branch 'blead' of ssh://perl5.git.perl.org/gitroot/perl into blead

* 'blead' of ssh://perl5.git.perl.org/gitroot/perl:
  Warn people not to set PERL_CORE in XS
  In embed.fnc the 'E' flag should imply 'X', but doesn't.
  revise perldelta note on strict and lax version rules
  expand flag descriptions in in embed.fnc
  alphabetically sort flag descriptions in embed.fnc
  [perl #72156]: substitute `less -R' for `less' for groff's new usage
  INSTALL doc fix: calling the test suite using -MTestInit changed since it moved to top level (which happened in commit 30b6e59101b252c20a6b50b95203d1e2c6016604)
  changed "an UTF..." to "a UTF..." in all Pods

14 years agoDocument unless () {} elsif () {} else {} and tell people not to use it.
Jesse Vincent [Tue, 9 Feb 2010 15:31:16 +0000 (07:31 -0800)]
Document unless () {} elsif () {} else {} and tell people not to use it.

Note to the deprecation police: this is not a language construct
deprecation. Just a bit of healthy advice about coding style.
Who knows. In a decade, this may be the lynchpin of "postmodern perl".

14 years ago"unless else" wasn't previously documented, though it was valid syntax
Reini Urban [Tue, 9 Feb 2010 15:17:00 +0000 (07:17 -0800)]
"unless else" wasn't previously documented, though it was valid syntax

14 years agoWarn people not to set PERL_CORE in XS
David Mitchell [Mon, 8 Feb 2010 21:07:56 +0000 (21:07 +0000)]
Warn people not to set PERL_CORE in XS

14 years agoIn embed.fnc the 'E' flag should imply 'X', but doesn't.
Jan Dubois [Mon, 8 Feb 2010 03:06:50 +0000 (19:06 -0800)]
In embed.fnc the 'E' flag should imply 'X', but doesn't.

14 years agorevise perldelta note on strict and lax version rules
David Golden [Mon, 8 Feb 2010 02:25:20 +0000 (21:25 -0500)]
revise perldelta note on strict and lax version rules

14 years agoexpand flag descriptions in in embed.fnc
David Mitchell [Sun, 7 Feb 2010 20:12:18 +0000 (20:12 +0000)]
expand flag descriptions in in embed.fnc

For each flag, try to list what precise effects that flag has

14 years agoalphabetically sort flag descriptions in embed.fnc
David Mitchell [Sun, 7 Feb 2010 18:44:34 +0000 (18:44 +0000)]
alphabetically sort flag descriptions in embed.fnc

14 years ago[perl #72156]: substitute `less -R' for `less' for groff's new usage
Josh ben Jore [Mon, 1 Feb 2010 16:05:13 +0000 (08:05 -0800)]
[perl #72156]: substitute `less -R' for `less' for groff's new usage
of ANSI escape codes by setting $Config{less} (and thereby
$Config{pager}).

14 years agoINSTALL doc fix: calling the test suite using -MTestInit changed since it moved to...
Slaven Rezic [Sat, 6 Feb 2010 22:14:56 +0000 (23:14 +0100)]
INSTALL doc fix: calling the test suite using -MTestInit changed since it moved to top level (which happened in commit 30b6e59101b252c20a6b50b95203d1e2c6016604)

14 years agochanged "an UTF..." to "a UTF..." in all Pods
Slaven Rezic [Sat, 6 Feb 2010 22:19:39 +0000 (23:19 +0100)]
changed "an UTF..." to "a UTF..." in all Pods

14 years agoRemoving invalid port L<> links from Version documentation updates.
Jesse Vincent [Sun, 7 Feb 2010 02:06:56 +0000 (18:06 -0800)]
Removing invalid port L<> links from Version documentation updates.

14 years agoMerge branch 'blead' of ssh://perl5.git.perl.org/gitroot/perl into blead
Jesse Vincent [Sun, 7 Feb 2010 02:02:40 +0000 (18:02 -0800)]
Merge branch 'blead' of ssh://perl5.git.perl.org/gitroot/perl into blead

* 'blead' of ssh://perl5.git.perl.org/gitroot/perl:
  move version details to version::Internals and other clean up
  document version::is_strict/is_lax
  Document usage of version regexps
  Export and document is_lax and is_strict functions
  note that delete/exists ARRAY_ELEM should be avoided
  Don't try to calculate a time over the conservative failure boundary.

14 years agoImprovements to 31c9a3 - CPAN code did depend on the previous behaviour of blessing...
Nicholas Clark [Sun, 7 Feb 2010 01:55:32 +0000 (17:55 -0800)]
Improvements to 31c9a3 - CPAN code did depend on the previous behaviour of blessing filehandles into FileHandle

It turns out that it's not quite as simple as blessing into IO::File.
If you do (just) that, then it breaks any existing code that does
C<require IO::Handle;> to allow it to call methods on file handles,
because they're blessed into IO::File, which isn't loaded. (Note this code
doesn't assume that methods in IO::Seekable are there to be called)

So, it all should work if you also set @IO::File:::ISA correctly?
That way, code that assumes that methods from IO::Handle can be called will
work. However, gv.c now starts complaining (but not failing) if IO::Handle,
IO::Seekable and Exporter aren't present, because it goes looking for
methods in them.

So the solution seems to be to set @IO::File::ISA *and* create (empty)
stashes for the other 3 packages. Patch appended, but not applied.

14 years agomove version details to version::Internals and other clean up
David Golden [Sat, 6 Feb 2010 20:09:20 +0000 (15:09 -0500)]
move version details to version::Internals and other clean up

14 years agodocument version::is_strict/is_lax
David Golden [Sat, 6 Feb 2010 19:12:21 +0000 (14:12 -0500)]
document version::is_strict/is_lax

14 years agoDocument usage of version regexps
John Peacock [Wed, 27 Jan 2010 01:47:54 +0000 (20:47 -0500)]
Document usage of version regexps

Move the discussion of what each regexp coveres to version::Internals
and limit the discussion in the main POD to just include examples.

14 years agoExport and document is_lax and is_strict functions
John Peacock [Tue, 26 Jan 2010 02:49:55 +0000 (21:49 -0500)]
Export and document is_lax and is_strict functions

Allow the is_lax and is_strict functions to be optionally
exported to the caller's namespace (without having to use Exporter).

Document the usage of is_lax and is_strict, plus nuke some trailing
spaces.

14 years agonote that delete/exists ARRAY_ELEM should be avoided
Ricardo Signes [Sat, 6 Feb 2010 18:17:01 +0000 (13:17 -0500)]
note that delete/exists ARRAY_ELEM should be avoided

addreses final determination of http://rt.perl.org/rt3/Public/Bug/Display.html?id=72064

14 years agoDon't try to calculate a time over the conservative failure boundary.
Michael G. Schwern [Sun, 31 Jan 2010 11:22:08 +0000 (03:22 -0800)]
Don't try to calculate a time over the conservative failure boundary.

Otherwise gmtime(2**66) will cause a very, very, very long loop and
DOS Perl.

Add a test that very, very large times don't send gmtime and localtime into a loop

Had to fix some revealed mistakes in op/time.t when warnings were turned on.

Fix Time::gmtime and Time::localtime tests to match the new limits of gm/localtime.

14 years agoUpgrade CPAN to 1.94_55
Steffen Mueller [Thu, 4 Feb 2010 19:18:45 +0000 (20:18 +0100)]
Upgrade CPAN to 1.94_55

14 years agoRevert "Update to MIME-Base64 3.09"
Jesse Vincent [Wed, 3 Feb 2010 20:41:13 +0000 (12:41 -0800)]
Revert "Update to MIME-Base64 3.09"

I chatted with Gisle and he confirmed that this didn't fix a
release-blocking issue. Since we're frozen for 5.12, he agreed that we
should back it out.

This reverts commit 5e58db16ffcf34442d0ba4b645757884324e35c2.

14 years agoMerge branch 'blead' of ssh://perl5.git.perl.org/gitroot/perl into blead
Jesse Vincent [Wed, 3 Feb 2010 17:44:19 +0000 (09:44 -0800)]
Merge branch 'blead' of ssh://perl5.git.perl.org/gitroot/perl into blead

* 'blead' of ssh://perl5.git.perl.org/gitroot/perl:
  Tests for RT #72432

14 years agoAllow arbitrary whitespace between NAME and VERSION in "package NAME VERSION;" statements
Jesse Vincent [Wed, 3 Feb 2010 17:43:08 +0000 (09:43 -0800)]
Allow arbitrary whitespace between NAME and VERSION in "package NAME VERSION;" statements

Fixes [perl #72432]

14 years agoTests for RT #72432
Abigail [Wed, 3 Feb 2010 17:25:46 +0000 (18:25 +0100)]
Tests for RT #72432

14 years agoadd a watchdog for schwern's time overflow tests.
Jesse Vincent [Wed, 3 Feb 2010 15:23:58 +0000 (07:23 -0800)]
add a watchdog for schwern's time overflow tests.

14 years agoAdd sanity checks for far, far distant dates.
Michael G. Schwern [Sat, 30 Jan 2010 09:41:59 +0000 (01:41 -0800)]
Add sanity checks for far, far distant dates.

Can't go beyond y2**31 because of the 32 bit year

Adds a test that we can make it to at least +/-2**52.  This is the
missing test for 455f2c6c92e42c1a9e31268cbd491ba661f99882 which kicked this
whole thing off.

Signed-off-by: Michael G. Schwern <schwern@pobox.com>
14 years agoUpdate to MIME-Base64 3.09
Gisle Aas [Tue, 2 Feb 2010 22:22:15 +0000 (23:22 +0100)]
Update to MIME-Base64 3.09

Fixes issue where the Quoted-Printable encoder would sometimes output
lines that were 77 characters long.  The max line length should be 76.

14 years agoDiagnostic improvements to better understand why lib/Benchark.t test 13 has been...
Todd Rinaldo [Tue, 2 Feb 2010 17:27:37 +0000 (09:27 -0800)]
Diagnostic improvements to better understand why lib/Benchark.t test 13 has been failing smoke randomly.

Fix 1: Original code tests for less than but not =. I think that if these values are the same, the test should pass. I don't know the code well enough to be 100% sure. D
Fix 2: convert ok() to cmp_ok() for better diagnostic messages from smoke tests when they happen.
Fix 3: convert print to diag() so it will properly print through harness.

14 years ago[PATCH] Add gcc predefined macros to $Config{cppsymbols} on GNU/Hurd.
H.Merijn Brand [Mon, 1 Feb 2010 11:58:57 +0000 (12:58 +0100)]
[PATCH] Add gcc predefined macros to $Config{cppsymbols} on GNU/Hurd.

This is needed at least by h2ph, otherwise the generated .ph files
choke on missing __LONG_MAX__ and similar definitions.

Patch by Samuel Thibault <sthibault@debian.org>.

Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
14 years agogmtime/localtime are busted around 2**48
Michael G Schwern [Sun, 31 Jan 2010 10:53:43 +0000 (02:53 -0800)]
gmtime/localtime are busted around 2**48

Michael G Schwern wrote:
> Anyhow, I'm willing to let that drop, but I want figure out A) why its
> failing so early because it might be masking a bug, this is not
> predicted behavior, and most importantly B) to get it to error, or at
> least warn.
>
> I know B is possible, I did it for Time::y2038.  I'll figure that part
> out and try to dig into A.  I would like to call B a blocker for 5.12.

Found the bug, patch attached.

v_tm_tday is an NV, so casting time to an integer will cause an overflow
2**31 days after 1970 or somewhere between 2**47 and 2**48.  Not sure why the
compiler didn't warn about that.

This makes it work until the year overflows.

As for putting in a warning, there's two options:
1) A few days before the 32 bit year overflows.
2) At some reasonable point before there's too much floating point inaccuracy.

The possibility of long doubles will make #2 difficult to nail down, but I'll
be happy with +/- 2**53.

--
24. Must not tell any officer that I am smarter than they are, especially
     if it's true.
     -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army
            http://skippyslist.com/list/

From 9e940e610ac5b2fbb09a554f505963094a4a0745 Mon Sep 17 00:00:00 2001
From: Michael G. Schwern <schwern@pobox.com>
Date: Sun, 31 Jan 2010 02:24:50 -0800
Subject: [PATCH] Type conversion bug in gmtime64 that was causing it to crap out around 2**48

Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
14 years agoClarify warning that e.g. \q is reserved
Karl Williamson [Sat, 30 Jan 2010 19:06:05 +0000 (12:06 -0700)]
Clarify warning that e.g. \q is reserved

Currently the meaning of e.g. \q is simply 'q', with a warning
generated.  Elsewhere it is documented that this means that \q is
thus a reserved term, available for Perl to co-opt in some future
release.  But the warning doesn't say that.  Clarify it.

14 years agoFix POD typo
Frank Wiegand [Sat, 30 Jan 2010 08:54:32 +0000 (09:54 +0100)]
Fix POD typo

14 years agosuggestion to use GET URL
Ricardo Signes [Fri, 29 Jan 2010 00:19:13 +0000 (19:19 -0500)]
suggestion to use GET URL

14 years agoFix a broken pod link
Jesse Vincent [Thu, 28 Jan 2010 23:39:42 +0000 (15:39 -0800)]
Fix a broken pod link

14 years ago* Fill out the docs on the yada to show it as a satand in for statements, not expressions
brian d foy [Thu, 28 Jan 2010 20:22:43 +0000 (14:22 -0600)]
* Fill out the docs on the yada to show it as a satand in for statements, not expressions

14 years agoMerge branch 'blead' of ssh://perl5.git.perl.org/gitroot/perl into blead
Abigail [Thu, 28 Jan 2010 20:16:50 +0000 (21:16 +0100)]
Merge branch 'blead' of ssh://perl5.git.perl.org/gitroot/perl into blead

14 years agoAdd a few regression tests, making sure ... is parsed as a range operator
Abigail [Thu, 28 Jan 2010 20:16:33 +0000 (21:16 +0100)]
Add a few regression tests, making sure ... is parsed as a range operator

14 years agoClean up 5.12 delta pod concerning regexes and Unicode changes
Karl Williamson [Thu, 28 Jan 2010 16:20:54 +0000 (09:20 -0700)]
Clean up 5.12 delta pod concerning regexes and Unicode changes

14 years agoResort MANIFEST.
Nicholas Clark [Thu, 28 Jan 2010 11:37:28 +0000 (11:37 +0000)]
Resort MANIFEST.

14 years agoRemove duplicate entries from MANIFEST
Steve Hay [Wed, 27 Jan 2010 22:54:16 +0000 (22:54 +0000)]
Remove duplicate entries from MANIFEST

14 years agoAdd Porting/check-cpan-pollution to MANIFEST
Steve Hay [Wed, 27 Jan 2010 22:46:23 +0000 (22:46 +0000)]
Add Porting/check-cpan-pollution to MANIFEST

14 years ago* Note that the flip-flop operator maintains state across subroutine calls
brian d foy [Wed, 27 Jan 2010 03:54:32 +0000 (21:54 -0600)]
* Note that the flip-flop operator maintains state across subroutine calls

14 years agoCheck for Maintainers.pl updates
Steffen Mueller [Tue, 26 Jan 2010 16:31:52 +0000 (17:31 +0100)]
Check for Maintainers.pl updates

Make Porting/check-cpan-pollution test whether a given, presumably safe
commit to dual-lived modules also updated Porting/Maintainers.pl.

14 years agoPorting/ tool: Check for bad commits against cpan/
Steffen Mueller [Tue, 26 Jan 2010 16:23:38 +0000 (17:23 +0100)]
Porting/ tool: Check for bad commits against cpan/

Porting/check-cpan-pollution runs a series of tests to find potentially
unsafe commits that change dual-lived modules and prints a summary.