platform/upstream/perl.git
13 years agoUpdate CPANPLUS to CPAN version 0.91
Chris 'BinGOs' Williams [Sat, 12 Feb 2011 13:06:22 +0000 (13:06 +0000)]
Update CPANPLUS to CPAN version 0.91

  [DELTA]

  Changes for 0.91        Fri Feb 11 22:43:31 2011
  ================================================
  * Making a stable release

  Changes for 0.90_13     Mon Feb  7 10:26:35 2011
  ================================================
  * Fix Parse::CPAN::Meta prereq version

  Changes for 0.90_12     Sun Feb  6 19:48:49 2011
  ================================================
  * Remove more trailing whitespace spotted by Nicholas Clark
    with patch to fix, RT #64976
  * Added META.json and MYMETA.json support. Requires a more
    recent Parse::CPAN::Meta
  * Switch to Digest::SHA and SHA256 checksums instead of
    Digest::MD5 and MD5, which has dropped v5.6.x support.

13 years agoperldebguts tweaks
Father Chrysostomos [Sat, 12 Feb 2011 05:37:45 +0000 (21:37 -0800)]
perldebguts tweaks

13 years agoperldbmfilter tweaks
Father Chrysostomos [Sat, 12 Feb 2011 01:56:53 +0000 (17:56 -0800)]
perldbmfilter tweaks

• ‘Each’ is singular
• ‘If not’, not ‘in not’

13 years agoperldata: remove duplicate text from adjacent sections
Father Chrysostomos [Fri, 11 Feb 2011 22:01:55 +0000 (14:01 -0800)]
perldata: remove duplicate text from adjacent sections

13 years agoperlfunc/eval: $@ is now set after unwinding
Father Chrysostomos [Fri, 11 Feb 2011 21:46:47 +0000 (13:46 -0800)]
perlfunc/eval: $@ is now set after unwinding

13 years agoperlfunc: hyphenate a compound adjective
Father Chrysostomos [Fri, 11 Feb 2011 21:43:38 +0000 (13:43 -0800)]
perlfunc: hyphenate a compound adjective

13 years agoperldata: retitle a section
Father Chrysostomos [Fri, 11 Feb 2011 21:36:58 +0000 (13:36 -0800)]
perldata: retitle a section

The ‘Array Joining Delimiter’ section is about array interpolation in
general, not just the $" variable.

13 years agoperldelta: ‘package;’ is no longer supported
Father Chrysostomos [Fri, 11 Feb 2011 21:32:15 +0000 (13:32 -0800)]
perldelta: ‘package;’ is no longer supported

13 years agoperldata tweaks
Father Chrysostomos [Fri, 11 Feb 2011 20:48:23 +0000 (12:48 -0800)]
perldata tweaks

13 years agoAdd Version::Requirements as a dual-life module
David Golden [Fri, 11 Feb 2011 14:31:03 +0000 (09:31 -0500)]
Add Version::Requirements as a dual-life module

Version::Requirements version 0.101020 has been added as a dual-life
module.  It provides a standard library to model and manipulates module
prerequisites and version constraints as defined in the CPAN::Meta::Spec.

It is a prerequisite for CPAN::Meta, which will be used by the Perl
CPAN Toolchain to standardize interactions with META and MYMETA files.

13 years agoretab t/porting/checkcase.t
David Golden [Fri, 11 Feb 2011 16:01:12 +0000 (11:01 -0500)]
retab t/porting/checkcase.t

13 years agot/porting/checkcase.t should skip directories
David Golden [Fri, 11 Feb 2011 15:58:22 +0000 (10:58 -0500)]
t/porting/checkcase.t should skip directories

We should only care about directory case to the extent
it causes an actual file collision, so we can safely skip
directories and let the file collision tests find issues for us.

13 years agoperlcompile tweaks
Father Chrysostomos [Fri, 11 Feb 2011 14:25:43 +0000 (06:25 -0800)]
perlcompile tweaks

• Hyphenate compound adjectives
• Missing word

13 years agoperlcommunity: punctuation and capitalisation
Father Chrysostomos [Fri, 11 Feb 2011 14:16:22 +0000 (06:16 -0800)]
perlcommunity: punctuation and capitalisation

13 years agoperlcommunity: capitalise consistently
Father Chrysostomos [Fri, 11 Feb 2011 14:08:30 +0000 (06:08 -0800)]
perlcommunity: capitalise consistently

13 years agoperlclib: similar to, not similar as
Father Chrysostomos [Fri, 11 Feb 2011 14:07:14 +0000 (06:07 -0800)]
perlclib: similar to, not similar as

13 years agoRelation between overloading and ties: second try
Father Chrysostomos [Thu, 10 Feb 2011 22:35:57 +0000 (14:35 -0800)]
Relation between overloading and ties: second try

The current text is confusing as it refers to tied values. Variables, not values, are tied (don’t bring up handles, please!).

13 years agoRevert "The relation between overloading and ties has been fixed."
Father Chrysostomos [Thu, 10 Feb 2011 22:22:02 +0000 (14:22 -0800)]
Revert "The relation between overloading and ties has been fixed."

This reverts commit c378af320498199f011ee6aca32cef036936dd36.

Other parts of the document still refer to this. More edits are
fifthcoming.

13 years agoThe relation between overloading and ties has been fixed.
Father Chrysostomos [Thu, 10 Feb 2011 22:08:10 +0000 (14:08 -0800)]
The relation between overloading and ties has been fixed.

13 years agotypo in perldiag
Father Chrysostomos [Thu, 10 Feb 2011 22:05:15 +0000 (14:05 -0800)]
typo in perldiag

13 years agoPrevent destructors called from gp_free from seeing freed SVs
Father Chrysostomos [Thu, 10 Feb 2011 22:04:54 +0000 (14:04 -0800)]
Prevent destructors called from gp_free from seeing freed SVs

perl5.13.9 -e 'local *foo; $foo = bless[]; (); DESTROY { use Devel::Peek; Dump $foo; }'

This prints:
SV = UNKNOWN(0xff) (0x8044dc) at 0x8044e0
  REFCNT = 0
  FLAGS = ()

If I do anything with $foo inside the destructor, such as
‘local $foo’, it crashes, of course.

gp_free (called when *foo is being unlocalised on scope exit) does
SvREFCNT_dec(gp->gp_xv) on each of its slots.

SvREFCNT_dec(gp->gp_sv) lowers the refcount of $foo to zero, which
causes the object it references to be destroyed, too. The objects
destructor sees the same $foo still there in the typeglob.

This commit changes gp_free to use a loop, the way S_hfreeentries
(in hv.c) does, checking that everything has been freed before exit-
ing the loop.

(The one-liner above is a reduced version of

perl -MWWW::Scripter -e '$w = new WWW::Scripter; $w->use_plugin(JavaScript); $w->get(q|data:text/html,<a href onclick="throw new Error(&quot;XMLHttpRequest&quot;)">|); $w->document->links->[0]->click'

which involved *@ and a destructor localising $@.)

13 years agoperl #82278: Overload documentation: many changes This is a partial rewrite to addres...
Michael Breen [Wed, 9 Feb 2011 10:31:03 +0000 (10:31 +0000)]
perl #82278: Overload documentation: many changes This is a partial rewrite to address long standing issues and comments that this document is confusing, in addition to accurately documenting the behaviour of fallback and nomethod in the context of overloaded operands of different types, as implemented in the fix for bug #71286. Fixes many mistakes, ambiguities, and omissions. Most of the early part of the document has been restructured and revised. For the full list of changes, see bug #82278.

13 years ago[perl #77692] substr causes panic: sv_len_utf8 cache...
Father Chrysostomos [Thu, 10 Feb 2011 17:20:14 +0000 (09:20 -0800)]
[perl #77692] substr causes panic: sv_len_utf8 cache...

pp_substr contains this comment, which was added in perl 5.0 alpha 2
(commit 79072805bf63):

    PUSHs(TARG); /* avoid SvSETMAGIC here */

Calling set-magic when substr returns an lvalue will cause its argu-
ment to be stringified even if the lvalue is not assigned to. That’s
why set-magic has to be avoided.

But the result is that utf8 caches (stored in magic) on TARG are not
reset properly.

Since substr lvalues now follow a different code path (and do not use
TARG at all), it’s perfectly safe to call set-magic at this point.
It’s also the right thing to do in case of other types of magic that
might get attached to TARG.

13 years agoexporting a static function doesn't work
Tony Cook [Thu, 10 Feb 2011 12:20:53 +0000 (23:20 +1100)]
exporting a static function doesn't work

13 years agoIn test.pl, validate that require_ok() and use_ok() are called correctly.
Nicholas Clark [Thu, 10 Feb 2011 11:14:23 +0000 (11:14 +0000)]
In test.pl, validate that require_ok() and use_ok() are called correctly.

It only provides a subset of the Test::More functionality, but could
inadvertently be used in a way which is not compatible with Test::More, which
is not the intent.

13 years agoFix up \cX for 5.14
Karl Williamson [Thu, 10 Feb 2011 04:18:48 +0000 (21:18 -0700)]
Fix up \cX for 5.14

Throughout 5.13 there was temporary code to deprecate and forbid
certain values of X following a \c in qq strings.  This patch fixes
this to the final 5.14 semantics.

These are:

1) a utf8 non-ASCII character will croak.  This is the same
behavior as pre-5.13, but it gives a correct error message, rather than
the malformed utf8 message previously.

2) \c{ and \cX where X is above ASCII will generate a deprecated
message.  The intent is to remove these capabilities in 5.16.  The
original agreement was to croak on above ASCII, but that does violate
our stability policy, so I'm deprecating it instead.

3) A non-deprecated warning is generated for all other \cX; this is the
same as throughout the 5.13 series.

I did not have the tuits to use \c{} as I had planned in 5.14, but \N{}
can be used instead.

13 years agodquote_static.c: Add comment
Karl Williamson [Thu, 10 Feb 2011 04:17:54 +0000 (21:17 -0700)]
dquote_static.c: Add comment

13 years agoMove grok_bslash_c to dquote.c and make static
Karl Williamson [Thu, 10 Feb 2011 00:34:38 +0000 (17:34 -0700)]
Move grok_bslash_c to dquote.c and make static

No other changes were made

13 years agoMove grok_blsash_o and make static
Karl Williamson [Wed, 9 Feb 2011 03:39:48 +0000 (20:39 -0700)]
Move grok_blsash_o and make static

This function is only used in the same places as dquote_static.c is
used, so move it there, and we won't have to worry about changing its
API will break something.  No other changes made

13 years agoUpdate Module-Load-Conditional to CPAN version 0.44
Chris 'BinGOs' Williams [Wed, 9 Feb 2011 21:57:08 +0000 (21:57 +0000)]
Update Module-Load-Conditional to CPAN version 0.44

  [DELTA]

  Changes for 0.44    Wed Feb  9 21:48:42 GMT 2011
  =================================================
  * Apply podchecker patch from Michael Stevens RT #65601

13 years agoUpdate Module-Load-Conditional to CPAN version 0.42
Chris 'BinGOs' Williams [Wed, 9 Feb 2011 21:20:53 +0000 (21:20 +0000)]
Update Module-Load-Conditional to CPAN version 0.42

  [DELTA]

  Changes for 0.42    Wed Feb  9 15:27:14 GMT 2011
  =================================================
  * Apply patch from Phillip Moore RT #60916, which
    fixes an edge-case with obj/ref @INC entries.

13 years agoUpdate Term-UI to CPAN version 0.26
Chris 'BinGOs' Williams [Wed, 9 Feb 2011 18:47:48 +0000 (18:47 +0000)]
Update Term-UI to CPAN version 0.26

  [DELTA]

  Changes for 0.26        Wed Feb  9 15:06:32 GMT 2011
  =====================================================
  * Apply blead patch from Michael Stevens RT #65038

13 years ago[perl #83792] Fix doubled "a" in perlgit.pod.
Michael Stevens [Wed, 9 Feb 2011 18:58:49 +0000 (10:58 -0800)]
[perl #83792] Fix doubled "a" in perlgit.pod.

13 years ago[perl #83790] Fix links for README.cygwin to have L<>
Michael Stevens [Wed, 9 Feb 2011 18:58:24 +0000 (10:58 -0800)]
[perl #83790] Fix links for README.cygwin to have L<>

13 years ago[perl #83788] Make a list a list, and add L<> around URLs.
Michael Stevens [Wed, 9 Feb 2011 18:57:54 +0000 (10:57 -0800)]
[perl #83788] Make a list a list, and add L<> around URLs.

13 years agoproblem with exit in child process in BEGIN
Robin Barker [Wed, 9 Feb 2011 16:31:39 +0000 (16:31 +0000)]
problem with exit in child process in BEGIN

13 years agomissing paragraph break in perlport
Robin Barker [Wed, 9 Feb 2011 16:08:52 +0000 (16:08 +0000)]
missing paragraph break in perlport

13 years agoFix use_ok() in vmsish.t broken by 46d4dcbda33f17cc.
Craig A. Berry [Wed, 9 Feb 2011 13:28:07 +0000 (07:28 -0600)]
Fix use_ok() in vmsish.t broken by 46d4dcbda33f17cc.

test.pl's use_ok() syntax for testing specific imports is incompatible with
Test::More's

13 years agoMinor bugfixes to Socket::getaddrinfo
Paul LeoNerd Evans [Tue, 8 Feb 2011 18:36:40 +0000 (18:36 +0000)]
Minor bugfixes to Socket::getaddrinfo

Attached are two small bugfixes to getaddrinfo()

Please apply,

Thanks.

--
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/

From 61fdece8ab9a729206f2633f47e25afd6f05af6a Mon Sep 17 00:00:00 2001
From: Paul "LeoNerd" Evans <leonerd@leonerd.org.uk>
Date: Mon, 24 Jan 2011 18:58:40 +0000
Subject: [PATCH 2/3] canonname should only be present on the first returned result

Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
13 years agoConvert vmsish.t to Test::More from test.pl
Nicholas Clark [Tue, 8 Feb 2011 07:36:40 +0000 (07:36 +0000)]
Convert vmsish.t to Test::More from test.pl

It's not actually using any of the features of test.pl.

13 years agoRemove now-erroneous comment about 'test.pl' from version's tests.
Nicholas Clark [Tue, 8 Feb 2011 07:15:38 +0000 (07:15 +0000)]
Remove now-erroneous comment about 'test.pl' from version's tests.

It's the boilerplate comment written by h2xs about how to run the tests when
it creates a file test.pl. It's meaningless now that the file in question has
been renamed to version.t and moved directory.

13 years agoFix failing tests.
Hugo van der Sanden [Sun, 6 Feb 2011 11:34:25 +0000 (11:34 +0000)]
Fix failing tests.

Commit 211dfcf14199529e353c08dea10d7050e6a4a22a modified the parameter
order in t/op/sprintf.t tests 157-164 to match the code, rather than the
docs. Restored the correct order, now that the code matches the docs.
('perldoc -f sprintf', subsection "order of arguments".)

13 years agoExtract format parameter later when vectorizing.
Hugo van der Sanden [Sun, 6 Feb 2011 11:29:44 +0000 (11:29 +0000)]
Extract format parameter later when vectorizing.

The handling of sprintf '%vx' extracts the format parameter when the 'v' is
seen, ignoring the fact that other formatting options still to be checked
for may need to get the "next parameter" before we get to the format
parameter. Moved the extraction block later, and reindented the rest.

13 years agoAdd supplied tests from perl #83194.
Hugo van der Sanden [Sun, 6 Feb 2011 11:28:01 +0000 (11:28 +0000)]
Add supplied tests from perl #83194.

Supplies two known failures for sprintf '%v.*x'.

13 years agoFix invalid pod in perlmodlib
Michael Stevens [Mon, 7 Feb 2011 17:36:50 +0000 (17:36 +0000)]
Fix invalid pod in perlmodlib

13 years agoUpdated Parse::CPAN::Meta to CPAN version 1.4401
David Golden [Tue, 8 Feb 2011 01:30:35 +0000 (20:30 -0500)]
Updated Parse::CPAN::Meta to CPAN version 1.4401

[DELTA]

1.4401 Fri Feb 04 2011
      - Removed Module::Load::Conditional dependency

1.4400 Fri Feb 04 2011
      - Added 'json_backend' and 'yaml_backend' methods to provide
        the names of modules used for deserialization

1.4200 Mon Jan 24 2011
      - No changes from 1.41_04

1.41_04 Mon Jan 3 2011
      - Support PERL_JSON_BACKEND environment (defaulting to JSON::PP)
      - Support PERL_YAML_BACKEND environment (defaulting to CPAN::Meta:YAML)
      - Update Makefile.PL to install to sitelib on Perl 5.12+

1.41_03 Fri Dec 17 2010
- Throw exception when CPAN::Meta::YAML has a parse error
  (RT#47608)

1.41_02 Fri Dec 17 2010
- Convert to using CPAN::Meta::YAML instead of YAML::Tiny

1.41_01 Fri Dec 10 2010
- add support for JSON metafiles and load_* methods (RJBS)
- Move binary file unpacking to test file from Makefile.PL so tests
  will pass in the Perl core using a generated Makefile.PL
- Move bundled uupacktool.pl to t/bin/

13 years ago[perl #82854] utf8, $SIG{__DIE__}, syntax errors and Carp
Father Chrysostomos [Tue, 8 Feb 2011 00:49:38 +0000 (16:49 -0800)]
[perl #82854] utf8, $SIG{__DIE__}, syntax errors and Carp

If a syntax error has occurred, module loading causes the ‘BEGIN not
safe after errors’ error.

As of perl 5.12.0 (commit 7d0994e05, actually), error messages men-
tioning variable names that originate from ‘use utf8’ scopes and are
passed to __DIE__ handlers correctly have the UTF8 flag turned on, so
that a variable named $ġ will actually cause the error message to con-
tain ‘$ġ’, rather than ‘$Ä¡’. (As a side effect, even if the variable
does not contain non-ASCII characters, the error message still gets
the UTF8 flag turned on.)

Carp was using a \d in a regular expression against the error message.

\d loads Unicode tables if the LHS has the UTF8 flag turned on.

This means that this snippet:

use utf8;
use strict;
use CGI::Carp 'fatalsToBrowser';
$c;

dies with ‘BEGIN not safe...’, because the error message that triggers
it is ‘Global symbol "$c" requires explicit package name’, it has the
UTF8 flag turned on, CGI::Carp passes it to Carp.pm, Carp tries to do
a /\d/ match against it and \d tries to load Unicode tables, dying
with ‘BEGIN not safe...‘.

This commit just changes the \d in Carp.pm to [0-9], since that is
what was intended anyway.

13 years agoWhen running tests from lib/, set @INC and $ENV{PERL5LIB} to ../lib
Nicholas Clark [Mon, 7 Feb 2011 15:36:40 +0000 (15:36 +0000)]
When running tests from lib/, set @INC and $ENV{PERL5LIB} to ../lib

This ensures (reasonable) consistency with tests in cpan/, dist/ and ext/,
which set this to qw(../../lib ../../t), but are not from t/, hence don't have
t/ implicitly in @INC as '.'

13 years agoInit PL_cop_seqmax to a high value under DEBUGGING
David Mitchell [Mon, 7 Feb 2011 16:02:47 +0000 (16:02 +0000)]
Init PL_cop_seqmax to a high value under DEBUGGING

So that we get to test the effect of the value wrapping back to zero

13 years agoregcomp: Add/subtract consts to match embed.fnc
Karl Williamson [Mon, 7 Feb 2011 05:04:08 +0000 (22:04 -0700)]
regcomp: Add/subtract consts to match embed.fnc

13 years agopp_subst: move a common block outside an if/then
David Mitchell [Sun, 6 Feb 2011 21:13:11 +0000 (21:13 +0000)]
pp_subst: move a common block outside an if/then

The last few commits have been working towards making two
blocks of code identical. Now it's payback time!

13 years agopp_subst: do SvUTF8_on next to the SvPOK_only_UTF8
David Mitchell [Sun, 6 Feb 2011 21:09:57 +0000 (21:09 +0000)]
pp_subst: do SvUTF8_on next to the SvPOK_only_UTF8

This should leave things functionally unchanged.

This is another step in making two branches of code more identical

13 years agofix a s/non-utf8/is-utf8/ bit of nastiness
David Mitchell [Sun, 6 Feb 2011 19:48:34 +0000 (19:48 +0000)]
fix a s/non-utf8/is-utf8/ bit of nastiness

Commit 3e462cdc2087ddf90984010fabd80c30db92bfa0 provided a fix
for the  s/non-utf8/is-utf8/ case by upgrading TARG to UTF8 after the
match, but before the substitution. It used sv_utf8_upgrade() rather than
sv_utf8_upgrade_nomg(), so for example, with a tied variable, FETCH would
get called again, and all the char* pointers such as s would be left
dangling. If the length of the string was unchanged, the code wouldn't
notice this.

Fix by using the _nomg() variant, and by checking whether the string
has been reallocated

13 years agoMake Perl_sv_utf8_upgrade* respect nomg
David Mitchell [Sun, 6 Feb 2011 19:42:28 +0000 (19:42 +0000)]
Make Perl_sv_utf8_upgrade* respect nomg

One of the code paths in Perl_sv_utf8_upgrade_flags_grow() calls
SvPV_force(), regardless of whether the SV_GMAGIC flag is set or not,
which triggers an unconditional magic get.

13 years agopp_subst: remove a superflous PUTBACK/SPAGAIN
David Mitchell [Sat, 5 Feb 2011 14:23:57 +0000 (14:23 +0000)]
pp_subst: remove a superflous PUTBACK/SPAGAIN

These were added around a mg_set() call before the stack-of-stacks
mechanism was introduced, which has made them redundant.

This is another step in making two branches of code more identical

13 years agopp_subtr: preserve UTF8 flag in rare cases
David Mitchell [Sat, 5 Feb 2011 13:32:24 +0000 (13:32 +0000)]
pp_subtr: preserve UTF8 flag in rare cases

There are two main branches in pp_subtr(): the 'in-place' and the other,
depending on whether the replacement string is short enough to be inserted
directly. Commit 80b498e0aacf413fb7460d6882a74c68c1f9df48 back in 2000
changed a SvPOK_only() to a SvPOK_only_UTF8() to preserve the UTF8 bit,
but only on *one* branch. Add the change to the other branch too. This
will only make a difference in rare cases involving 'use bytes' (where it's
arguably broken  and generating malformed utf8 anyway); but the main
reason for doing it is to allow soon for some identical code in the two
branches to be de-duplicated.

13 years agopp_subst: move a bock of code to to decrease gotos
David Mitchell [Fri, 4 Feb 2011 17:54:11 +0000 (17:54 +0000)]
pp_subst: move a bock of code to to decrease gotos

13 years agopp_subst: compact a couple of PUSHes using ?:
David Mitchell [Fri, 4 Feb 2011 17:45:47 +0000 (17:45 +0000)]
pp_subst: compact a couple of PUSHes using ?:

13 years agopp_subst: remove a duplicate label
David Mitchell [Fri, 4 Feb 2011 16:20:11 +0000 (16:20 +0000)]
pp_subst: remove a duplicate label

(both nope: and ret_no: labelled the same chunk of exit code)

13 years agopp_subst: exit as soon as !match
David Mitchell [Fri, 4 Feb 2011 16:18:07 +0000 (16:18 +0000)]
pp_subst: exit as soon as !match

... rather than messing about first deciding whether to process
a successful match inline or not

13 years agopp_substr: combine two identical blocks of code
David Mitchell [Fri, 4 Feb 2011 16:13:51 +0000 (16:13 +0000)]
pp_substr: combine two identical blocks of code

13 years agofix typo in new pad.c comment
David Mitchell [Sun, 6 Feb 2011 19:13:48 +0000 (19:13 +0000)]
fix typo in new pad.c comment

13 years agoallow wrap-around of PL_cop_seqmax
David Mitchell [Sun, 6 Feb 2011 17:31:39 +0000 (17:31 +0000)]
allow wrap-around of PL_cop_seqmax

After a large number of evals, PL_cop_seqmax (a U32) will wrap around
again to zero. Make the code handle this case by:

1) When incrementing PL_cop_seqmax, never allow its value to become
   equal to PERL_PADSEQ_INTRO;
2) When testing for COP_SEQ_RANGE_LOW < seq <= COP_SEQ_RANGE_HIGH,
   allow for the fact that _HIGH may be lower than _LOW.

This is a final fix for  [perl #83364].

13 years agomake 0 not a special value for COP_SEQ_RANGE_HIGH
David Mitchell [Sun, 6 Feb 2011 17:04:17 +0000 (17:04 +0000)]
make 0 not a special value for COP_SEQ_RANGE_HIGH

Some of the code in pad.c tests COP_SEQ_RANGE_HIGH for the special value 0.
By instead testing COP_SEQ_RANGE_LOW for the special value PERL_PADSEQ_INTRO
(which it turns out is functioanlly equivalent), we can eliminate one of
the special values that PL_cop_seqmax mustn't be set to.

13 years agorename PAD_MAX to PERL_PADSEQ_INTRO
David Mitchell [Sun, 6 Feb 2011 15:08:34 +0000 (15:08 +0000)]
rename PAD_MAX to PERL_PADSEQ_INTRO

and increase its scope to all the perl core rather than just pad.c.

The scope needs to increase because we'll need to use it in op.c shortly,
and the rename is because it's about to lose any significance as a
numerical value, and just become a magic number to be tested for equality.

13 years agomany string evals cause eventual scope issues
David Mitchell [Sun, 6 Feb 2011 14:34:49 +0000 (14:34 +0000)]
many string evals cause eventual scope issues

[perl #83364]. PL_cop_seqmax is U32 but PAD_MAX was defined as
I32_MAX. Once PL_cop_seqmax got above 2 billion it would start to appear
spuriosuly as if  PL_cop_seqmax > PAD_MAX, so the scope of lexical vars in
evals etc went awry.

Also replaces a use of ~0 with PAD_MAX, which shouldn't change anything,
but is just tidier.

13 years agoutf8_heavy.pl: Improve debug output
Karl Williamson [Sun, 6 Feb 2011 17:10:47 +0000 (10:10 -0700)]
utf8_heavy.pl: Improve debug output

Often, when DEBUG is set, an uninitialized variable message gets printed
as well.  This fixes that.

13 years agoSilence compile warnings before uni tables built
Karl Williamson [Sun, 6 Feb 2011 16:55:58 +0000 (09:55 -0700)]
Silence compile warnings before uni tables built

The recent move of Unicode folding to the compilation phase caused
spurious warnings during the miniperl build phase of Perl itself before
the Unicode tables get built.  Before the tables are built, Perl is
unable to know about the Unicode semantics (it has ASCII/Latin1
hard-coded in), but was still trying to access the tables.  Now, it
checks and if the tables aren't present uses just the hard-coded
ASCII/Latin1 semantics.

13 years agoTwo Safefree() changes to make -DPERL_POISON builds work again.
George Greer [Sun, 6 Feb 2011 16:47:21 +0000 (11:47 -0500)]
Two Safefree() changes to make -DPERL_POISON builds work again.

The poison exposes a failure in t/op/magic:

    panic: corrupt saved stack index at - line 6.
    FAILED at test 7

13 years agoIn IPC::Open3's fd.t, open STDIN explicitly in the test program.
Nicholas Clark [Fri, 4 Feb 2011 22:02:33 +0000 (22:02 +0000)]
In IPC::Open3's fd.t, open STDIN explicitly in the test program.

This removes the use of the stdin argument to runperl(), which will make the
transition to Test::PerlRun easier, as it doesn't provide 'stdin'. This was
the only test using 'stdin', and it can easily be changed not to need it.

13 years agoIn IPC::Open3's fd.t, correct the code added in 1f563db471aa8a00.
Nicholas Clark [Fri, 4 Feb 2011 21:50:02 +0000 (21:50 +0000)]
In IPC::Open3's fd.t, correct the code added in 1f563db471aa8a00.

C<q_Pie_> is not the same as C<q _Pie_> - the former is a bareword starting
with q, the latter a quoting operator. This error was hidden by the code added
in 45a1ce9706434aec to make the test "more forgiving of random stderr output".

Correct the description - fd 1 is STDOUT, not STDIN.

Win32 currently spits out a "Use of uninitialized value" warning, which we need
to take into account when checking that no error messages have been seen.

13 years agoRearrange global.sym according to 'make regen'
George Greer [Sun, 6 Feb 2011 01:13:00 +0000 (20:13 -0500)]
Rearrange global.sym according to 'make regen'

13 years agoAdd a section on patch style (unified diff, etc) and how to generate patches
Dave Rolsky [Sat, 5 Feb 2011 19:12:28 +0000 (13:12 -0600)]
Add a section on patch style (unified diff, etc) and how to generate patches

Based on a suggestion from H.Merijn Brand

13 years agoTwo more swash inversion list exports necessary for build on Win32.
George Greer [Sat, 5 Feb 2011 22:01:50 +0000 (17:01 -0500)]
Two more swash inversion list exports necessary for build on Win32.

13 years agoDon't redefine Perl API functions in ext/re.
Craig A. Berry [Sat, 5 Feb 2011 18:00:24 +0000 (12:00 -0600)]
Don't redefine Perl API functions in ext/re.

13 years ago[perl #83406] Library compatibility and API documentation (v1.991).
pjacklam [Sat, 5 Feb 2011 02:02:51 +0000 (18:02 -0800)]
[perl #83406] Library compatibility and API documentation (v1.991).

- dist/Math-BigInt/lib/Math/BigFloat.pm: Increment version number.

- dist/Math-BigInt/lib/Math/BigInt.pm: Add workaround for library
  inconsistencies (Math::BigInt::Calc vs. Math::BigInt::GMP). This makes
  older versions of Math::BigInt::GMP work with latest version of
  Math::BigInt.

- dist/Math-BigInt/lib/Math/BigInt/Calc.pm: Correct and extend API
  documentation. Increment version number.

- dist/Math-BigInt/lib/Math/BigInt/CalcEmu.pm: Increment version number.

13 years agoConvert XS::APItest's svpv_magic.t to Test::More.
Nicholas Clark [Sat, 5 Feb 2011 13:37:01 +0000 (13:37 +0000)]
Convert XS::APItest's svpv_magic.t to Test::More.

13 years agoexport the functions required by re
Tony Cook [Sat, 5 Feb 2011 03:59:21 +0000 (14:59 +1100)]
export the functions required by re

eg. see http://www.nntp.perl.org/group/perl.daily-build.reports/2011/02/msg91288.html

13 years agoClarify the return values of the first_release functions in Module::CoreList
Chris 'BinGOs' Williams [Fri, 4 Feb 2011 21:43:34 +0000 (21:43 +0000)]
Clarify the return values of the first_release functions in Module::CoreList

  Raised as CPAN RT #65461 by Tokuhiro Matsuno

13 years agoRemove MacOS Classic references from B's tests.
Nicholas Clark [Fri, 4 Feb 2011 21:14:29 +0000 (22:14 +0100)]
Remove MacOS Classic references from B's tests.

13 years agoRefactor B's o.t to use 'prog' and 'switches' with runperl(), not 'args'.
Nicholas Clark [Fri, 4 Feb 2011 20:19:36 +0000 (20:19 +0000)]
Refactor B's o.t to use 'prog' and 'switches' with runperl(), not 'args'.

Previously it was using an array to hold the list of command line arguments,
between each test splicing the one element that actually changed, and then
passing the array to runperl, without an explicit program. Not the clearest of
approaches.

13 years agol1_char_class_tab.h: Remove multi-char fold targets
Karl Williamson [Fri, 4 Feb 2011 17:42:28 +0000 (10:42 -0700)]
l1_char_class_tab.h: Remove multi-char fold targets

These are not currently used, and slow things down, as regular
expressions that have them, such as /[Etl]/i now have to go out and load
utf8 code.  This remains the case, though, for bracketed character
classes that include [KkSs].

13 years agoMajor revision of perlhack and perlrepository
Dave Rolsky [Mon, 31 Jan 2011 22:15:24 +0000 (16:15 -0600)]
Major revision of perlhack and perlrepository

The existing perlhack is huge and takes a long time to get to key
information like "how to submit a patch". It also contains a massive
amount of (very useful) detail on the Perl interpreter, debugging,
portability issues, and so on.

Some parts of perlhack are just obsolete. For example, Larry really
isn't deeply involved on p5p any more.

Meanwhile, perlrepository _also_ contains a lot of useful information
on patching Perl, as well as a small git tutorial focused on working
with the Perl repository.

Taken together, the two documents overlap and conflict with each other.

This commit does the following:

== Reconcile conflicts and overlaps, remove obsolete information

I've separated out distinct pieces of information and organized them
into individual pod files. More on that below. I've also removed anything
that was obviously out of date.

== Make it easier for casual contributors to contribute.

The perlhack document now gets to "how to make a patch" very quickly. My
assumption is that most contributors to Perl are doing something small,
like fixing pod, adding a test, etc.

The documentation aimed at people doing more extensive hacking is still
there, but it's been moved so that it comes at the end of the document
or has been moved to another document.

I've made an effort to cross-reference the various documents so that
nothing gets lost.

== Get to the point

The perlhack document had a lot of discussion of general Perl culture.
I've trimmed a lot of this and moved some of it so it comes later.

== Per-file summary

=== perlrepository.pod

This is gone. Some of its content is now in perlhack. This includes
the bits on writing good commit messages, how (and where) to submit a
patch, etc.

The rest is now called perlgit, and is _only_ a git how-to.

=== perlhack.pod

This has been cut down quite a bit.

I changed the opening so it starts with a quick guide to submitting
small patches.

The document covers bug reporting, the p5p list, a quick how-to on
getting the source (including git, gitweb, and rsync), and a lot of
general information on patching perl and running tests.

Much of this material was already present, but I've done a fair amount
of editing for modernization and clarity.

Most of the information specific to C-level hacking has been moved to
other documents.

=== perlsource.pod

This is a guide to the Perl source tree. Most of the content was extracted
from perlhack. I've edited existing content and added details on some
parts of the tree that weren't covered.

=== perlinterp.pod

This is a tour of the Perl interpreter source and a walkthrough of
how it works that originally lived in perlhack. This has received very
little editing.

=== perlhacktut.pod

This is a walkthrough of creating a sample patch to the C core code that
originally lived in perlhack. This has received very little editing.

=== perlhacktips.pod

The perlhack document contained a lot of useful information on low-level
hacking details like debugging, compilation issues, portability, etc.
This has received very little editing.

I did remove some bits on ancient stuff related to Tru64 and IRIX.

13 years agoActually generate full failure diagnostics in checkErrs() in B's OptreeCheck,
Nicholas Clark [Fri, 4 Feb 2011 16:59:42 +0000 (16:59 +0000)]
Actually generate full failure diagnostics in checkErrs() in B's OptreeCheck,

3857d07c85882fa8 used if() where unless() would have been correct. However, I
didn't spot this because

a: none of the tests fail so none are trying to generate diagnostics
b: the code as written is silent if there are no errors

Hence make the code be called unconditionally, which simplifies things.

Remove the vestigial forced fail() if $gOpts{fail} is true.

13 years agoIn B's OptreeCheck, always report inconsistent errors as a failed test.
Nicholas Clark [Fri, 4 Feb 2011 16:02:38 +0000 (16:02 +0000)]
In B's OptreeCheck, always report inconsistent errors as a failed test.

Previously there were 3 different options, and the default was to print a
diagnostic (which obviously can get missed). Remove the options - tests are
tests. As this means that most calls to checkOptree() now make two tests
rather than one, update many of the test scripts' plans.

13 years agoIn B's OptreeCheck, implement proper qr// matching for regexps.
Nicholas Clark [Fri, 4 Feb 2011 15:32:28 +0000 (15:32 +0000)]
In B's OptreeCheck, implement proper qr// matching for regexps.

Hence we can now do string matching on strings, rather than treating everything
as a regexp.

13 years agoIn B's OptreeCheck, inline diag_or_fail() into its only caller.
Nicholas Clark [Fri, 4 Feb 2011 15:08:28 +0000 (15:08 +0000)]
In B's OptreeCheck, inline diag_or_fail() into its only caller.

$tc->{goterrs} is not referenced after this function, so no need to re-assign
to it.

13 years agosilence do_curse() compiler warning
David Mitchell [Fri, 4 Feb 2011 15:19:41 +0000 (15:19 +0000)]
silence do_curse() compiler warning

Usage of the static function do_curse() in sv.c has been temporarily
disabled; comment out the function definition too, to avoid a compiler
warning about an unused function.

13 years agoIn Cwd, convert two regexps to explicit ranges, instead of using /i
Nicholas Clark [Fri, 4 Feb 2011 14:10:24 +0000 (14:10 +0000)]
In Cwd, convert two regexps to explicit ranges, instead of using /i

Since change 56ca34cada940c7f moved the folding of ranges from runtime to
compile time, these VMS-only regexps would incur a startup cost penalty on
all platforms.

This also removes build-time warnings when Cwd is invoked before the Unicode
tables have been processed.

13 years agoIn File::Copy, convert two regexps to explicit ranges, instead of using /i
Nicholas Clark [Fri, 4 Feb 2011 13:53:50 +0000 (13:53 +0000)]
In File::Copy, convert two regexps to explicit ranges, instead of using /i

Since change 56ca34cada940c7f moved the folding of ranges from runtime to
compile time, these VMS-only regexps would incur a startup cost penalty on
all platforms.

This also removes build-time warnings when File::Copy is invoked before the
Unicode tables have been processed.

13 years agoFix excess whitespace in pod.
Michael Stevens [Tue, 1 Feb 2011 22:10:23 +0000 (22:10 +0000)]
Fix excess whitespace in pod.

13 years agoIn B's tests, fix calls to like() which weren't being passed a regexp.
Nicholas Clark [Fri, 4 Feb 2011 11:32:55 +0000 (11:32 +0000)]
In B's tests, fix calls to like() which weren't being passed a regexp.

Now that the tests actually *test*, this reveals that one of the tests wasn't
actually correct. Fix that, and in the process make the particular error
message clearer and more consistent.

13 years agoRemove non-working and hence unused features from B's OptreeCheck test code.
Nicholas Clark [Fri, 4 Feb 2011 10:29:53 +0000 (10:29 +0000)]
Remove non-working and hence unused features from B's OptreeCheck test code.

'retry' is no use without 'debug', and 'debug' doesn't work (doesn't enable
regexp debugging output for the retry) because C<use re 'debug'> is lexically
scoped, so can't be applied at runtime after the event to an already compiled
regexp. (And the "obvious" fix of turning it on for compile time isn't working
for some reason, so it's not trivial to fix this unused feature. Version
control will preserve the code if anyone wants to investigate, fix and
resurrect it.)

13 years agoConvert Pod::Html to lexical file handles.
Nicholas Clark [Fri, 4 Feb 2011 09:42:28 +0000 (10:42 +0100)]
Convert Pod::Html to lexical file handles.

This fixes the regression test failures for Module::Build on an NFS filesystem.
What had been happening was that 3 of Module::Build's tests would invoke
Pod::Html::pod2html via ACTION_html(). The invocation is inside an eval, and
is not treated as fatal if it fails. It fails if the install tree doesn't yet
exist, and it doesn't explicitly close the file handle. With package file
handles, this meant that the file was still open when the test attempted to
recursively delete the temporary directory tree, and an NFS file system won't
delete an open file (it will reappear under a different, hidden, filename).
Consequently the directory tree was not empty, cleanup failed, and the test
failed.

Switching to lexical file handles causes the file to automatically be closed
when it goes out of scope due to the thrown exception. This problem is not
going to occur for anyone building Module::Build on NFS against an installed
perl.

13 years agoUpdated HTTP::Tiny to CPAN version 0.010
David Golden [Fri, 4 Feb 2011 07:51:14 +0000 (02:51 -0500)]
Updated HTTP::Tiny to CPAN version 0.010

Includes VMS test fixes by Craig Berry

13 years agouse the macro that casts to HV * so threaded C++ builds, build
Tony Cook [Fri, 4 Feb 2011 04:14:49 +0000 (15:14 +1100)]
use the macro that casts to HV * so threaded C++ builds, build

13 years agoConvert B's "no perlio" skips to "skip all" in the BEGIN blocks.
Nicholas Clark [Thu, 3 Feb 2011 14:50:42 +0000 (14:50 +0000)]
Convert B's "no perlio" skips to "skip all" in the BEGIN blocks.

Previously they called the skip function, and needed to know the number of
tests declared by the plan.

13 years agoRemove commented out 'require test.pl' lines in B's tests.
Nicholas Clark [Thu, 3 Feb 2011 14:41:10 +0000 (14:41 +0000)]
Remove commented out 'require test.pl' lines in B's tests.

13 years agoCorrect the "no perlio" skipping in optree_misc.t.
Nicholas Clark [Thu, 3 Feb 2011 14:37:59 +0000 (14:37 +0000)]
Correct the "no perlio" skipping in optree_misc.t.

Move the last test up into the SKIP block, and correct the skip count.

13 years agoUpdated Module::Metadata to CPAN version 1.000004
David Golden [Thu, 3 Feb 2011 07:59:53 +0000 (02:59 -0500)]
Updated Module::Metadata to CPAN version 1.000004

[DELTA]

1.0.4 2011-02-03 07:55:00
  - Fix broken metadata.t when @INC has relative paths (JJORE)