platform/upstream/perl.git
13 years agoperldelta: Something else I missed
Father Chrysostomos [Tue, 16 Nov 2010 00:08:14 +0000 (16:08 -0800)]
perldelta: Something else I missed

13 years agoperldelta for [perl #79208]
Father Chrysostomos [Tue, 16 Nov 2010 00:05:40 +0000 (16:05 -0800)]
perldelta for [perl #79208]

13 years agoUpdate Archive-Tar to CPAN version 1.70
Chris 'BinGOs' Williams [Mon, 15 Nov 2010 23:50:40 +0000 (23:50 +0000)]
Update Archive-Tar to CPAN version 1.70

  [DELTA]

  * important changes in version 1.70 15/11/2010
  - Add ptargrep utility courtesy of Grant McLean

  **  I think I found everywhere that needed updating
      by grepping for 'ptardiff' and adding where needed.
      This stuff is definitively not intuitive.

13 years agostash.t: The [perl #58530] test should not be skipped
Father Chrysostomos [Mon, 15 Nov 2010 22:41:46 +0000 (14:41 -0800)]
stash.t: The [perl #58530] test should not be skipped

13 years agoCorrect an anonymisation test in stash.t
Father Chrysostomos [Mon, 15 Nov 2010 22:39:32 +0000 (14:39 -0800)]
Correct an anonymisation test in stash.t

13 years agoCorrect skip count in stash.t
Father Chrysostomos [Mon, 15 Nov 2010 22:36:17 +0000 (14:36 -0800)]
Correct skip count in stash.t

13 years ago[perl #79208] %stash:: = () anonymises CVs
Father Chrysostomos [Mon, 15 Nov 2010 22:30:07 +0000 (14:30 -0800)]
[perl #79208] %stash:: = () anonymises CVs

This keeps stash names visible during %foo:: = ().

This fixes @ISA assignment inside a DESTROY method triggered by
%foo:: = () and also lets existing CVs retain their pointers to
the stash.

So
  %foo:: = ()
is now equivalent to
  delete $foo::{$_} for keys %foo::

13 years agoI only mentioned half of [perl #79138]
Father Chrysostomos [Mon, 15 Nov 2010 21:06:58 +0000 (13:06 -0800)]
I only mentioned half of [perl #79138]

13 years agoUpdate perldelta with Dave Mitchell's contributions
Chris 'BinGOs' Williams [Mon, 15 Nov 2010 19:36:02 +0000 (19:36 +0000)]
Update perldelta with Dave Mitchell's contributions

13 years agoMention Filter::cpp as alternative for -P
Abigail [Mon, 15 Nov 2010 16:17:00 +0000 (17:17 +0100)]
Mention Filter::cpp as alternative for -P

13 years agoDoc fix for [perl #78642] Logical defined or not equivalent to ternary operator with...
Rafael Garcia-Suarez [Mon, 15 Nov 2010 10:47:53 +0000 (11:47 +0100)]
Doc fix for [perl #78642] Logical defined or not equivalent to ternary operator with defined

The ternary operator can be used in lvalue context; $a // $b cannot.

13 years agoZero new XOPs xop_desc will never be invalid
Florian Ragwitz [Mon, 15 Nov 2010 09:06:01 +0000 (10:06 +0100)]
Zero new XOPs xop_desc will never be invalid

Even if the xop description couldn't be fetched from PL_custom_op_descs.

13 years agoperldelta: something I missed
Father Chrysostomos [Mon, 15 Nov 2010 05:13:48 +0000 (21:13 -0800)]
perldelta: something I missed

13 years agoThe various Math::BigInt changes aren't relevant
Florian Ragwitz [Mon, 15 Nov 2010 04:55:26 +0000 (05:55 +0100)]
The various Math::BigInt changes aren't relevant

They're mostly small bugfixes here and there. Nothing of particular interest
when upgrading to a new version of perl, I'd say.

13 years agoUpdate perldelta entry for Math::BigInt
Florian Ragwitz [Mon, 15 Nov 2010 04:55:16 +0000 (05:55 +0100)]
Update perldelta entry for Math::BigInt

13 years agoUpgrade Math::BigInt from version 1.98 to 1.99
Florian Ragwitz [Mon, 15 Nov 2010 04:52:09 +0000 (05:52 +0100)]
Upgrade Math::BigInt from version 1.98 to 1.99

13 years agoperldelta up to 518a985
Father Chrysostomos [Mon, 15 Nov 2010 01:43:36 +0000 (17:43 -0800)]
perldelta up to 518a985

13 years agoperldelta: remove another commit from the to-do list
Father Chrysostomos [Mon, 15 Nov 2010 01:37:51 +0000 (17:37 -0800)]
perldelta: remove another commit from the to-do list

13 years agoperldelta up to 578895fb
Father Chrysostomos [Mon, 15 Nov 2010 00:51:58 +0000 (16:51 -0800)]
perldelta up to 578895fb

13 years agoperldelta: clarification
Father Chrysostomos [Mon, 15 Nov 2010 00:37:34 +0000 (16:37 -0800)]
perldelta: clarification

13 years agoperldelta: tpyo
Father Chrysostomos [Mon, 15 Nov 2010 00:36:17 +0000 (16:36 -0800)]
perldelta: tpyo

13 years agoperldelta: remove 2 commits from the list
Father Chrysostomos [Mon, 15 Nov 2010 00:35:30 +0000 (16:35 -0800)]
perldelta: remove 2 commits from the list

Karl Williamson says these do not need entries.

13 years agoImplement $^A tainting
Niko Tyni [Fri, 12 Nov 2010 22:02:07 +0000 (00:02 +0200)]
Implement $^A tainting

The format accumulator $^A now becomes tainted when formline() is
called with tainted data.

There is still one failing test from the TODO set; it seems
that the $^A get magic is handled too late for the taintedness
to show up.

13 years agoTODO tests for $^A tainting
Niko Tyni [Fri, 12 Nov 2010 17:35:34 +0000 (19:35 +0200)]
TODO tests for $^A tainting

The format accumulator $^A should become tainted when formline() is
called with tainted data.

13 years agoMake the new formline test fail more reliably
Father Chrysostomos [Mon, 15 Nov 2010 00:33:34 +0000 (16:33 -0800)]
Make the new formline test fail more reliably

13 years agoFix a crash with a tainted formline() picture
Niko Tyni [Mon, 1 Nov 2010 07:19:07 +0000 (09:19 +0200)]
Fix a crash with a tainted formline() picture

A private (tainted) string did not get its share of space
in the destination string, causing a buffer overflow later.

Originally reported by Roland Kuhn as http://bugs.debian.org/575318

13 years agoDocument the new custom op functions.
Ben Morrow [Mon, 15 Nov 2010 00:24:05 +0000 (16:24 -0800)]
Document the new custom op functions.

13 years agoTests for the new custom op registrations.
Ben Morrow [Mon, 15 Nov 2010 00:42:11 +0000 (16:42 -0800)]
Tests for the new custom op registrations.

13 years agoImprove custom OP support.
Ben Morrow [Mon, 15 Nov 2010 00:13:51 +0000 (16:13 -0800)]
Improve custom OP support.

Change the custom op registrations from two separate hashes to one hash
holding structure pointers, and add API functions to register ops and
look them up. This will make it easier to add new properties of custom
ops in the future. Copy entries across from the old hashes where
necessary, to preserve compatibility.

Add two new properties, in addition to the already-existing 'name' and
'description': 'class' and 'peep'. 'class' is one of the OA_*OP
constants, and allows B and other introspection mechanisms to work with
custom ops that aren't BASEOPs. 'peep' is a pointer to a function that
will be called for ops of this type from Perl_rpeep.

Adjust B.xs to take account of the new properties, and also to give
custom ops their registered name rather than simply 'custom'.

13 years agoIncrease B’s version
Father Chrysostomos [Sun, 14 Nov 2010 21:31:29 +0000 (13:31 -0800)]
Increase B’s version

13 years agoFix multiplicity build, broken by 328552296d8d53b3.
Nicholas Clark [Sun, 14 Nov 2010 20:57:33 +0000 (20:57 +0000)]
Fix multiplicity build, broken by 328552296d8d53b3.

It wrongly had #ifdef USE_ITHREADS, which should have been #ifdef MULTIPLICITY.

13 years agoS_glob_assign_ref: Move the sref != dref earlier
Father Chrysostomos [Sun, 14 Nov 2010 19:24:34 +0000 (11:24 -0800)]
S_glob_assign_ref: Move the sref != dref earlier

The sref != dref check is faster than the GvNAME and HvENAME checks,
so put it before them.

This will speed up use vars '@ISA' slightly.

13 years agoChange utf8.t to use a \xb7 delimiter once more.
Father Chrysostomos [Sun, 14 Nov 2010 19:06:48 +0000 (11:06 -0800)]
Change utf8.t to use a \xb7 delimiter once more.

This partially reverts 7b301413.

The delimiter was changed because a proposed fix for [perl #74022]
would have caused the test to fail.

That bug has been fixed a different way (d7425188), so the delimiter
in the test can be changed back.

The RT ticket has more detail.

13 years agoMake changes to aliased *ISA work
Father Chrysostomos [Sun, 14 Nov 2010 14:37:15 +0000 (06:37 -0800)]
Make changes to aliased *ISA work

This is a follow-up to 6624142.

Ref-to-glob assignment was not working after an *ISA-to-*ISA
assignment.

It needs to copy into mg_obj all the items in the mg_obj of the array
that is being replaced.

13 years agoRT ticket 62949: $x -> bmodpow(1, 1) fails when $x is large
Peter John Acklam [Sun, 14 Nov 2010 16:19:11 +0000 (17:19 +0100)]
RT ticket 62949: $x -> bmodpow(1, 1) fails when $x is large

Fix the library method in lib/Math/BigInt/Calc.pm so that it
corresponds to the fact that a^b (mod 1) = 0 for all a and b.

- lib/Math/BigInt/Calc.pm: fix mentioned bug

- t/bigintpm.inc: add one more test case

- t/bare_mbi.t: increment test counter

- t/bigintpm.t: increment test counter

- t/sub_mbi.t: increment test counter

13 years agoperldelta ${^GLOBAL_PHASE}
Florian Ragwitz [Sun, 14 Nov 2010 14:56:47 +0000 (15:56 +0100)]
perldelta ${^GLOBAL_PHASE}

13 years agoAdd an index entry for ${^GLOBAL_PHASE}
Florian Ragwitz [Sat, 13 Nov 2010 14:17:54 +0000 (15:17 +0100)]
Add an index entry for ${^GLOBAL_PHASE}

13 years agoUsers don't normally care about the blead releases
Florian Ragwitz [Sat, 13 Nov 2010 14:17:06 +0000 (15:17 +0100)]
Users don't normally care about the blead releases

13 years agoThere are no values not mentioned here
Florian Ragwitz [Sat, 13 Nov 2010 14:15:48 +0000 (15:15 +0100)]
There are no values not mentioned here

13 years agoadd example for ${^GLOBAL_PHASE} and description to perlmod
Chas. J. Owens IV [Tue, 2 Nov 2010 14:28:54 +0000 (10:28 -0400)]
add example for ${^GLOBAL_PHASE} and description to perlmod

Signed-off-by: Florian Ragwitz <rafl@debian.org>
[rafl@debian.org: Minor rewording based on input from TIMB]

13 years agostring do and require don't execute INIT and CHECK blocks
Chas. J. Owens IV [Tue, 2 Nov 2010 14:15:32 +0000 (10:15 -0400)]
string do and require don't execute INIT and CHECK blocks

Signed-off-by: Florian Ragwitz <rafl@debian.org>
[rafl@debian.org: Minor wording tweaks]

13 years agoEliminate PL_dirty
Florian Ragwitz [Fri, 1 Oct 2010 21:28:36 +0000 (23:28 +0200)]
Eliminate PL_dirty

It now only exists as a compatibility macro for extensions that want to
introspect it.

13 years agoAdd ${^GLOBAL_PHASE}
Florian Ragwitz [Tue, 28 Sep 2010 01:49:48 +0000 (03:49 +0200)]
Add ${^GLOBAL_PHASE}

This exposes the current top-level interpreter phase to perl space.

13 years agoFixes bug #79078, by pointing out the slight difference between Perl's
Abigail [Sun, 14 Nov 2010 16:01:20 +0000 (17:01 +0100)]
Fixes bug #79078, by pointing out the slight difference between Perl's
syntax for line directives, and the ones allowed by modern C preprocessors.

Reported by "kst@mib.org".

13 years ago[perl #74022] Parser hangs on some Unicode characters
Father Chrysostomos [Sun, 14 Nov 2010 14:46:27 +0000 (06:46 -0800)]
[perl #74022] Parser hangs on some Unicode characters

This changes the definition of isIDFIRST_utf8 to avoid any characters
that would put the parser in a loop.

isIDFIRST_utf8 is used all over the place in toke.c. Almost every
instance is followed by a call to S_scan_word. S_scan_word is only
called when it is known that there is a word to scan.

What was happening was that isIDFIRST_utf8 would accept a character,
but S_scan_word in toke.t would then reject it, as it was using
is_utf8_alnum, resulting in an infinite number of zero-length
identifiers.

Another possible solution was to change S_scan_word to use
isIDFIRST_utf8 or similar, but that has back-compatibility problems,
as it stops q·foo· from being a strings and makes it an identi-
fier instead.

13 years agoUpdate Unicode-Collate to CPAN version 0.67
Chris 'BinGOs' Williams [Sun, 14 Nov 2010 12:07:03 +0000 (12:07 +0000)]
Update Unicode-Collate to CPAN version 0.67

  [DELTA]

  0.67  Sun Nov 14 11:38:59 2010
    - supported UCA_Version 22 for Unicode 6.0.0.
      * 2B740..2B81D are new CJK unified ideographs.
      * noncharacters (e.g. U+FFFF) should be overridable, not be ignored.
    ! DUCET is NOT updated, as no maint perl supports Unicode 6.0.0.
      Thus the default UCA_Version is still 20.
    - added t/nonchar.t.
    - improved discontiguous contractions of 3 or more characters.
      (e.g. 0FB2 0F71 0F80 and 0FB3 0F71 0F80)
    - auxiliary: now 'mklocale' also copes with Korean.pm according to DUCET.

13 years agoOops. I need to learn how to use git add.
Father Chrysostomos [Sun, 14 Nov 2010 05:28:05 +0000 (21:28 -0800)]
Oops. I need to learn how to use git add.

13 years ago[perl #77238] Aliased @ISA does not work
Father Chrysostomos [Sun, 14 Nov 2010 01:28:46 +0000 (17:28 -0800)]
[perl #77238] Aliased @ISA does not work

This makes aliased @ISA arrays work by storing a non-magical AV as the
mg_obj if there need to be multiple entries.

13 years agoCorrected small emission in perldelta relating to Unicode-Collate
Chris 'BinGOs' Williams [Sun, 14 Nov 2010 00:23:14 +0000 (00:23 +0000)]
Corrected small emission in perldelta relating to Unicode-Collate

13 years agoFix undef %Foo:: to update subclasses
Father Chrysostomos [Sat, 13 Nov 2010 19:19:38 +0000 (11:19 -0800)]
Fix undef %Foo:: to update subclasses

This is something I think I broke with 80ebaca, which made sure
that isa linearisations were cached on subclasses after calls
to mro_isa_changed_in (so the data could be used to delete
isarev entries).

The result is that hv_undef, which calls mro_isa_changed_in before
deleting everything, was updating the subclasses’ isa caches while its
own @ISA was still visible.

13 years agoMake delete $package::{ISA} work
Father Chrysostomos [Sat, 13 Nov 2010 17:41:47 +0000 (09:41 -0800)]
Make delete $package::{ISA} work

13 years agomro_package_moved only needs one loop
Father Chrysostomos [Sat, 13 Nov 2010 02:13:16 +0000 (18:13 -0800)]
mro_package_moved only needs one loop

We can avoid the double iteration by doing the first iteration’s job
(to clear the linearisations) inside gather_and_rename as the items
are added to the stash. The important thing is that they all be
cleared before *any* calls to mro_isa_changed_in, which will still
be the case.

Maybe ‘gather_and_rename’ is not such a good name any more....

13 years agoMacro for freeing meta->mro_linear_*
Father Chrysostomos [Sat, 13 Nov 2010 02:06:10 +0000 (18:06 -0800)]
Macro for freeing meta->mro_linear_*

13 years agoRemove redundant call to mro_get_linear_isa
Father Chrysostomos [Sat, 13 Nov 2010 01:55:54 +0000 (17:55 -0800)]
Remove redundant call to mro_get_linear_isa

added by 80ebaca, like most of my recent mistakes.

13 years agoUpdate isarev when clobbered class has subsubclasses
Father Chrysostomos [Sat, 13 Nov 2010 00:34:02 +0000 (16:34 -0800)]
Update isarev when clobbered class has subsubclasses

This fixes a case that mro_package_moved did not take into account:
If a class with multiple levels of subclasses was assigned over, then,
depending on the order in which the subclasses were processed in the
second loop in mro_package_moved, the subclasses might not be removed
from the isarev hashes of superclasses of the clobbered class.

This was because a call to mro_isa_changed_in on one class could call
mro_get_linear_isa on another class in the list, overwriting its
meta->isa hash, which is used to determine what to delete from
PL_isarev.

E.g., if D isa C isa B isa A, this assignment:

  *B:: = *something::;

would cause B, C and D to be iterated over, but not in any particular
order. The order could be D, C, B, in which case mro_isa_changed_in(D)
would overwrite the meta->isa hash in C with one that did not list A.
So mro_isa_changed_in(C) would not see A in meta->isa and would not
delete PL_isarev->{A}{C}.

This commit stores the meta->isa hash as the value in the ‘big list’,
instead of the stash. The stash itself can be retrieved from the key,
since it is already a memory address (a pointer cast to a char array).
The recorded isa hash in inserted into each stash before the call to
mro_isa_changed_in.

13 years agoUpdate Maintainers.pl and perldelta.pod for Storable update.
Chris 'BinGOs' Williams [Fri, 12 Nov 2010 20:57:00 +0000 (20:57 +0000)]
Update Maintainers.pl and perldelta.pod for Storable update.

13 years agoPerformance improvement for overloaded classes from Benjamin Holzman
Abhijit Menon-Sen [Fri, 12 Nov 2010 17:26:19 +0000 (22:56 +0530)]
Performance improvement for overloaded classes from Benjamin Holzman

13 years agoGuard write test against miniperl
H.Merijn Brand [Fri, 12 Nov 2010 14:19:07 +0000 (15:19 +0100)]
Guard write test against miniperl

Miniperl does not support scalario. The test will still fail when
miniperl is called directly "./miniperl -Ilib t/op/write.t", but
it will pass "make minitest"

13 years agoUpdate Pod-Simple to CPAN version 3.15
Chris 'BinGOs' Williams [Fri, 12 Nov 2010 13:58:23 +0000 (13:58 +0000)]
Update Pod-Simple to CPAN version 3.15

  [DELTA]

  2010-11-11   David E. Wheeler <david@justatheory.org>
        * Release 3.15

        Removed "perlpod.pod" and "perlpodspec.pod". These now just live
        in the Perl core.

        Fixed stylesheet names output by HTMLBatch to match the names of
        the actual stylesheet files (broken in 3.09). Thanks to Kevin Ryde
        for the report (RT #56725).

        Added missing closing slash to the CSS links in the XHTML output.
        Thanks to HarleyPig for the patch!

        Added parens around bar "qw(...)" in t/xhtml05.t. Thanks to Jerry
        D. Hedden for the patch.

        Improved the Pod::Simple::HTML docs. Thanks to Gabor Szabo for the
        patch.

        Pod::Simple::XHTML now properly encodes entities in URLs in the
        anchor tag. Thanks to John McNamara for the report (RT-60249).

        Pod::Simple::HTML and XHTML now strip whitespace from the end of
        section names that appear as anchor names for headers (in HTML)
        and IDs (in XHTML). Such whitespace appeared when "X<>" entities
        were stripped out but not the space between them (RT-56572).

        Make test "t/search50.t" always pass on case-insensitive file
        systems rather than just skip VMS.

13 years agoAdd a test to use duplicated frormat through glob
H.Merijn Brand [Fri, 12 Nov 2010 13:55:00 +0000 (14:55 +0100)]
Add a test to use duplicated frormat through glob

13 years agoRT ticket 62918: _modpow(x,y,z) with x = 0 and y > 0
Peter John Acklam [Thu, 11 Nov 2010 21:06:59 +0000 (22:06 +0100)]
RT ticket 62918: _modpow(x,y,z) with x = 0 and y > 0

Fix _modpow() method in Math::BigInt::Calc so it correctly returns 0
in the case (0 ** $x) % $y, with $x > 0.

- lib/Math/BigInt/Calc.pm: fix mentioned bug

- t/bigintpm.inc: add a few more test cases

- t/bare_mbi.t: increment test counter

- t/bigintpm.t: increment test counter

- t/sub_mbi.t: increment test counter

13 years agoperldelta up to 4df35a07ff9
Father Chrysostomos [Fri, 12 Nov 2010 06:05:28 +0000 (22:05 -0800)]
perldelta up to 4df35a07ff9

13 years agoUpdate Data::Dumper’s change log
Father Chrysostomos [Fri, 12 Nov 2010 05:49:58 +0000 (21:49 -0800)]
Update Data::Dumper’s change log

13 years agoIncrease Data::Dumper’s version
Father Chrysostomos [Fri, 12 Nov 2010 05:47:54 +0000 (21:47 -0800)]
Increase Data::Dumper’s version

13 years agomro_isa_changed_in3 is no longer necessary
Father Chrysostomos [Fri, 12 Nov 2010 04:39:31 +0000 (20:39 -0800)]
mro_isa_changed_in3 is no longer necessary
as of 80ebaca.

It was nice while it lasted.

This reverts 6f86b615fa.

13 years agoFix package assignment with nested aliased packages
Father Chrysostomos [Fri, 12 Nov 2010 04:29:31 +0000 (20:29 -0800)]
Fix package assignment with nested aliased packages

This commit fixes package assignments like *foo:: = *bar:: when both
foo and bar contain nested stashes that are aliases of each other.

mro_package_moved (actually, its auxiliary routine) need to keep a
list of stashes that have been seen as a separate list from those that
are going to have mro_isa_changed_in called on them. Otherwise, some
stashes will simply not be iterated through.

See the test that this adds and its comments. @ISA = @ISA should never
have any effect visible to Perl (with a capital), but it does in that
test case, prior to this commit.

This also fixes another bug that the test case triggered:
riter was not being reset before the second iteration in
mro_gather_and_rename.

Also, the stashes HV (aka the ‘big list’) now holds refcounts on its
elements, as that makes the code simpler as a result of the changes.

13 years agoIncrease File::stat’s version
Father Chrysostomos [Fri, 12 Nov 2010 02:09:57 +0000 (18:09 -0800)]
Increase File::stat’s version

13 years agoRT 79076: fix File::stat overload tests -x and -X when uid is root
Todd Rinaldo [Thu, 11 Nov 2010 23:08:34 +0000 (17:08 -0600)]
RT 79076: fix File::stat overload tests -x and -X when uid is root

13 years agoUpdate MIME-Base64 to CPAN version 3.10
Chris 'BinGOs' Williams [Fri, 12 Nov 2010 00:03:47 +0000 (00:03 +0000)]
Update MIME-Base64 to CPAN version 3.10

  [DELTA]

  Release 3.10

  Provide functions to calculate the length of encoded and decoded
  base64 strings [RT#62404]

13 years agoIn newSVhek(), use sv_usepvn_flags() to avoid a malloc()/copy/free()
Nicholas Clark [Thu, 11 Nov 2010 21:37:48 +0000 (21:37 +0000)]
In newSVhek(), use sv_usepvn_flags() to avoid a malloc()/copy/free()

The return value of bytes_to_utf8() is a malloc()ed string, which we can donate
to the scalar to use as its buffer. Previously the code free()d this memory,
after using it as a parameter to newSVpvn(), which allocates a new buffer and
copies to it.

13 years ago[perl #79024] Bleadperl 80ebaca breaks OVID/Class-Trait-0.31.tar.gz
Father Chrysostomos [Thu, 11 Nov 2010 14:12:00 +0000 (06:12 -0800)]
[perl #79024] Bleadperl 80ebaca breaks OVID/Class-Trait-0.31.tar.gz

Commit 80ebaca actually exposed an existing bug that Class::Trait was
really close to triggering already:

  undef *ISA; # @ISA no longer magical

Class::Trait’s tests just happened not to call ->isa before making any
changes to @ISA.

Now that the meta->isa cache is created immediately,
Class::Trait fails.

This bug can be reproduced in earlier perls by putting an ->isa call
right after the undef:

  undef *{"Extra::TSpouse::ISA"};
 'Extra::TSpouse'->isa('Class::Trait::Base');
  unshift @{"Extra::TSpouse::ISA"}, Class::Trait::Base;
  warn Extra::TSpouse->isa('Class::Trait::Base'); # something's wrong

This commit modifies gv_fetchpvn_flags to magicalise @ISA whenever it
is fetched.

13 years agoPATCH: [perl #78994]: optimizer loses folding
Karl Williamson [Wed, 10 Nov 2010 05:05:44 +0000 (22:05 -0700)]
PATCH: [perl #78994]: optimizer loses folding

The optimizer works by creating an initial ANYOF node that is supposed
to match anything.  When it finds the first node that it wants to allow
be a first match, it ANDs the anything node with that one, effectively
setting the first node to it.  Subsequent nodes that could match in the
first position are OR'd instead, adding to the possibilities that the
first match could be.

But the optimizer was not dealing with the possibility of folding, so
the first node did not have that as a possibility and hence a match that
relied on the fold would not succeed.

Originally, the patch had an 'if (FOLD)' guarding the initialization of
the match anything node , but it turns out that FOLD is set only if
folding is on globally, and in the example program of the trouble
ticket, it isn't set at the proper time, because the regex is recompiled
when upgraded to utf8, and it doesn't get set then.  So I
unconditionally set ANYOF_FOLD.

13 years agoCorrect comment in mro_isa_changed_in
Father Chrysostomos [Thu, 11 Nov 2010 13:40:43 +0000 (05:40 -0800)]
Correct comment in mro_isa_changed_in

It was describing an intermediate version of what became 80ebaca.

13 years agoAdd Perl_bytes_cmp_utf8() to compare character sequences in different encodings
Nicholas Clark [Thu, 11 Nov 2010 16:08:43 +0000 (16:08 +0000)]
Add Perl_bytes_cmp_utf8() to compare character sequences in different encodings

Convert sv_eq_flags() and sv_cmp_flags() to use it.

Previously, to compare two strings of characters, where was was in UTF-8, and
one was not, you had to either:

1: Upgrade the second to UTF-8
2: Compare the resulting octet sequence
3: Free the temporary UTF-8 string

or:

1: Attempt to downgrade the first to bytes. If it can't be, they aren't equal
2: Else compare the resulting octet sequence
3: Free the temporary byte string

Which for the general case involves a malloc()/free() and at least two O(n)
scans per comparison.

Whereas this approach has no allocation, a single O(n) scan, which terminates
as early as the best case for the second approach.

13 years agoAdd tests for cmp, eq, ne for UTF-8 vs octet representation.
Nicholas Clark [Thu, 11 Nov 2010 13:10:54 +0000 (13:10 +0000)]
Add tests for cmp, eq, ne for UTF-8 vs octet representation.

It turns out that we weren't actually explicitly testing this anywhere.

13 years agoFix errors in the diagnostic output of t/op/cmp.t
Nicholas Clark [Thu, 11 Nov 2010 11:42:38 +0000 (11:42 +0000)]
Fix errors in the diagnostic output of t/op/cmp.t

13 years agoAdjust t/run/switchd-78586.t to work under t/TEST and t/harness.
Nicholas Clark [Thu, 11 Nov 2010 13:45:21 +0000 (13:45 +0000)]
Adjust t/run/switchd-78586.t to work under t/TEST and t/harness.

13 years agoRemove redundant conditional added by e530fb81d
Father Chrysostomos [Thu, 11 Nov 2010 13:12:35 +0000 (05:12 -0800)]
Remove redundant conditional added by e530fb81d

The else is never reached if the assignment in the protasis succeeds.

13 years ago[perl #78964] Fix ext/XS-APItest/t/overload.t
Jerry D. Hedden [Thu, 11 Nov 2010 12:48:45 +0000 (04:48 -0800)]
[perl #78964] Fix ext/XS-APItest/t/overload.t

Attached patch fixes the following warning from 'make test':

ext/XS-APItest/t/overload...................................."my"
variable $got masks earlier declaration in same scope at t/overload.t
line 81.
ok

13 years agoperldelta up to 8ff3250783
Father Chrysostomos [Thu, 11 Nov 2010 12:44:44 +0000 (04:44 -0800)]
perldelta up to 8ff3250783

13 years agoTest for [perl #78586]
Tim Bunce [Thu, 11 Nov 2010 12:13:52 +0000 (04:13 -0800)]
Test for [perl #78586]

13 years agomake regen_perly
Father Chrysostomos [Thu, 11 Nov 2010 06:25:25 +0000 (22:25 -0800)]
make regen_perly

13 years ago[perl #78586] Bleadperl eae48c89 breaks TIMB/Devel-NYTProf-4.05.tar.gz
Zefram [Thu, 11 Nov 2010 06:15:28 +0000 (22:15 -0800)]
[perl #78586] Bleadperl eae48c89 breaks TIMB/Devel-NYTProf-4.05.tar.gz

> $ perl -d:Trace <<END
> warn "1";
> {
>     warn "3";
> }
> warn "5";
> END
> >> -:1: warn "1";
> 1 at - line 1.
> >> -:5: warn "5";      <== wrong
> >> -:3:     warn "3";
> 3 at - line 3.
> >> -:5: warn "5";
> 5 at - line 5.

I believe this is fixed by a one line change (plus `make regen_perly`):

13 years agoundef *glob should update isa(rev)
Father Chrysostomos [Thu, 11 Nov 2010 05:57:15 +0000 (21:57 -0800)]
undef *glob should update isa(rev)

13 years agoIncrease threads’ version
Father Chrysostomos [Wed, 10 Nov 2010 13:39:17 +0000 (05:39 -0800)]
Increase threads’ version

13 years agoCorrect note about dir handles in threads.pm
Father Chrysostomos [Wed, 10 Nov 2010 13:39:00 +0000 (05:39 -0800)]
Correct note about dir handles in threads.pm

13 years agoInline sv_cmp() and sv_cmp_locale() as macros wrapping their flags variants.
Nicholas Clark [Thu, 11 Nov 2010 10:55:27 +0000 (10:55 +0000)]
Inline sv_cmp() and sv_cmp_locale() as macros wrapping their flags variants.

We can't move Perl_sv_cmp() and Perl_sv_cmp_locale() to mathoms.c, as they
are referenced by function pointer in pp_sort.c - pointers which require the
specific current calling signature.

13 years agoConvert the flags argument for Perl_sv_{eq,cmp,cmp_locale}_flags() to U32.
Nicholas Clark [Thu, 11 Nov 2010 10:25:02 +0000 (10:25 +0000)]
Convert the flags argument for Perl_sv_{eq,cmp,cmp_locale}_flags() to U32.

These functions have not yet been in a stable release.
Going forwards, I think that we should consider converting all bitmap flags
arguments to *un*signed types. Most uses of I32 in the core are inappropriate.

13 years agoFix memory leaks in mro_package_moved
Father Chrysostomos [Wed, 10 Nov 2010 17:43:21 +0000 (09:43 -0800)]
Fix memory leaks in mro_package_moved

This commit adds a new HV_FETCH_EMPTY_HE flag for hv_common. It is to
be used in conjunction with HV_FETCH_LVALUE. It just stops the newly-
created HE from having a new undef scalar assigned to it.

This allows code to call hv_common just once instead of an hv_exists/
hv_store pair.

It was such a double hv_common call that I was trying to avoid with
HV_FETCH_LVALUE, without realising that it was leaking.

13 years agoRename PERLIO_BUFSIZ to PERLIOBUF_DEFAULT_BUFSIZ.
Craig A. Berry [Thu, 11 Nov 2010 03:23:48 +0000 (21:23 -0600)]
Rename PERLIO_BUFSIZ to PERLIOBUF_DEFAULT_BUFSIZ.

PERLIO_BUFSIZ was already in use by Encode::Unicode for the
PerlIOEncode_xxx layer, so it makes sense to specify that this
macro is for the PerlIOBuf_xxx layer and that it is a default
value that may eventually be settable at run-time.

13 years agoFix compilation with old xsubpps
Florian Ragwitz [Wed, 10 Nov 2010 13:19:58 +0000 (14:19 +0100)]
Fix compilation with old xsubpps

croak_xs_usage is new in perl 5.10, but some version xsubpp emulate it on older
perls as well. However, really old xsubpps don't do that.

13 years agoRT ticket #43694: as_int/as_number lose precision
Peter John Acklam [Thu, 4 Nov 2010 13:22:12 +0000 (14:22 +0100)]
RT ticket #43694: as_int/as_number lose precision

The as_int/as_number methods lose precision because the wrong library
method is used for converting a library integer object to something that
is processed by Math::BigInt->new(). The method _num() returns a Perl
scalar, with an accuracy limited to the Perl's internal floating point
format. The correct is to use _str() which returns a string with all
digits preserved.

- t/bigfltpm.inc: add test case with more digits than is used in Perl's
  internal floating point format.

- t/bigfltpm.t: increase number of tests by one.

- lib/Math/BigFloat.pm: changed library method from _num() to _str().

13 years agoMake the buffer size for the perlio layer a macro.
Craig A. Berry [Wed, 10 Nov 2010 02:20:12 +0000 (20:20 -0600)]
Make the buffer size for the perlio layer a macro.

The 4K buffer size was chosen way back in bb9950b.  Significant performance
improvements are seen with larger buffer sizes, though the optimum size
likely varies by architecture and workload.  For starters, we'll leave the
default as-is but make the buffer size a macro and thus user-configurable via:

  sh Configure -Accflags=-DPERLIO_BUFSIZ=<number>

Choosing a better (larger) default is still TODO.

13 years agoMove ExtUtils-Command from cpan/ to dist/
Florian Ragwitz [Tue, 9 Nov 2010 20:18:21 +0000 (21:18 +0100)]
Move ExtUtils-Command from cpan/ to dist/

Randy Kobes passed away recently, so let's have p5p maintain it for now.

13 years agoMove ExtUtils-Manifest from cpan/ to dist/
Florian Ragwitz [Tue, 9 Nov 2010 20:18:21 +0000 (21:18 +0100)]
Move ExtUtils-Manifest from cpan/ to dist/

Randy Kobes passed away recently, so let's have p5p maintain it for now.

13 years agoCorrected date of death for Randy Kobes
David Golden [Tue, 9 Nov 2010 18:25:17 +0000 (13:25 -0500)]
Corrected date of death for Randy Kobes

Based on published obituary rather than announcement
from University of Winnipeg.

http://www.passagesmb.com/obituary_details.cfm?ObitID=169229

13 years agoRemove an unused variable
Florian Ragwitz [Tue, 9 Nov 2010 18:07:07 +0000 (19:07 +0100)]
Remove an unused variable

13 years agoDisable bitwise operators
Florian Ragwitz [Tue, 9 Nov 2010 18:01:51 +0000 (19:01 +0100)]
Disable bitwise operators

Some of them used to return wrong results, others just failed horribly. We're
disabling them alltogether, with a useful error message, until maybe someone
figures out how to make them DWIM.

13 years agoIn S_check_type_and_open() call PerlIO_openn() directly if possible.
Nicholas Clark [Tue, 9 Nov 2010 15:58:52 +0000 (15:58 +0000)]
In S_check_type_and_open() call PerlIO_openn() directly if possible.

This saves creating a mortal SV on every file require (and a strlen()).

This commit brought to you with the aid of the campaign for elimination of
strlen().

13 years agoChange S_doopen_pm() and S_check_type_and_open() to take an SV parameter.
Nicholas Clark [Tue, 9 Nov 2010 15:40:59 +0000 (15:40 +0000)]
Change S_doopen_pm() and S_check_type_and_open() to take an SV parameter.

Previously S_doopen_pm() took a char */STRLEN pair, but it happened that the
pointer was always from an SV. So pass the SV directly.