This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
13 years agoExplicitly disable unicode for non-unicode tests in t/op/warn.t
Tony Cook [Fri, 17 Sep 2010 09:46:10 +0000 (19:46 +1000)]
Explicitly disable unicode for non-unicode tests in t/op/warn.t

These would fail when smokes tested under unicode locales.

13 years agoPATCH: perldelta entry for [\8] [perl #76840] fix.
Karl Williamson [Thu, 16 Sep 2010 19:26:07 +0000 (13:26 -0600)]
PATCH: perldelta entry for [\8] [perl #76840] fix.

13 years agoreftype() used without checking for undef
Chas. Owens [Thu, 16 Sep 2010 14:59:30 +0000 (16:59 +0200)]
reftype() used without checking for undef

Hash::Util used "reftype($v) eq 'HASH'" without checking for
undefinendness. This patch rectifies that. Also bumps Hash::Util
version.

Original patch and detective work by Chas. Owens. Modified by Steffen
Mueller.

13 years agoBack out the mauve module and related changes
Florian Ragwitz [Sun, 5 Sep 2010 18:30:54 +0000 (20:30 +0200)]
Back out the mauve module and related changes

It's was intended as a temporary namespace only, and we really don't want to
ship it in any release until we've figured out what it should really look like.

This reverts commit 05c0d6bbe3ec5cc9af99d105b8648ad02ed7cc95,
  "add sv_reftype_len() and make sv_reftype() be a wrapper for it"
commit 792477b9c2e4c75cb03d07bd6d25dc7e1fdf448e,
 "create the "mauve" temporary namespace for things like reftype"
commit 8df6b97c1de8326d50ac9c8cae4bf716393b45bb,
  "mauve.t needs access to %Config, make sure it's available"
commit cfe9162d0d593cd12a979c73df82c7509b324343,
 "use more efficient sv_reftype_len() interface"
and commit 47b13905e23c2a72acdde8bb4669e25e5eaefec4
  "add more tests to lib/mauve.t so it tests also that mauve::reftype can return "LVALUE""

There's a `mauve' branch still containing all the code for the temporary mauve
namespace. That should be used to work on it until it's mostly ready to be
released, and only then merged to blead. Alternatively, it should be deleted if
another way to provide mauve's features in the core is found.

13 years agoFix /[\8]/ to not match NULL; give correct warning
Karl Williamson [Sun, 18 Jul 2010 18:28:14 +0000 (12:28 -0600)]
Fix /[\8]/ to not match NULL; give correct warning

8 and 9 are not treated as alphas in parsing as opposed to illegal
octals.

This also adds tests to verify that 1-3 digits work in char classes.

I created an isOCTAL macro in case that lookup gets moved to a bit
field, as I plan to do later, for speed.

13 years agoFix "Wide character in warn" warning
Father Chrysostomos [Thu, 16 Sep 2010 12:09:17 +0000 (14:09 +0200)]
Fix "Wide character in warn" warning

13 years agoFix warn to respect utf8-encoded scalars [perl #45549]
Father Chrysostomos [Thu, 16 Sep 2010 12:07:50 +0000 (14:07 +0200)]
Fix warn to respect utf8-encoded scalars [perl #45549]

13 years agochange warn.t to use test.pl
Father Chrysostomos [Thu, 16 Sep 2010 12:07:13 +0000 (14:07 +0200)]
change warn.t to use test.pl

13 years agoAdd info regarding AIX 7.1
Rainer Tammer [Thu, 16 Sep 2010 07:22:52 +0000 (09:22 +0200)]
Add info regarding AIX 7.1

13 years agoadd hv_copy_hints_hv and save_hints to the API
Zefram [Tue, 14 Sep 2010 23:21:16 +0000 (00:21 +0100)]
add hv_copy_hints_hv and save_hints to the API

13 years ago'make regen' really shouldn't be special
Jim Cromie [Thu, 17 Jun 2010 02:38:12 +0000 (20:38 -0600)]
'make regen' really shouldn't be special

Revert 'make regen' special case advice of
94e892a68016a417b1b324213d39309b8b744d0e, leave the minor whitespace cleanup.

13 years agoFix a pod link I broke
Florian Ragwitz [Wed, 15 Sep 2010 23:45:52 +0000 (01:45 +0200)]
Fix a pod link I broke

Oooops!

13 years agoif.pm is upstream blead
Florian Ragwitz [Wed, 15 Sep 2010 23:25:06 +0000 (01:25 +0200)]
if.pm is upstream blead

13 years agoCPAN is UPSTREAM for Digest and Digest-MD5
Gisle Aas [Wed, 15 Sep 2010 18:01:02 +0000 (20:01 +0200)]
CPAN is UPSTREAM for Digest and Digest-MD5

13 years agoAdd Rob to AUTHORS
Florian Ragwitz [Wed, 15 Sep 2010 17:45:29 +0000 (19:45 +0200)]
Add Rob to AUTHORS

13 years agoUpdate AUTOLOAD section in perlsub
Rob Hoelz [Mon, 13 Sep 2010 16:44:57 +0000 (11:44 -0500)]
Update AUTOLOAD section in perlsub

AUTOLOAD documentation didn't mention that if AUTOLOAD is implemented
as an XSUB, $AUTOLOAD is not populated.

13 years agoperlunicode.pod: Clarify user-defined casing.
Karl Williamson [Wed, 15 Sep 2010 16:49:30 +0000 (10:49 -0600)]
perlunicode.pod: Clarify user-defined casing.

I ran some experiments and found out that the user-defined casing worked
in ways that were surprises to me. And thus, this brutally lays out its
shortcomings.

13 years agoPATCH: regex longjmp flaws
Karl Williamson [Wed, 15 Sep 2010 16:39:34 +0000 (10:39 -0600)]
PATCH: regex longjmp flaws

The netbsd - 5.0.2 compiler pointed out that the recent changes to add
longjmps to speed up some regex compilations can result in clobbering a
few values.  These depend on the compiled code, and so didn't show up in
other compiler's warnings.  This patch reinitializes them after a
longjmp.

13 years agoAdd new_ok() to create and test objects. From Test::More.
Michael G. Schwern [Tue, 14 Sep 2010 02:14:54 +0000 (19:14 -0700)]
Add new_ok() to create and test objects. From Test::More.

13 years agoAdd note() to put informational notes into the TAP (from Test::More)
Michael G. Schwern [Tue, 14 Sep 2010 02:14:30 +0000 (19:14 -0700)]
Add note() to put informational notes into the TAP (from Test::More)

13 years agoAdd done_testing from Test::More
Michael G. Schwern [Tue, 14 Sep 2010 02:14:04 +0000 (19:14 -0700)]
Add done_testing from Test::More

13 years agoShut up "used only once" warnings.
Michael G. Schwern [Tue, 14 Sep 2010 02:10:18 +0000 (19:10 -0700)]
Shut up "used only once" warnings.

Not very elegant, but it avoids using $^W or warnings.pm.

13 years agoMerge branch 'briandfoy/perlfaq' of ssh://perl5.git.perl.org/perl into briandfoy...
brian d foy [Wed, 15 Sep 2010 15:22:39 +0000 (10:22 -0500)]
Merge branch 'briandfoy/perlfaq' of ssh://perl5.git.perl.org/perl into briandfoy/perlfaq

13 years agoMove book info to perlbook from perlfaq2
brian d foy [Wed, 15 Sep 2010 14:57:02 +0000 (09:57 -0500)]
Move book info to perlbook from perlfaq2

* Updated all the book info
* Added some missing books
* Don't call the Camel 'definitive' anymore, until we update it :)
* There's more to do, but this is enough to now

13 years agoUpgrade Math::BigRat from version 0.25 to 0.26
Florian Ragwitz [Wed, 15 Sep 2010 14:54:22 +0000 (16:54 +0200)]
Upgrade Math::BigRat from version 0.25 to 0.26

Lots of unnecessary test boilerplate has been removed, allowing us to remove the
dist from both %abs and %temp_no_core in t/TEST.

13 years agoWe now include Safe version 2.28
Florian Ragwitz [Wed, 15 Sep 2010 02:17:03 +0000 (04:17 +0200)]
We now include Safe version 2.28

13 years agoSynchronize Module-CoreList's META.yml
Florian Ragwitz [Wed, 15 Sep 2010 02:06:55 +0000 (04:06 +0200)]
Synchronize Module-CoreList's META.yml

I wish it would just be deleted. Apparently no one ever uses the one in blead.

13 years agoUpgrade bignum from version 0.24 to 0.25
Florian Ragwitz [Wed, 15 Sep 2010 01:46:02 +0000 (03:46 +0200)]
Upgrade bignum from version 0.24 to 0.25

13 years agoBump $open::VERSION
Florian Ragwitz [Wed, 15 Sep 2010 01:28:58 +0000 (03:28 +0200)]
Bump $open::VERSION

13 years agoUpgrade Math::BigRat from version 0.24 to 0.25
Florian Ragwitz [Tue, 14 Sep 2010 19:27:15 +0000 (21:27 +0200)]
Upgrade Math::BigRat from version 0.24 to 0.25

13 years agoPod fix for perldelta
Florian Ragwitz [Tue, 14 Sep 2010 20:01:40 +0000 (22:01 +0200)]
Pod fix for perldelta

13 years agoperldelta up to a1bbdff
Florian Ragwitz [Tue, 14 Sep 2010 17:48:03 +0000 (19:48 +0200)]
perldelta up to a1bbdff

13 years agoMerge branch 'briandfoy/perlfaq' of ssh://perl5.git.perl.org/perl into briandfoy...
brian d foy [Tue, 14 Sep 2010 17:22:15 +0000 (12:22 -0500)]
Merge branch 'briandfoy/perlfaq' of ssh://perl5.git.perl.org/perl into briandfoy/perlfaq

13 years ago* Add multilevel hash exists() to perlfaq4
brian d foy [Tue, 14 Sep 2010 17:16:49 +0000 (12:16 -0500)]
* Add multilevel hash exists() to perlfaq4

 How can I check if a keys exists in a multilevel hash?

How is it we got this far without ever answering this
FAQ? :)

13 years ago* Added a smart match example to perlfaq6
brian d foy [Tue, 14 Sep 2010 17:15:10 +0000 (12:15 -0500)]
* Added a smart match example to perlfaq6

How do I efficiently match many regular expressions at once?

It's almost trivial with smart matching. Barely worth
asking anymore.

13 years agoMore whitespace cleanups
brian d foy [Mon, 13 Sep 2010 03:56:58 +0000 (22:56 -0500)]
More whitespace cleanups

13 years agoWhitespace cleanups
brian d foy [Mon, 13 Sep 2010 03:53:09 +0000 (22:53 -0500)]
Whitespace cleanups

13 years agoperlfaq4: fix a minor grammar problem in the Y2K answer
brian d foy [Wed, 1 Sep 2010 07:32:12 +0000 (03:32 -0400)]
perlfaq4: fix a minor grammar problem in the Y2K answer

13 years ago* Correct Higher Order Perl to Higher-Order Perl
brian d foy [Sun, 22 Aug 2010 18:53:59 +0000 (13:53 -0500)]
* Correct Higher Order Perl to Higher-Order Perl

13 years agoFix trailing whitespace
brian d foy [Sat, 21 Aug 2010 17:03:46 +0000 (12:03 -0500)]
Fix trailing whitespace

13 years ago* Update Effective Perl Programming reference
brian d foy [Sat, 21 Aug 2010 17:01:02 +0000 (12:01 -0500)]
* Update Effective Perl Programming reference

13 years ago* How can I read in an entire file all at once?
brian d foy [Sat, 21 Aug 2010 16:37:49 +0000 (11:37 -0500)]
* How can I read in an entire file all at once?
+ Incorporate a few suggestions from Uri

13 years ago* How can I read in an entire file all at once?
brian d foy [Sat, 21 Aug 2010 16:27:10 +0000 (11:27 -0500)]
* How can I read in an entire file all at once?
* Modulate my assertions about File::Map

13 years ago* How come when I open a file read-write it wipes it out?
brian d foy [Sat, 21 Aug 2010 16:23:28 +0000 (11:23 -0500)]
* How come when I open a file read-write it wipes it out?
+ adjust some code lines to come in under 80 columns
+ other minor formatting issues.

13 years ago* How do I handle linked lists?
brian d foy [Sat, 21 Aug 2010 16:12:35 +0000 (11:12 -0500)]
* How do I handle linked lists?
+ Steve Lembark makes interesting cases for perly
linked lists, depending on the task.

13 years ago* How can I write() into a string?
brian d foy [Sat, 21 Aug 2010 15:47:37 +0000 (10:47 -0500)]
* How can I write() into a string?
+ Actually answer the question, now that we have
filehandles to strings.
+ The swrite in perlform is no good anyway.

13 years agoHow do I make sure users can't enter values into a form that cause my CGI script...
brian d foy [Sat, 21 Aug 2010 00:10:21 +0000 (19:10 -0500)]
How do I make sure users can't enter values into a form that cause my CGI script to do bad things?
+ The CGI Meta FAQ is gone, so this needs a new
answer

13 years ago* My CGI script runs from the command line but not the browser.
brian d foy [Sat, 21 Aug 2010 00:00:02 +0000 (19:00 -0500)]
* My CGI script runs from the command line but not the browser.
+ Tom's troubleshooting guide has disappeared in
the perl.com move (I think).
+ The CGI Meta FAQ is not such a fresh resource

13 years ago* How do I fetch/put an FTP file?
brian d foy [Fri, 20 Aug 2010 23:45:23 +0000 (18:45 -0500)]
* How do I fetch/put an FTP file?
+ Net::FTP has been in core a long time
l Please enter the commit message for your changes. Lines starting

13 years ago* Add multilevel hash exists() to perlfaq4
brian d foy [Tue, 14 Sep 2010 17:16:49 +0000 (12:16 -0500)]
* Add multilevel hash exists() to perlfaq4

 How can I check if a keys exists in a multilevel hash?

How is it we got this far without ever answering this
FAQ? :)

13 years ago* Added a smart match example to perlfaq6
brian d foy [Tue, 14 Sep 2010 17:15:10 +0000 (12:15 -0500)]
* Added a smart match example to perlfaq6

How do I efficiently match many regular expressions at once?

It's almost trivial with smart matching. Barely worth
asking anymore.

13 years agoIn Perl_ck_subr(), no need to create/set o3 in the !proto block.
Nicholas Clark [Tue, 14 Sep 2010 09:09:29 +0000 (10:09 +0100)]
In Perl_ck_subr(), no need to create/set o3 in the !proto block.

A good optimising compiler can already spot this, but removing dead code makes
it easier for the humans.

13 years agoUpgrade Math::BigInt::FastCalc from 0.21 to 0.22
Florian Ragwitz [Mon, 13 Sep 2010 23:02:03 +0000 (01:02 +0200)]
Upgrade Math::BigInt::FastCalc from 0.21 to 0.22

13 years agoUpgrade Math::BigInt from version 1.93 to 1.95
Florian Ragwitz [Mon, 13 Sep 2010 22:44:35 +0000 (00:44 +0200)]
Upgrade Math::BigInt from version 1.93 to 1.95

13 years agoMake the setting of write-bits safer in Porting\makerel
Steve Hay [Mon, 13 Sep 2010 20:32:50 +0000 (21:32 +0100)]
Make the setting of write-bits safer in Porting\makerel

When rolling a release on Windows it is useful to use the Cygwin tools, but
the chmod command doesn't honour the user's umask when operating outside of
the Cygwin bash shell. For example, with a umask of 0022 and a file having
permissions 0400, one would expect "chmod +w" to change the file's
permissions to 0600. It does inside the Cygwin bash shell, but inside the
standard Windows command prompt it changes the file permissions to 0622
instead.

The problem is avoided by using "chmod u+w" instead to be sure that we only
set the write-bit for the owner user.

Note that the PAUSE indexer now detects uploads containining world writable
files or directories and will not index them. In such cases, it generates
new tarballs with "-withoutworldwritables" injected into the names and
indexes those instead of the original uploads. We do not want this
happening to perl distributions!

13 years agoFix typo in Porting\makerel comments
Steve Hay [Mon, 13 Sep 2010 19:41:24 +0000 (20:41 +0100)]
Fix typo in Porting\makerel comments

13 years agoAdd perl-5.12.2 to perlhist.pod
Steve Hay [Mon, 13 Sep 2010 19:34:57 +0000 (20:34 +0100)]
Add perl-5.12.2 to perlhist.pod

13 years agoIn Perl_ck_subr, remove delete_op, unused since assertions were removed.
Nicholas Clark [Mon, 13 Sep 2010 15:31:11 +0000 (16:31 +0100)]
In Perl_ck_subr, remove delete_op, unused since assertions were removed.

The implementation of assertions was (mostly) removed in 584420f022db5722.
It turns out that b1233c72f2dabb53 didn't remove the last vestige of it.

13 years agoUpgrade Math::BigInt from version 1.92 to 1.93
Florian Ragwitz [Mon, 13 Sep 2010 14:47:53 +0000 (16:47 +0200)]
Upgrade Math::BigInt from version 1.92 to 1.93

13 years agoMake Math-BigInt require perl 5.6.2
Florian Ragwitz [Mon, 13 Sep 2010 14:18:50 +0000 (16:18 +0200)]
Make Math-BigInt require perl 5.6.2

It has been broken on 5.6.1 and earlier for quite some time now, and it isn't
clear why. If anyone wants 5.6.2 support back, patches are welcome.

13 years agoimprove open.pm layer class error message
Aristotle Pagaltzis [Mon, 13 Sep 2010 14:58:24 +0000 (16:58 +0200)]
improve open.pm layer class error message

13 years agoIn Perl_ck_subr(), move to once place all setting of bits in o->op_private.
Nicholas Clark [Mon, 13 Sep 2010 14:32:05 +0000 (15:32 +0100)]
In Perl_ck_subr(), move to once place all setting of bits in o->op_private.

The later conditional setting of HINT_STRICT_REFS and of OPpENTERSUB_DB are
unaffected by any code triggered by cvop->op_type. Moving them together lets
the C compiler produce better code.

13 years agoIn Perl_ck_subr(), consolidate all the prototype code in one if block.
Nicholas Clark [Mon, 13 Sep 2010 14:10:40 +0000 (15:10 +0100)]
In Perl_ck_subr(), consolidate all the prototype code in one if block.

This reveals that there is no need to set the variable prev when looping for
the !proto case.

13 years agoBump Safe's VERSION to 2.28
Rafael Garcia-Suarez [Mon, 13 Sep 2010 13:15:40 +0000 (15:15 +0200)]
Bump Safe's VERSION to 2.28

13 years agoAvoid infinite loop in _find_code_refs.
Rafael Garcia-Suarez [Mon, 13 Sep 2010 13:11:27 +0000 (15:11 +0200)]
Avoid infinite loop in _find_code_refs.

Patch by Yasushi Nakajima (rt.cpan.org #61262)

13 years agoIn Perl_ck_subr(), hoist the if (proto) check outside of the while loop.
Nicholas Clark [Mon, 13 Sep 2010 12:38:27 +0000 (13:38 +0100)]
In Perl_ck_subr(), hoist the if (proto) check outside of the while loop.

Prototype checking is currently 165 lines of code. The rest of the while loop
is 19, including comments. It's much easier to see how prototype checking fits
into the structure this way, *and* it avoids a repeated if check inside a loop.

13 years agoExtra tests for a regex followed by an operator or a statement modifier.
Bram [Mon, 13 Sep 2010 12:43:36 +0000 (14:43 +0200)]
Extra tests for a regex followed by an operator or a statement modifier.

(For example: m//and print "foo")

13 years agoAdd tests for 72922.
Bram [Sat, 27 Feb 2010 22:46:46 +0000 (23:46 +0100)]
Add tests for 72922.

Check that a Regex object which was previous copied and weaken'ed can be used in another pattern.

13 years agoregcomp.c: Use longjmp to abandon first pass quickly
Karl Williamson [Wed, 1 Sep 2010 17:40:32 +0000 (11:40 -0600)]
regcomp.c: Use longjmp to abandon first pass quickly

regcomp.c currently does a first pass to determine the size needed for
the regex.  If the regex needs to be in utf8, but this wasn't known at
the beginning of the pass the size computation needs to be completely
redone with that in mind.  The input is converted to utf8 and the first
pass is redone.  Prior to this patch, the discovery of needing to redo
the first pass merely set a flag and continued the now useless rest of
the first pass.  This patch causes this first pass to be aborted
immediately upon discovering that it will have to be redone.

This uses the Perl macros that wrap setjmp and longjmp.  When the first
pass is abandoned, it longjmps back to the corresponding setjmp to
convert to utf8 and redo.  I was advised that I could use setjmp and
longjump directly, but it seemed safer to use the wrappers, as they
should know about any platform-dependent issues.

If this code intercepts a longjmp that wasn't meant for it, it simply
reissues the longjmp so that the correct handler will get it.

This patch should have no effect on externally visible behavior, except
for a speedup of some regex compiles.

13 years agoregcomp.c: Macroize changing regex to utf8
Karl Williamson [Wed, 1 Sep 2010 16:32:44 +0000 (10:32 -0600)]
regcomp.c: Macroize changing regex to utf8

This is in preparation for changing what the macro will do.

13 years agoregcomp.c: Clarify and typos in comments
Karl Williamson [Wed, 1 Sep 2010 16:18:20 +0000 (10:18 -0600)]
regcomp.c: Clarify and typos in comments

13 years agohandy.h: Add bounds checking to case change arrays
Karl Williamson [Wed, 1 Sep 2010 02:20:01 +0000 (20:20 -0600)]
handy.h: Add bounds checking to case change arrays

This makes sure that the index into the arrays used to change between
lower and upper case will fit into their bounds; returning an error
character if not.  The check is likely to be optimized out if the index
is stored in 8 bits.

13 years agohandy.h: Add FITS_IN_8_BITS() macro
Karl Williamson [Wed, 1 Sep 2010 01:34:50 +0000 (19:34 -0600)]
handy.h: Add FITS_IN_8_BITS() macro

This macro is designed to be optimized out if the argument is
byte-length, but otherwise to be a bomb-proof way of making sure that
the argument occupies only 8 bits or fewer in whatever storage class it
is in.

13 years ago[perl #77684] Restore the 5.10/12 behaviour of open $fh, ">", \$glob_copy
Father Chrysostomos [Mon, 13 Sep 2010 07:57:15 +0000 (09:57 +0200)]
[perl #77684] Restore the 5.10/12 behaviour of open $fh, ">", \$glob_copy

This restores the perl 5.10/12 behaviour, making open treat \$foo as a
scalar reference if it is a glob copy (SvFAKE).

It also fixes an existing assertion failure that the test now trig-
gers. PerlIOScalar_pushed was not downgrading the sv before set-
ting SvCUR.

13 years agoMore whitespace cleanups
brian d foy [Mon, 13 Sep 2010 03:56:58 +0000 (22:56 -0500)]
More whitespace cleanups

13 years agoWhitespace cleanups
brian d foy [Mon, 13 Sep 2010 03:53:09 +0000 (22:53 -0500)]
Whitespace cleanups

13 years agoTest %main::OVERLOAD, which was almost broken by a proposed fix for
Father Chrysostomos [Mon, 13 Sep 2010 00:34:21 +0000 (02:34 +0200)]
Test %main::OVERLOAD, which was almost broken by a proposed fix for
[perl #76138].

13 years agoReverse uudmap.h and bitcount.h dependencies.
Craig A. Berry [Mon, 13 Sep 2010 00:05:49 +0000 (19:05 -0500)]
Reverse uudmap.h and bitcount.h dependencies.

uudmap.h is created first, so bitcount.h should depend on it
rather than vice versa.  Correcting this avoids unnecessary
recompiles of globals.c.

13 years agoInstall op_reg_common.h on VMS.
Craig A. Berry [Mon, 13 Sep 2010 00:01:34 +0000 (19:01 -0500)]
Install op_reg_common.h on VMS.

13 years agorename &warnings::register to avoid ambiguity
Ricardo Signes [Sun, 12 Sep 2010 19:27:55 +0000 (15:27 -0400)]
rename &warnings::register to avoid ambiguity

until this change code calling "warnings::register->import" was
confused by &warnings::register existing.

13 years agofix a couple of -Dmad compiler warnings
David Mitchell [Sun, 12 Sep 2010 11:27:19 +0000 (12:27 +0100)]
fix a couple of -Dmad  compiler warnings

13 years agofix hv.c API doc nits.
David Mitchell [Sat, 11 Sep 2010 23:01:46 +0000 (00:01 +0100)]
fix hv.c API doc nits.

In prehistoric times the first arg to many hash functions was called
tb rather than hv, and this was still reflected in some API notes.

13 years agolist cxt hash assign with dups gives garbage
David Mitchell [Sat, 11 Sep 2010 22:30:44 +0000 (23:30 +0100)]
list cxt hash assign with dups gives garbage

Fix for #31865: weird results from reverse( %x = reverse %h )

Basically, anything of the form
    @a = %h = (list with some duplicate keys)
may have left @a containing weird and/or freed values.

There was a partial fix for this with ca65944e, but it was broken
(it did one big block move on the stack at the end to remove duplicates,
but duplicates weren't necessarily all in one block.)

The new fix is a two-stage process. First, while pulling key/value pairs
of the stack and assigning them to the hash, each key/val pair is written
back to the stack - possibly at a lower position if there are duplicates to
be skipped.

Finally at the end if any duplicates have been detected, then in list
context, a single pass is made through the stack, and for each key/val
pair, the key is looked up and the val on the stack is overwritten with
the new value (replacing possibly freed or other garbage values).

13 years agoUpgrade EUMM from version 6.57_01 to 6.57_05
Florian Ragwitz [Sat, 11 Sep 2010 20:48:43 +0000 (22:48 +0200)]
Upgrade EUMM from version 6.57_01 to 6.57_05

13 years agoRemove obsolete test boilerplate from Math::BigInt::FastCalc.
Nicholas Clark [Sat, 11 Sep 2010 17:47:28 +0000 (18:47 +0100)]
Remove obsolete test boilerplate from Math::BigInt::FastCalc.

13 years agoConvert Math::BigInt::FastCalc tests from Test to Test::More.
Nicholas Clark [Sat, 11 Sep 2010 17:20:54 +0000 (18:20 +0100)]
Convert Math::BigInt::FastCalc tests from Test to Test::More.

13 years agoShorten external symbol name for VMS
Florian Ragwitz [Sat, 11 Sep 2010 14:22:45 +0000 (16:22 +0200)]
Shorten external symbol name for VMS

VMS seems to have a 31 character limitation for external symbols. To be able to
fit into that, rename 'coerce_qwlist_to_paren_list' to
'munge_qwlist_to_paren_list'.

13 years agoperldelta up to 38ef960
Florian Ragwitz [Sat, 11 Sep 2010 13:16:15 +0000 (15:16 +0200)]
perldelta up to 38ef960

13 years agoBump $POSIX::VERSION
Florian Ragwitz [Sat, 11 Sep 2010 13:13:37 +0000 (15:13 +0200)]
Bump $POSIX::VERSION

13 years agoAdd missing POSIX signal constants
Florian Ragwitz [Sat, 4 Sep 2010 21:27:28 +0000 (23:27 +0200)]
Add missing POSIX signal constants

13 years agoB-Debug 1.14
Reini Urban [Sat, 11 Sep 2010 08:22:54 +0000 (10:22 +0200)]
B-Debug 1.14

13 years agosegfault on &Internals::* due to missing SvROK()
Ævar Arnfjörð Bjarmason [Sat, 11 Sep 2010 09:58:02 +0000 (09:58 +0000)]
segfault on &Internals::* due to missing SvROK()

Change the &Internals::* functions that use references in their
prototypes to check if the argument is SvROK() before calling SvRV().

If the function is called as Internals::FOO() perl does this check for
us, but prototypes are bypassed on &Internals::FOO() so we still have
to check this manually.

This fixes [perl #77776], this bug was present in 5.10.x, 5.12.x, and
probably all earlier perl versions that had these functions, but I
haven't tested that.

I'm adding a new test file (t/lib/universal.t) to test universal.c
functions as part of this patch. The testing for Internal::* in t/ was
and is very sparse, but before universal.t there was no obvious place
to put these tests.

Signed-off-by: Ævar Arnfjörð Bjarmason <avar@cpan.org>
13 years agofix MAD breakage caused by qw patch
Zefram [Sat, 11 Sep 2010 10:37:04 +0000 (11:37 +0100)]
fix MAD breakage caused by qw patch

ea25a9b2cf73948b1e8c5675de027e0ad13277bd broke MAD due to incorrect
usage of the token-forcing mechanism.

13 years agodocumentation on hooking the peephole optimiser
Zefram [Fri, 10 Sep 2010 19:36:01 +0000 (20:36 +0100)]
documentation on hooking the peephole optimiser

Signed-off-by: Florian Ragwitz <rafl@debian.org>
[rafl@debian.org: Changed tabs to spaces in perlguts chunks for consistency]

13 years agoMention the warnings changes in "updated modules"
Florian Ragwitz [Fri, 10 Sep 2010 19:07:31 +0000 (21:07 +0200)]
Mention the warnings changes in "updated modules"

neither warnings nor warnings::register are new. Also mention the version
changes.

13 years agoBump $warnings{,::register}::VERSION
Florian Ragwitz [Fri, 10 Sep 2010 19:03:14 +0000 (21:03 +0200)]
Bump $warnings{,::register}::VERSION

13 years agoUpdate warnings.pl with the ::register changes
Florian Ragwitz [Fri, 10 Sep 2010 18:09:27 +0000 (20:09 +0200)]
Update warnings.pl with the ::register changes

Also regenerate lib/warnings.pm from that.

13 years agoperldelta for warnings updates
Ricardo Signes [Fri, 10 Sep 2010 15:11:14 +0000 (11:11 -0400)]
perldelta for warnings updates

13 years agoimprove registration of warning categories
Ricardo Signes [Wed, 8 Sep 2010 20:40:26 +0000 (16:40 -0400)]
improve registration of warning categories

1. &warnings::register is added as the public mechanism for adding
   new warning categories, rather than warnings::register::import
   knowing about warnings's internals

2. warnings::register::import is updated to use &warnings::register

3. warnings::register::import can take a list of subcategories

The upshot is that you can now write:

  package MyTool;
  use warnings::register qw(io typos);

  warnings::warnif('MyTool::io', $message);

...and tools that register new warnings categories do not need to cargo cult
code from warnings/register.pm

13 years agoConvert Math::BigInt tests from Test to Test::More.
Nicholas Clark [Fri, 10 Sep 2010 13:33:47 +0000 (14:33 +0100)]
Convert Math::BigInt tests from Test to Test::More.