[perl.git] branch blead, updated. v5.25.3-7-g1e0a641

2016-07-21 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/1e0a64115c2048e2aa95c55b284bec003e28b695?hp=f31df0ce8d77152d0d9498bf7f87177e54b824e9>

- Log -
commit 1e0a64115c2048e2aa95c55b284bec003e28b695
Author: Rafael Garcia-Suarez <r...@consttype.org>
Date:   Thu Jul 21 15:37:25 2016 +0200

Switch the order of the two backtracking chapters in perlre

It makes more sense to explain what backtracking is first, and
then introduce the special backtracking control verbs.

This is just chapter swapping, no other edit has been done.
In other words this diff is basically:

+=head2 Backtracking
 =head2 Special Backtracking Control Verbs
-=head2 Backtracking
 =head2 Version 8 Regular Expressions
---

Summary of changes:
 pod/perlre.pod | 414 -
 1 file changed, 207 insertions(+), 207 deletions(-)

diff --git a/pod/perlre.pod b/pod/perlre.pod
index 10f9f22..0e3928c 100644
--- a/pod/perlre.pod
+++ b/pod/perlre.pod
@@ -1883,6 +1883,213 @@ See L.
 
 =back
 
+=head2 Backtracking
+X X
+
+NOTE: This section presents an abstract approximation of regular
+expression behavior.  For a more rigorous (and complicated) view of
+the rules involved in selecting a match among possible alternatives,
+see L.
+
+A fundamental feature of regular expression matching involves the
+notion called I, which is currently used (when needed)
+by all regular non-possessive expression quantifiers, namely C<"*">, C<"*?">, 
C<"+">,
+C<"+?">, C<{n,m}>, and C<{n,m}?>.  Backtracking is often optimized
+internally, but the general principle outlined here is valid.
+
+For a regular expression to match, the I regular expression must
+match, not just part of it.  So if the beginning of a pattern containing a
+quantifier succeeds in a way that causes later parts in the pattern to
+fail, the matching engine backs up and recalculates the beginning
+part--that's why it's called backtracking.
+
+Here is an example of backtracking:  Let's say you want to find the
+word following "foo" in the string "Food is on the foo table.":
+
+$_ = "Food is on the foo table.";
+if ( /\b(foo)\s+(\w+)/i ) {
+print "$2 follows $1.\n";
+}
+
+When the match runs, the first part of the regular expression (C<\b(foo)>)
+finds a possible match right at the beginning of the string, and loads up
+C<$1> with "Foo".  However, as soon as the matching engine sees that there's
+no whitespace following the "Foo" that it had saved in C<$1>, it realizes its
+mistake and starts over again one character after where it had the
+tentative match.  This time it goes all the way until the next occurrence
+of "foo". The complete regular expression matches this time, and you get
+the expected output of "table follows foo."
+
+Sometimes minimal matching can help a lot.  Imagine you'd like to match
+everything between "foo" and "bar".  Initially, you write something
+like this:
+
+$_ =  "The food is under the bar in the barn.";
+if ( /foo(.*)bar/ ) {
+print "got <$1>\n";
+}
+
+Which perhaps unexpectedly yields:
+
+  got 
+
+That's because C<.*> was greedy, so you get everything between the
+I "foo" and the I "bar".  Here it's more effective
+to use minimal matching to make sure you get the text between a "foo"
+and the first "bar" thereafter.
+
+if ( /foo(.*?)bar/ ) { print "got <$1>\n" }
+  got 
+
+Here's another example. Let's say you'd like to match a number at the end
+of a string, and you also want to keep the preceding part of the match.
+So you write this:
+
+$_ = "I have 2 numbers: 53147";
+if ( /(.*)(\d*)/ ) {# Wrong!
+print "Beginning is <$1>, number is <$2>.\n";
+}
+
+That won't work at all, because C<.*> was greedy and gobbled up the
+whole string. As C<\d*> can match on an empty string the complete
+regular expression matched successfully.
+
+Beginning is , number is <>.
+
+Here are some variants, most of which don't work:
+
+$_ = "I have 2 numbers: 53147";
+@pats = qw{
+(.*)(\d*)
+(.*)(\d+)
+(.*?)(\d*)
+(.*?)(\d+)
+(.*)(\d+)$
+(.*?)(\d+)$
+(.*)\b(\d+)$
+(.*\D)(\d+)$
+};
+
+for $pat (@pats) {
+printf "%-12s ", $pat;
+if ( /$pat/ ) {
+print "<$1> <$2>\n";
+} else {
+print "FAIL\n";
+}
+

[perl.git] branch blead, updated. v5.23.3-8-gef058b3

2015-09-25 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/ef058b33cd10c03cc5704ec5447df1d23fe3b48b?hp=e120c24fe257993e9cbf4c567194bec2792f3ccc>

- Log -
commit ef058b33cd10c03cc5704ec5447df1d23fe3b48b
Author: Rafael Garcia-Suarez <r...@consttype.org>
Date:   Fri Sep 25 09:29:28 2015 +0200

POD fix in the documentation for SvTHINKFIRST
---

Summary of changes:
 sv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sv.h b/sv.h
index 331b823..2b68682 100644
--- a/sv.h
+++ b/sv.h
@@ -1051,7 +1051,7 @@ For example, if your scalar is a reference and you want 
to modify the C
 slot, you can't just do C, as that will leak the referent.
 
 This is used internally by various sv-modifying functions, such as
-C, C and C, C and C.
 
 One case that this does not handle is a gv without SvFAKE set.  After
 

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.23.0-83-g8b7906d

2015-07-06 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/8b7906d1719d3641e1ea0c94d934ecce176275cb?hp=deaaea8c017369305bf7859858531c736ca7ed4b

- Log -
commit 8b7906d1719d3641e1ea0c94d934ecce176275cb
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Mon Jul 6 08:09:04 2015 +0200

Some nits in perlsub

- DOES was not listed in the list of methods with reserved names
- Remove one useless instance of empty list assignment
- Punctuation
---

Summary of changes:
 pod/perlsub.pod | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pod/perlsub.pod b/pod/perlsub.pod
index f057b96..48f178f 100644
--- a/pod/perlsub.pod
+++ b/pod/perlsub.pod
@@ -258,11 +258,11 @@ CAUTOLOAD
 
 =item documented in Lperlmod
 
-CCLONE, CCLONE_SKIP, 
+CCLONE, CCLONE_SKIP
 
 =item documented in Lperlobj
 
-CDESTROY
+CDESTROY, CDOES
 
 =item documented in Lperltie
 
@@ -1289,7 +1289,7 @@ of all their former last elements:
 
 sub popmany {
my $aref;
-   my @retlist = ();
+   my @retlist;
foreach $aref ( @_ ) {
push @retlist, pop @$aref;
}

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.23.0-6-g37b8cdd

2015-06-22 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/37b8cdd1927432f22e389f8405a9f8a198fb0360?hp=8b1ae794f5e468e8ad34e4bf1d5b02717520b234

- Log -
commit 37b8cdd1927432f22e389f8405a9f8a198fb0360
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Mon Jun 22 09:46:18 2015 +0200

Increase the maximal size of the string displayed in non-numeric warnings

This has the interesting side-effect of fixing some of the UTF-8
glob warnings, which indicates that sv_uni_display is probably not
dealing with stringified globs correctly.

Also add a test for the truncation of strings in the non-numeric
warnings.
---

Summary of changes:
 sv.c  | 2 +-
 t/lib/warnings/sv | 8 
 t/uni/gv.t| 6 +++---
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/sv.c b/sv.c
index 0990be2..7896e18 100644
--- a/sv.c
+++ b/sv.c
@@ -1828,7 +1828,7 @@ S_sv_display(pTHX_ SV *const sv, char *tmpbuf, STRLEN 
tmpbuf_size) {
 
  if (DO_UTF8(sv)) {
   SV *dsv = newSVpvs_flags(, SVs_TEMP);
-  pv = sv_uni_display(dsv, sv, 10, UNI_DISPLAY_ISPRINT);
+  pv = sv_uni_display(dsv, sv, 32, UNI_DISPLAY_ISPRINT);
  } else {
  char *d = tmpbuf;
  const char * const limit = tmpbuf + tmpbuf_size - 8;
diff --git a/t/lib/warnings/sv b/t/lib/warnings/sv
index 188e9c6..3d396ef 100644
--- a/t/lib/warnings/sv
+++ b/t/lib/warnings/sv
@@ -363,6 +363,14 @@ EXPECT
 Argument \x{100}\x{200} isn't numeric in negation (-) at - line 3.
 
 # sv.c
+use warnings 'numeric' ;
+$a = \x{100}\x{1000} x 10; $b = $a  1;
+no warnings 'numeric' ;
+$a = \x{100}\x{1000} x 10; $b = $a  1;
+EXPECT
+Argument \x{100}\x{1000}\x{100}\x{1000}\x{100}... isn't numeric in numeric 
lt () at - line 3.
+
+# sv.c
 use warnings 'redefine' ;
 use utf8;
 use open qw( :utf8 :std );
diff --git a/t/uni/gv.t b/t/uni/gv.t
index 9c48cef..a730297 100644
--- a/t/uni/gv.t
+++ b/t/uni/gv.t
@@ -127,19 +127,19 @@ is (scalar %ᕘ, 0);
 foreach ($copy, *SKRÈÈÈ) {
$msg = '';
my $victim = sprintf %d, $_;
-   like($msg, qr/Argument 
\*main::(\p{ASCII}|\Q\x{\E\p{ASCII_Hex_Digit}{2}\}){3}\Q...\E isn't numeric 
in sprintf/,
+   like($msg, qr/^Argument 
\*main::(?:PW\\x\{d2\}MPF|SKR\\x\{c8\}\\x\{c8\}\\x\{c8\}) isn't numeric in 
sprintf/,
 Warning on conversion to IV);
is($victim, 0);
 
$msg = '';
$victim = sprintf %u, $_;
-   like($msg, qr/Argument 
\*main::(\p{ASCII}|\Q\x{\E\p{ASCII_Hex_Digit}{2}\}){3}\Q...\E isn't numeric 
in sprintf/,
+   like($msg, qr/^Argument 
\*main::(?:PW\\x\{d2\}MPF|SKR\\x\{c8\}\\x\{c8\}\\x\{c8\}) isn't numeric in 
sprintf/,
 Warning on conversion to UV);
is($victim, 0);
 
$msg = '';
$victim = sprintf %e, $_;
-   like($msg, qr/Argument 
\*main::(\p{ASCII}|\Q\x{\E\p{ASCII_Hex_Digit}{2}\}){3}\Q...\E isn't numeric 
in sprintf/,
+   like($msg, qr/^Argument 
\*main::(?:PW\\x\{d2\}MPF|SKR\\x\{c8\}\\x\{c8\}\\x\{c8\}) isn't numeric in 
sprintf/,
 Warning on conversion to NV);
like($victim, qr/^0\.0+E\+?00/i, Expect floating point zero);
 

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.22.0-131-gaa8f6ce

2015-06-17 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/aa8f6cef961dc2009604f7464c66106421c3ae81?hp=b4929cb48878718cd9a8f54a834db6353f8115ec

- Log -
commit aa8f6cef961dc2009604f7464c66106421c3ae81
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Wed Jun 17 13:18:59 2015 +0200

Microoptimize some matches in utf8_heavy.pl
---

Summary of changes:
 lib/utf8_heavy.pl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/utf8_heavy.pl b/lib/utf8_heavy.pl
index e0c3d5e..1ba73b2 100644
--- a/lib/utf8_heavy.pl
+++ b/lib/utf8_heavy.pl
@@ -20,7 +20,7 @@ sub _loose_name ($) {
 # out blanks, underscores and dashes.  The complication stems from the
 # grandfathered-in 'L_', which retains a single trailing underscore.
 
-my $loose = $_[0] =~ s/[-\s_]//rg;
+(my $loose = $_[0]) =~ tr/-_ \t//d;
 
 return $loose if $loose !~ / ^ (?: is | to )? l $/x;
 return 'l_' if $_[0] =~ / l .* _ /x;# If original had a trailing '_'
@@ -226,7 +226,7 @@ sub _loose_name ($) {
 
 # If the rhs looks like it is a number...
 print STDERR __LINE__, : table=$table\n if DEBUG;
-if ($table =~ qr{ ^ [ \s 0-9 _  + / . -]+ $ }x) {
+if ($table =~ m{ ^ [ \s 0-9 _  + / . -]+ $ }x) {
 print STDERR __LINE__, : table=$table\n if DEBUG;
 
 # Don't allow leading nor trailing slashes 
@@ -236,7 +236,7 @@ sub _loose_name ($) {
 }
 
 # Split on slash, in case it is a rational, like 
\p{1/5}
-my @parts = split qr{ \s* / \s* }x, $table, -1;
+my @parts = split m{ \s* / \s* }x, $table, -1;
 print __LINE__, : $type\n if @parts  2  DEBUG;
 
 # Can have maximum of one slash

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.22.0-128-gbace499

2015-06-16 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/bace499647c542e44fa169173393f19316fe05b6?hp=23e51b95a8db32227346e84c1c77148c98aba157

- Log -
commit bace499647c542e44fa169173393f19316fe05b6
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Jun 16 12:21:04 2015 +0200

Perl example style nit in docs for sort()

Declare both arrays, no need to clear them.
---

Summary of changes:
 pod/perlfunc.pod | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index ba77638..b2c8bb6 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -6824,7 +6824,7 @@ Examples:
 # same thing, but much more efficiently;
 # we'll build auxiliary indices instead
 # for speed
-my @nums = @caps = ();
+my (@nums, @caps);
 for (@old) {
 push @nums, ( /=(\d+)/ ? $1 : undef );
 push @caps, fc($_);

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.21.11-137-gbc1767a

2015-05-17 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/bc1767aa26319247b21d0a61f937739a53a27082?hp=9e05725d95b9acf0498b6354f584beae218a335a

- Log -
commit bc1767aa26319247b21d0a61f937739a53a27082
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Sun May 17 10:03:11 2015 +0200

Fix a doc typo in the spelling of EBCDIC
---

Summary of changes:
 lib/utf8.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/utf8.pm b/lib/utf8.pm
index c8ec377..1176240 100644
--- a/lib/utf8.pm
+++ b/lib/utf8.pm
@@ -191,7 +191,7 @@ This takes an unsigned integer (which represents the 
ordinal number of a
 character (or a code point) on the platform the program is being run on) and
 returns its Unicode equivalent value.  Since ASCII platforms natively use the
 Unicode code points, this function returns its input on them.  On EBCDIC
-platforms it converts from EBCIDC to Unicode.
+platforms it converts from EBCDIC to Unicode.
 
 A meaningless value will currently be returned if the input is not an unsigned
 integer.

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.21.10-9-g65ef2c3

2015-03-24 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/65ef2c3e7d945498f4ef8ab758cc14a8af2f7533?hp=2e4abf26cb063448238056754343185a65d15b21

- Log -
commit 65ef2c3e7d945498f4ef8ab758cc14a8af2f7533
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Mar 24 15:40:27 2015 +0100

Correctly deparse 
---

Summary of changes:
 lib/B/Deparse.pm | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/B/Deparse.pm b/lib/B/Deparse.pm
index 15a1527..621a6c2 100644
--- a/lib/B/Deparse.pm
+++ b/lib/B/Deparse.pm
@@ -2642,7 +2642,11 @@ sub pp_readline {
 my $self = shift;
 my($op, $cx) = @_;
 my $kid = $op-first;
-return  . $self-deparse($kid, 1) .  if is_scalar($kid);
+if (is_scalar($kid)) {
+my $kid_deparsed = $self-deparse($kid, 1);
+return '' if $op-flags  OPf_SPECIAL and $kid_deparsed eq 'ARGV';
+return $kid_deparsed;
+}
 return $self-unop($op, $cx, readline);
 }
 

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.21.9-77-g0f6f92e

2015-03-05 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/0f6f92e0b139f81313e47d8eb6d0c323dfd77b62?hp=2b5060aeb95612aea17de446e9d72793e28bf8a9

- Log -
commit 0f6f92e0b139f81313e47d8eb6d0c323dfd77b62
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Thu Mar 5 17:37:33 2015 +0100

readline should behave as , not 

This fixes bug #123990. The cause was that one promotion to
OP_READLINE was not cleaning the special flag on that op.
---

Summary of changes:
 op.c|  2 +-
 t/io/argv.t | 19 ++-
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/op.c b/op.c
index 9ddfb9b..bbf6a8d 100644
--- a/op.c
+++ b/op.c
@@ -10334,7 +10334,7 @@ Perl_ck_readline(pTHX_ OP *o)
 }
 else {
OP * const newop
-   = newUNOP(OP_READLINE, o-op_flags | OPf_SPECIAL, newGVOP(OP_GV, 0, 
PL_argvgv));
+   = newUNOP(OP_READLINE, 0, newGVOP(OP_GV, 0, PL_argvgv));
op_free(o);
return newop;
 }
diff --git a/t/io/argv.t b/t/io/argv.t
index 03440a2..a9da09f 100644
--- a/t/io/argv.t
+++ b/t/io/argv.t
@@ -7,7 +7,7 @@ BEGIN {
 
 BEGIN { require ./test.pl; }
 
-plan(tests = 36);
+plan(tests = 37);
 
 my ($devnull, $no_devnull);
 
@@ -39,6 +39,15 @@ is($x, 1a line\n2a line\n, ' from two files');
 );
 is($x, a line\nfoo\n, ' from a file and STDIN');
 
+# readline should behave as , not 
+$x = runperl(
+prog   = 'while (readline) { print $_; }',
+stdin  = foo\n,
+stderr = 1,
+args   = [ '-' ],
+);
+is($x, foo\n, 'readline() from STDIN');
+
 $x = runperl(
prog= 'while () { print $_; }',
stdin   = foo\n,
@@ -91,7 +100,7 @@ close TRY or die Could not close: $!;
 @ARGV = ('Io_argv1.tmp', 'Io_argv2.tmp');
 $^I = '_bak';   # not .bak which confuses VMS
 $/ = undef;
-my $i = 10;
+my $i = 11;
 while () {
 s/^/ok $i\n/;
 ++$i;
@@ -116,7 +125,7 @@ open STDIN, 'Io_argv1.tmp' or die $!;
 @ARGV = ();
 ok( !eof(), 'STDIN has something' );
 
-is( , ok 10\n );
+is( , ok 11\n );
 
 SKIP: {
 skip_if_miniperl($no_devnull, 4);
@@ -196,13 +205,13 @@ like($x, qr/^Can't open -: .* at -e line 1/, ' does 
not treat - as STDIN');
 prog   = 'push @ARGV,q//;print while ',
 stderr = 1,
 );
-like($x, qr/^Can't open : .* at -e line 1/, ' does not treat - as 
STDIN');
+like($x, qr/^Can't open : .* at -e line 1/, ' does not open empty string 
in ARGV');
 
 $x = runperl(
 prog   = 'push @ARGV,q//;print while ',
 stderr = 1,
 );
-like($x, qr/^Can't open : .* at -e line 1/, ' does not treat - as 
STDIN');
+like($x, qr/^Can't open : .* at -e line 1/, ' does not open empty 
string in ARGV');
 }
 
 SKIP: {

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.21.4-222-gdf96891

2014-10-03 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/df968918245d10232f955ab0965da7f8d6297a29?hp=4cd408bae5cd62850a437b986c09084b3eea6338

- Log -
commit df968918245d10232f955ab0965da7f8d6297a29
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Fri Oct 3 14:03:13 2014 +0200

Do not rely on the precise error wording

'No such file or directory' is fine on Linux but other UNIXes might
say it differently, for example 'A file or directory in the path name does 
not exist'.
---

Summary of changes:
 t/io/argv.t | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/t/io/argv.t b/t/io/argv.t
index 8abb82e..03440a2 100644
--- a/t/io/argv.t
+++ b/t/io/argv.t
@@ -188,7 +188,7 @@ $x = runperl(
 stderr = 1,
 args   = [ '-' ],
 );
-is($x, Can't open -: No such file or directory at -e line 1.\n, ' does 
not treat - as STDIN');
+like($x, qr/^Can't open -: .* at -e line 1/, ' does not treat - as STDIN');
 
 {
 # tests for an empty string in @ARGV
@@ -196,13 +196,13 @@ is($x, Can't open -: No such file or directory at -e 
line 1.\n, ' does not
 prog   = 'push @ARGV,q//;print while ',
 stderr = 1,
 );
-is($x, Can't open : No such file or directory at -e line 1.\n, ' 
does not treat - as STDIN');
+like($x, qr/^Can't open : .* at -e line 1/, ' does not treat - as 
STDIN');
 
 $x = runperl(
 prog   = 'push @ARGV,q//;print while ',
 stderr = 1,
 );
-is($x, Can't open : No such file or directory at -e line 1.\n, ' 
does not treat - as STDIN');
+like($x, qr/^Can't open : .* at -e line 1/, ' does not treat - as 
STDIN');
 }
 
 SKIP: {
@@ -213,14 +213,14 @@ SKIP: {
 stderr = 1,
 args   = [ 'echo foo |' ],
 );
-is($x, Can't open echo foo |: No such file or directory at -e line 1.\n, 
' does not treat ...| as fork');
+like($x, qr/^Can't open echo foo \|: .* at -e line 1/, ' does not 
treat ...| as fork');
 
 $x = runperl(
 prog   = 'while () { }',
 stderr = 1,
 args   = [ 'Io_argv1.tmp', 'echo foo |' ],
 );
-is($x, Can't open echo foo |: No such file or directory at -e line 1,  
line 3.\n, ' does not treat ...| as fork after eof');
+like($x, qr/^Can't open echo foo \|: .* at -e line 1,  line 3/, ' 
does not treat ...| as fork after eof');
 }
 
 # This used to dump core

--
Perl5 Master Repository


[perl.git] branch rgs/nomagicopen, deleted. v5.21.4-159-g320390b

2014-10-01 Thread Rafael Garcia-Suarez
In perl.git, the branch rgs/nomagicopen has been deleted

http://perl5.git.perl.org/perl.git/commitdiff/?hp=320390b4600ce9a942b3e63b6906d03a56da5042

   was  320390b4600ce9a942b3e63b6906d03a56da5042

---
320390b4600ce9a942b3e63b6906d03a56da5042 Add tests for empty strings in @ARGV
---

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.21.4-198-gf63a114

2014-10-01 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/f63a114b48be4e9c44534b6e07ecdeea8be2ef71?hp=54db7d57c29c9259228a6a4176caa32e391c6d0b

- Log -
commit f63a114b48be4e9c44534b6e07ecdeea8be2ef71
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Wed Oct 1 09:13:05 2014 +0200

Add tests for overriding  versus rcatline

M   t/op/override.t

commit 8710cf8f5f6839aad48677237bbf16e56c839dcd
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Wed Oct 1 09:03:10 2014 +0200

New  tests

- Modify test to test also that  with empty (false) lines
- Add a test for  used in a rcatline op

M   t/io/argv.t
---

Summary of changes:
 t/io/argv.t | 14 ++
 t/op/override.t | 14 ++
 2 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/t/io/argv.t b/t/io/argv.t
index 397bb71..8abb82e 100644
--- a/t/io/argv.t
+++ b/t/io/argv.t
@@ -7,7 +7,7 @@ BEGIN {
 
 BEGIN { require ./test.pl; }
 
-plan(tests = 35);
+plan(tests = 36);
 
 my ($devnull, $no_devnull);
 
@@ -155,14 +155,20 @@ SKIP: {
 }
 
 open(TRY, 'Io_argv1.tmp') || (die Can't open temp file: $!);
-print TRY one\ntwo\n;
+print TRY one\n\nthree\n;
 close TRY or die Could not close: $!;
 
 $x = runperl(
 prog   = 'print $..$ARGV.$_ while ',
 args   = [ 'Io_argv1.tmp' ],
 );
-is($x, 1Io_argv1.tmpone\n2Io_argv1.tmptwo\n, '');
+is($x, 1Io_argv1.tmpone\n2Io_argv1.tmp\n3Io_argv1.tmpthree\n, '');
+
+$x = runperl(
+prog   = '$w=q/b/;$w.=;print $w',
+args   = [ 'Io_argv1.tmp' ],
+);
+is($x, bone\n, ' and rcatline');
 
 $x = runperl(
 prog   = 'while () { print }',
@@ -214,7 +220,7 @@ SKIP: {
 stderr = 1,
 args   = [ 'Io_argv1.tmp', 'echo foo |' ],
 );
-is($x, Can't open echo foo |: No such file or directory at -e line 1,  
line 2.\n, ' does not treat ...| as fork after eof');
+is($x, Can't open echo foo |: No such file or directory at -e line 1,  
line 3.\n, ' does not treat ...| as fork after eof');
 }
 
 # This used to dump core
diff --git a/t/op/override.t b/t/op/override.t
index 1d45617..ead2606 100644
--- a/t/op/override.t
+++ b/t/op/override.t
@@ -8,7 +8,7 @@ BEGIN {
 require 'Config_heavy.pl'; # since runperl will need them
 }
 
-plan tests = 35;
+plan tests = 37;
 
 #
 # This file tries to test builtin override using CORE::GLOBAL
@@ -93,14 +93,20 @@ is( FH, 12 );
 is( $fh  , 13 );
 my $pad_fh;
 is( $pad_fh  , 14 );
+{
+my $buf = ''; $buf .= FH;
+is( $buf, 15, 'rcatline' );
+}
 
 # Non-global readline() override
 BEGIN { *Rgs::readline = sub (;*) { --$r }; }
 {
 package Rgs;
-::is( FH , 13 );
-::is( $fh, 12 );
-::is( $pad_fh, 11 );
+::is( FH , 14 );
+::is( $fh, 13 );
+::is( $pad_fh, 12 );
+my $buf = ''; $buf .= FH;
+::is( $buf, 11, 'rcatline' );
 }
 
 # Global readpipe() override

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.21.4-193-gef32f9b

2014-09-30 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/ef32f9b97b7f6ea1925757be14c852b20c8145c4?hp=f276fdad8f6660f36944c895587a7748585e4969

- Log -
commit ef32f9b97b7f6ea1925757be14c852b20c8145c4
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Sep 30 01:19:55 2014 +0200

Add tests for empty strings in @ARGV

which should be refused, since no file name should be empty.
(Suggested by Richard Soderberg)

M   t/io/argv.t

commit 80a96bfc62584b11992aecd2fb33c6f21cfc24b9
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Sep 30 00:25:27 2014 +0200

Clarify the documentation for 

M   pod/perlop.pod

commit c6f54c1d24664c889a16e7f7d380041a2696f957
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Sep 30 00:24:21 2014 +0200

Add tests for $ARGV

There weren't apparently any. This also tests that $ARGV behaves
correctly both with  and .

M   t/io/argv.t

commit 7889afd0b7500393350d5f3dbd5c49b45e3b86d3
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Mon Sep 29 22:52:32 2014 +0200

Add tests for the  operator

M   t/io/argv.t

commit 1033ba6ee622b4ae14475c6261820c9949ff012f
Author: Peter Martini petercmart...@gmail.com
Date:   Sun Aug 10 23:11:20 2014 -0400

Added some documentation for while()

M   pod/perlop.pod

commit 157fb5a14d10ed16ffc6ebfc43d2637a016fdfce
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Thu Jul 24 17:43:29 2014 +0200

Introduce the double-diamond operator 

This operator works like  or ARGV, as it reads the list of file
names to open from the command-line arguments. However, it disables
the magic-open feature (that forks to execute piped commands) :

$ bleadperl -e 'while(){print}' 'echo foo |'
foo
$ bleadperl -e 'while(){print}' 'echo foo |'
Can't open echo foo |: No such file or directory at -e line 1.

M   doio.c
M   embed.fnc
M   embed.h
M   op.c
M   pp_hot.c
M   pp_sys.c
M   proto.h
M   toke.c
---

Summary of changes:
 doio.c |  9 --
 embed.fnc  |  2 +-
 embed.h|  2 +-
 op.c   |  2 +-
 pod/perlop.pod | 14 --
 pp_hot.c   |  4 +--
 pp_sys.c   |  2 +-
 proto.h|  2 +-
 t/io/argv.t| 88 ++
 toke.c | 15 --
 10 files changed, 120 insertions(+), 20 deletions(-)

diff --git a/doio.c b/doio.c
index a631eeb..c7aceca 100644
--- a/doio.c
+++ b/doio.c
@@ -799,7 +799,7 @@ say_false:
 }
 
 PerlIO *
-Perl_nextargv(pTHX_ GV *gv)
+Perl_nextargv(pTHX_ GV *gv, bool nomagicopen)
 {
 IO * const io = GvIOp(gv);
 
@@ -837,7 +837,10 @@ Perl_nextargv(pTHX_ GV *gv)
SvSETMAGIC(GvSV(gv));
PL_oldname = SvPVx(GvSV(gv), oldlen);
 if (LIKELY(!PL_inplace)) {
-if (do_open6(gv, PL_oldname, oldlen, NULL, NULL, 0)) {
+if (nomagicopen
+? do_open6(gv, , 1, NULL, GvSV(gv), 1)
+: do_open6(gv, PL_oldname, oldlen, NULL, NULL, 0)
+   ) {
 return IoIFP(GvIOp(gv));
 }
 }
@@ -1126,7 +1129,7 @@ Perl_do_eof(pTHX_ GV *gv)
PerlIO_set_cnt(IoIFP(io),-1);
}
if (PL_op-op_flags  OPf_SPECIAL) { /* not necessarily a real EOF yet? 
*/
-   if (gv != PL_argvgv || !nextargv(gv))   /* get another fp handy 
*/
+   if (gv != PL_argvgv || !nextargv(gv, FALSE))/* get another 
fp handy */
return TRUE;
}
else
diff --git a/embed.fnc b/embed.fnc
index 5fa38e8..5de2f83 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1056,7 +1056,7 @@ Apd   |SV*|vnormal|NN SV *vs
 Apd|SV*|vstringify |NN SV *vs
 Apd|int|vcmp   |NN SV *lhv|NN SV *rhv
 : Used in pp_hot.c and pp_sys.c
-p  |PerlIO*|nextargv   |NN GV* gv
+p  |PerlIO*|nextargv   |NN GV* gv|bool nomagicopen
 AnpP   |char*  |ninstr |NN const char* big|NN const char* bigend \
|NN const char* little|NN const char* lend
 Apd|void   |op_free|NULLOK OP* arg
diff --git a/embed.h b/embed.h
index 1fe7076..ed04c7c 100644
--- a/embed.h
+++ b/embed.h
@@ -1248,7 +1248,7 @@
 #define newSTUB(a,b)   Perl_newSTUB(aTHX_ a,b)
 #define newSVavdefelem(a,b,c)  Perl_newSVavdefelem(aTHX_ a,b,c)
 #define newXS_len_flags(a,b,c,d,e,f,g) Perl_newXS_len_flags(aTHX_ 
a,b,c,d,e,f,g)
-#define nextargv(a)Perl_nextargv(aTHX_ a)
+#define nextargv(a,b)  Perl_nextargv(aTHX_ a,b)
 #define oopsAV(a)  Perl_oopsAV(aTHX_ a)
 #define oopsHV(a)  Perl_oopsHV(aTHX_ a)
 #define op_const_sv(a,b)   Perl_op_const_sv(aTHX_ a,b)
diff --git a/op.c b/op.c
index d0b6173..08e6028 100644

[perl.git] branch blead, updated. v5.21.4-194-gad77c20

2014-09-30 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/ad77c200c8a4ed39fda83b8a740ef81ede885d84?hp=ef32f9b97b7f6ea1925757be14c852b20c8145c4

- Log -
commit ad77c200c8a4ed39fda83b8a740ef81ede885d84
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Sep 30 15:36:10 2014 +0200

Add a test for  failing on the second file
---

Summary of changes:
 t/io/argv.t | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/t/io/argv.t b/t/io/argv.t
index b3825bb..58e1d66 100644
--- a/t/io/argv.t
+++ b/t/io/argv.t
@@ -7,7 +7,7 @@ BEGIN {
 
 BEGIN { require ./test.pl; }
 
-plan(tests = 34);
+plan(tests = 35);
 
 my ($devnull, $no_devnull);
 
@@ -208,6 +208,13 @@ SKIP: {
 args   = [ 'echo foo |' ],
 );
 is($x, Can't open echo foo |: No such file or directory at -e line 1.\n, 
' does not treat ...| as fork');
+
+$x = runperl(
+prog   = 'while () { }',
+stderr = 1,
+args   = [ 'Io_argv1.tmp', 'echo foo |' ],
+);
+is($x, Can't open echo foo |: No such file or directory at -e line 1,  
line 2.\n, ' does not treat ...| as fork after eof');
 }
 
 # This used to dump core

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.21.4-195-g7f2ab31

2014-09-30 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/7f2ab31fa3d20727b229092cc401b4b48fdee66d?hp=ad77c200c8a4ed39fda83b8a740ef81ede885d84

- Log -
commit 7f2ab31fa3d20727b229092cc401b4b48fdee66d
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Sep 30 15:44:44 2014 +0200

Forgot to update SKIP count after last patch
---

Summary of changes:
 t/io/argv.t | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/io/argv.t b/t/io/argv.t
index 58e1d66..397bb71 100644
--- a/t/io/argv.t
+++ b/t/io/argv.t
@@ -200,7 +200,7 @@ is($x, Can't open -: No such file or directory at -e line 
1.\n, ' does not
 }
 
 SKIP: {
-skip('no echo', 1) unless -x '/bin/echo';
+skip('no echo', 2) unless -x '/bin/echo';
 
 $x = runperl(
 prog   = 'while () { print $_; }',

--
Perl5 Master Repository


[perl.git] branch rgs/nomagicopen, created. v5.21.4-155-g042bcb3

2014-09-29 Thread Rafael Garcia-Suarez
In perl.git, the branch rgs/nomagicopen has been created

http://perl5.git.perl.org/perl.git/commitdiff/042bcb33f679e0157364b6fc58ee8b871ea28a36?hp=

at  042bcb33f679e0157364b6fc58ee8b871ea28a36 (commit)

- Log -
commit 042bcb33f679e0157364b6fc58ee8b871ea28a36
Author: Peter Martini petercmart...@gmail.com
Date:   Sun Aug 10 23:11:20 2014 -0400

Added some documentation for while()

M   pod/perlop.pod

commit d5c1d5c47aaa9e7531803cf22da37a856de65376
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Thu Jul 24 17:43:29 2014 +0200

Introduce the double-diamond operator 

This operator works like  or ARGV, as it reads the list of file
names to open from the command-line arguments. However, it disables
the magic-open feature (that forks to execute piped commands) :

$ bleadperl -e 'while(){print}' 'echo foo |'
foo
$ bleadperl -e 'while(){print}' 'echo foo |'
Can't open echo foo |: No such file or directory at -e line 1.

M   doio.c
M   embed.fnc
M   embed.h
M   op.c
M   pp_hot.c
M   pp_sys.c
M   proto.h
M   toke.c
---

--
Perl5 Master Repository


[perl.git] branch rgs/nomagicopen, updated. v5.21.4-156-g0a74b59

2014-09-29 Thread Rafael Garcia-Suarez
In perl.git, the branch rgs/nomagicopen has been updated

http://perl5.git.perl.org/perl.git/commitdiff/0a74b59263105fcf4542726e6a82b8cb58b73cf8?hp=042bcb33f679e0157364b6fc58ee8b871ea28a36

- Log -
commit 0a74b59263105fcf4542726e6a82b8cb58b73cf8
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Mon Sep 29 22:52:32 2014 +0200

Add tests for the  operator
---

Summary of changes:
 t/io/argv.t | 41 ++---
 1 file changed, 38 insertions(+), 3 deletions(-)

diff --git a/t/io/argv.t b/t/io/argv.t
index a1febaf..70c5289 100644
--- a/t/io/argv.t
+++ b/t/io/argv.t
@@ -7,7 +7,7 @@ BEGIN {
 
 BEGIN { require ./test.pl; }
 
-plan(tests = 24);
+plan(tests = 28);
 
 my ($devnull, $no_devnull);
 
@@ -34,13 +34,13 @@ is($x, 1a line\n2a line\n, ' from two files');
stdin   = foo\n,
args= [ 'Io_argv1.tmp', '-' ],
 );
-is($x, a line\nfoo\n, '   from a file and STDIN');
+is($x, a line\nfoo\n, ' from a file and STDIN');
 
 $x = runperl(
prog= 'while () { print $_; }',
stdin   = foo\n,
 );
-is($x, foo\n, '   from just STDIN');
+is($x, foo\n, ' from just STDIN');
 }
 
 {
@@ -132,6 +132,41 @@ SKIP: {
 close $fh or die Could not close: $!;
 }
 
+open(TRY, 'Io_argv1.tmp') || (die Can't open temp file: $!);
+print TRY one\ntwo\n;
+close TRY or die Could not close: $!;
+
+$x = runperl(
+prog   = 'print while ',
+args   = [ 'Io_argv1.tmp' ],
+);
+is($x, one\ntwo\n, '');
+
+$x = runperl(
+prog   = 'while () { print }',
+stdin  = foo\n,
+);
+is($x, foo\n, ' from just STDIN (no argument)');
+
+$x = runperl(
+prog   = 'while () { print $_; }',
+stdin  = foo\n,
+stderr = 1,
+args   = [ '-' ],
+);
+is($x, Can't open -: No such file or directory at -e line 1.\n, ' does 
not treat - as STDIN');
+
+SKIP: {
+skip('no echo', 1) unless -x '/bin/echo';
+
+$x = runperl(
+prog   = 'while () { print $_; }',
+stderr = 1,
+args   = [ 'echo foo |' ],
+);
+is($x, Can't open echo foo |: No such file or directory at -e line 1.\n, 
' does not treat ...| as fork');
+}
+
 # This used to dump core
 fresh_perl_is( '**PROG**', foobar, {}, ARGV aliasing and eof() ); 
 open OUT, Io_argv3.tmp or die Can't open temp file: $!;

--
Perl5 Master Repository


[perl.git] branch rgs/nomagicopen, updated. v5.21.4-158-g0d36b5a

2014-09-29 Thread Rafael Garcia-Suarez
In perl.git, the branch rgs/nomagicopen has been updated

http://perl5.git.perl.org/perl.git/commitdiff/0d36b5a5c2536f7ed29e6e66ee888d076f93f012?hp=0a74b59263105fcf4542726e6a82b8cb58b73cf8

- Log -
commit 0d36b5a5c2536f7ed29e6e66ee888d076f93f012
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Sep 30 00:25:27 2014 +0200

Clarify the documentation for 

M   pod/perlop.pod

commit 1fb2c054e826fdefa844490c422c33d5691e9a4e
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Sep 30 00:24:21 2014 +0200

Add tests for $ARGV

There weren't apparently any. This also tests that $ARGV behaves
correctly both with  and .

M   t/io/argv.t
---

Summary of changes:
 pod/perlop.pod |  6 --
 t/io/argv.t| 38 +-
 2 files changed, 37 insertions(+), 7 deletions(-)

diff --git a/pod/perlop.pod b/pod/perlop.pod
index 8e279fe..07bcaf9 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -2853,7 +2853,7 @@ mean C/^/m.
 
 =head2 I/O Operators
 Xoperator, i/o Xoperator, io Xio Xwhile Xfilehandle
-X   X@ARGV
+X   X   X@ARGV
 
 There are several I/O operators you should know about.
 
@@ -2987,7 +2987,9 @@ can use the module CARGV::readonly from CPAN, or use 
the double bracket:
 
 Using double angle brackets inside of a while causes the open to use the
 three argument form (with the second argument being C  ), so all
-arguments in ARGV are treated as literal filenames.
+arguments in ARGV are treated as literal filenames (including -).
+(Note that for convenience, if you use C   and if @ARGV is
+empty, it will still read from the standard input.)
 
 You can modify @ARGV before the first  as long as the array ends up
 containing the list of filenames you really want.  Line numbers (C$.)
diff --git a/t/io/argv.t b/t/io/argv.t
index 70c5289..944abd2 100644
--- a/t/io/argv.t
+++ b/t/io/argv.t
@@ -7,7 +7,7 @@ BEGIN {
 
 BEGIN { require ./test.pl; }
 
-plan(tests = 28);
+plan(tests = 32);
 
 my ($devnull, $no_devnull);
 
@@ -21,6 +21,9 @@ if (is_miniperl()) {
 open(TRY, 'Io_argv1.tmp') || (die Can't open temp file: $!);
 print TRY a line\n;
 close TRY or die Could not close: $!;
+open(TRY, 'Io_argv2.tmp') || (die Can't open temp file: $!);
+print TRY another line\n;
+close TRY or die Could not close: $!;
 
 $x = runperl(
 prog   = 'while () { print $., $_; }',
@@ -41,6 +44,25 @@ is($x, 1a line\n2a line\n, ' from two files');
stdin   = foo\n,
 );
 is($x, foo\n, ' from just STDIN');
+
+$x = runperl(
+   prog= 'while () { print $ARGV.q/,/.$_ }',
+   args= [ 'Io_argv1.tmp', 'Io_argv2.tmp' ],
+);
+is($x, Io_argv1.tmp,a line\nIo_argv2.tmp,another line\n, '$ARGV is the 
file name');
+
+$x = runperl(
+   prog= 'print $ARGV while ',
+   stdin   = foo\nbar\n,
+args   = [ '-' ],
+);
+is($x, --, '$ARGV is - for explicit STDIN');
+
+$x = runperl(
+   prog= 'print $ARGV while ',
+   stdin   = foo\nbar\n,
+);
+is($x, --, '$ARGV is - for implicit STDIN');
 }
 
 {
@@ -69,7 +91,7 @@ close TRY or die Could not close: $!;
 @ARGV = ('Io_argv1.tmp', 'Io_argv2.tmp');
 $^I = '_bak';   # not .bak which confuses VMS
 $/ = undef;
-my $i = 7;
+my $i = 10;
 while () {
 s/^/ok $i\n/;
 ++$i;
@@ -94,7 +116,7 @@ open STDIN, 'Io_argv1.tmp' or die $!;
 @ARGV = ();
 ok( !eof(), 'STDIN has something' );
 
-is( , ok 7\n );
+is( , ok 10\n );
 
 SKIP: {
 skip_if_miniperl($no_devnull, 4);
@@ -137,10 +159,10 @@ print TRY one\ntwo\n;
 close TRY or die Could not close: $!;
 
 $x = runperl(
-prog   = 'print while ',
+prog   = 'print $..$ARGV.$_ while ',
 args   = [ 'Io_argv1.tmp' ],
 );
-is($x, one\ntwo\n, '');
+is($x, 1Io_argv1.tmpone\n2Io_argv1.tmptwo\n, '');
 
 $x = runperl(
 prog   = 'while () { print }',
@@ -149,6 +171,12 @@ $x = runperl(
 is($x, foo\n, ' from just STDIN (no argument)');
 
 $x = runperl(
+prog   = 'print $ARGV.q/,/ for ',
+stdin  = foo\nbar\n,
+);
+is($x, -,-,, '$ARGV is - for STDIN with ');
+
+$x = runperl(
 prog   = 'while () { print $_; }',
 stdin  = foo\n,
 stderr = 1,

--
Perl5 Master Repository


[perl.git] branch rgs/nomagicopen, updated. v5.21.4-159-g320390b

2014-09-29 Thread Rafael Garcia-Suarez
In perl.git, the branch rgs/nomagicopen has been updated

http://perl5.git.perl.org/perl.git/commitdiff/320390b4600ce9a942b3e63b6906d03a56da5042?hp=0d36b5a5c2536f7ed29e6e66ee888d076f93f012

- Log -
commit 320390b4600ce9a942b3e63b6906d03a56da5042
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Sep 30 01:19:55 2014 +0200

Add tests for empty strings in @ARGV

which should be refused, since no file name should be empty.
(Suggested by Richard Soderberg)
---

Summary of changes:
 t/io/argv.t | 17 -
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/t/io/argv.t b/t/io/argv.t
index 944abd2..b3825bb 100644
--- a/t/io/argv.t
+++ b/t/io/argv.t
@@ -7,7 +7,7 @@ BEGIN {
 
 BEGIN { require ./test.pl; }
 
-plan(tests = 32);
+plan(tests = 34);
 
 my ($devnull, $no_devnull);
 
@@ -184,6 +184,21 @@ $x = runperl(
 );
 is($x, Can't open -: No such file or directory at -e line 1.\n, ' does 
not treat - as STDIN');
 
+{
+# tests for an empty string in @ARGV
+$x = runperl(
+prog   = 'push @ARGV,q//;print while ',
+stderr = 1,
+);
+is($x, Can't open : No such file or directory at -e line 1.\n, ' 
does not treat - as STDIN');
+
+$x = runperl(
+prog   = 'push @ARGV,q//;print while ',
+stderr = 1,
+);
+is($x, Can't open : No such file or directory at -e line 1.\n, ' 
does not treat - as STDIN');
+}
+
 SKIP: {
 skip('no echo', 1) unless -x '/bin/echo';
 

--
Perl5 Master Repository


[perl.git] branch rgs/nomagicopen, deleted. v5.21.2-108-g769ed2d

2014-09-26 Thread Rafael Garcia-Suarez
In perl.git, the branch rgs/nomagicopen has been deleted

http://perl5.git.perl.org/perl.git/commitdiff/?hp=769ed2d3712bb56a8916e5a81afd87529847aac0

   was  769ed2d3712bb56a8916e5a81afd87529847aac0

---
769ed2d3712bb56a8916e5a81afd87529847aac0 Added some documentation for 
while()
---

--
Perl5 Master Repository


[perl.git] branch rgs/nomagicopen, created. v5.21.4-104-ga440b24

2014-09-26 Thread Rafael Garcia-Suarez
In perl.git, the branch rgs/nomagicopen has been created

http://perl5.git.perl.org/perl.git/commitdiff/a440b246fbd7389b7d7ce0c65a6fa4d4f21a9541?hp=

at  a440b246fbd7389b7d7ce0c65a6fa4d4f21a9541 (commit)

- Log -
commit a440b246fbd7389b7d7ce0c65a6fa4d4f21a9541
Author: Peter Martini petercmart...@gmail.com
Date:   Sun Aug 10 23:11:20 2014 -0400

Added some documentation for while()

M   pod/perlop.pod

commit ee86a931a2fb6b7df36882f3911b309f23afc1e5
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Thu Jul 24 17:43:29 2014 +0200

Introduce the double-diamond operator 

This operator works like  or ARGV, as it reads the list of file
names to open from the command-line arguments. However, it disables
the magic-open feature (that forks to execute piped commands) :

$ bleadperl -e 'while(){print}' 'echo foo |'
foo
$ bleadperl -e 'while(){print}' 'echo foo |'
Can't open echo foo |: No such file or directory at -e line 1.

M   doio.c
M   embed.fnc
M   embed.h
M   op.c
M   pp_hot.c
M   pp_sys.c
M   proto.h
M   toke.c
---

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.21.4-103-g55e767a

2014-09-26 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/55e767ae92dd46d7ab3b9938fd7345b5299d2eb4?hp=07925c5e6d6246087a9695d1f62edca20af3948d

- Log -
commit 55e767ae92dd46d7ab3b9938fd7345b5299d2eb4
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Fri Sep 26 15:44:44 2014 +0200

Micro-optimise some hot code

that was pointed to me by a profile generated with Devel::NYTProf
---

Summary of changes:
 lib/utf8_heavy.pl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/utf8_heavy.pl b/lib/utf8_heavy.pl
index 43f3399..e0c3d5e 100644
--- a/lib/utf8_heavy.pl
+++ b/lib/utf8_heavy.pl
@@ -574,8 +574,8 @@ sub _loose_name ($) {
 $list = join '', $taint,
 map  { $_-[1] }
 sort { $a-[0] = $b-[0] }
-map  { /^([0-9a-fA-F]+)/; [ CORE::hex($1), $_ ] }
-grep { /^([0-9a-fA-F]+)/ and not $seen{$1}++ } @tmp; # 
XXX doesn't do ranges right
+map  { /^([0-9a-fA-F]+)/  !$seen{$1}++ ? [ 
CORE::hex($1), $_ ] : () }
+@tmp; # XXX doesn't do ranges right
 }
 else {
 # mktables has gone to some trouble to make non-user defined

--
Perl5 Master Repository


[perl.git] branch rgs/nomagicopen, deleted. v5.21.2-46-g7f5bb34

2014-08-07 Thread Rafael Garcia-Suarez
In perl.git, the branch rgs/nomagicopen has been deleted

http://perl5.git.perl.org/perl.git/commitdiff/?hp=7f5bb3418c4fc2d6e2523bf918a7d9e33f9a7acc

   was  7f5bb3418c4fc2d6e2523bf918a7d9e33f9a7acc

---
7f5bb3418c4fc2d6e2523bf918a7d9e33f9a7acc Introduce the double-diamond operator 

---

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.21.2-104-g287e9fa

2014-08-06 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/287e9fa667dea09a6b41b11e1be4ccc73927e200?hp=7e0dd61bbcc3d45b78105f4cf88b771e40cd342c

- Log -
commit 287e9fa667dea09a6b41b11e1be4ccc73927e200
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Wed Aug 6 22:15:24 2014 +0200

Documentation typo fix
---

Summary of changes:
 av.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/av.c b/av.c
index 49fef00..0029191 100644
--- a/av.c
+++ b/av.c
@@ -776,7 +776,7 @@ Perl_av_len(pTHX_ AV *av)
 Set the highest index in the array to the given number, equivalent to
 Perl's C$#array = $fill;.
 
-The number of elements in the an array will be Cfill + 1 after
+The number of elements in the array will be Cfill + 1 after
 av_fill() returns.  If the array was previously shorter, then the
 additional elements appended are set to NULL.  If the array
 was longer, then the excess elements are freed.  Cav_fill(av, -1) is

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.21.2-94-g205b814

2014-08-05 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/205b8145e88fdb6ead534ed102faa8b6aecbe085?hp=883f220b1a9552b53f705c439a73a5c235feaedc

- Log -
commit 205b8145e88fdb6ead534ed102faa8b6aecbe085
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Aug 5 09:27:29 2014 +0200

Fix MANIFEST and Safe's changelog

M   MANIFEST
M   dist/Safe/Changes
M   dist/Safe/t/safesecurity.t

commit 23c3e71c90a1dea6c17d193db263796876d2ac52
Author: syber sy...@crazypanda.ru
Date:   Mon Aug 4 23:47:23 2014 +0400

Critical bugfix in module Safe (Opcode). Version increased, changelog and 
test added.

This example hacks outside environment:

package My::Controller;
use strict;

sub jopa { return jopa\n; }

package main;
use Safe;

my $s = new Safe;

my $ok = $s-reval(q{
package My::Controller;
sub jopa { return hacked\n; }

My::Controller-jopa();
});

print My::Controller-jopa();

M   dist/Safe/Changes
M   dist/Safe/Safe.pm
A   dist/Safe/t/safesecurity.t
M   ext/Opcode/Opcode.pm
M   ext/Opcode/Opcode.xs
---

Summary of changes:
 MANIFEST   |  3 ++-
 dist/Safe/Changes  | 11 ++-
 dist/Safe/Safe.pm  |  2 +-
 dist/Safe/t/safesecurity.t | 32 
 ext/Opcode/Opcode.pm   |  2 +-
 ext/Opcode/Opcode.xs   |  6 +-
 6 files changed, 51 insertions(+), 5 deletions(-)
 create mode 100644 dist/Safe/t/safesecurity.t

diff --git a/MANIFEST b/MANIFEST
index 6e86383..e1ac8bc 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -3217,7 +3217,8 @@ dist/Safe/t/safe3.t   See if Safe works
 dist/Safe/t/safeload.t Tests that some modules can be loaded by Safe
 dist/Safe/t/safenamedcap.t Tests that Tie::Hash::NamedCapture can be loaded
 dist/Safe/t/safeops.t  Tests that all ops can be trapped by Safe
-dist/Safe/t/saferegexp.t
+dist/Safe/t/saferegexp.t   Tests Safe with regular expressions
+dist/Safe/t/safesecurity.t Tests misc. security fixes in Safe
 dist/Safe/t/safesort.t Tests Safe with sort
 dist/Safe/t/safeuniversal.tTests Safe with functions from universal.c
 dist/Safe/t/safeutf8.t Tests Safe with utf8.pm
diff --git a/dist/Safe/Changes b/dist/Safe/Changes
index 8cde1db..a48058a 100644
--- a/dist/Safe/Changes
+++ b/dist/Safe/Changes
@@ -1,3 +1,12 @@
+2.38 Mon Aug 04 2014
+- critical bugfix: outside packages could be replaced (fix in Opcode)
+
+2.37 Sat Jun 22 2013
+- Doc and presentation nits
+
+2.36 Thu May 23 18:08:48 2013
+- Doc and test fixes for newer perls
+
 2.35 Thu Feb 21 2013
 - localize %SIG in the Safe compartment
 - actually check that we call execution methods on a Safe object
@@ -7,7 +16,7 @@
   cf Perl 5 change 42440e3c68e8bafb7e2a74763360939de0fad6be
 
 2.33 Tue Apr  3 2012
-- Don’t eval code under ‘no strict’ (Father Chrysostomos)
+  Don't eval code under no strict (Father Chrysostomos)
   cf. Perl 5 change 25dc25e774abbe993644899cf4d9f9925a9fb9a8
 
 2.32 Sat Mar 31 2012
diff --git a/dist/Safe/Safe.pm b/dist/Safe/Safe.pm
index 4db116d..2c0d56a 100644
--- a/dist/Safe/Safe.pm
+++ b/dist/Safe/Safe.pm
@@ -3,7 +3,7 @@ package Safe;
 use 5.003_11;
 use Scalar::Util qw(reftype refaddr);
 
-$Safe::VERSION = 2.37;
+$Safe::VERSION = 2.38;
 
 # *** Don't declare any lexicals above this point ***
 #
diff --git a/dist/Safe/t/safesecurity.t b/dist/Safe/t/safesecurity.t
new file mode 100644
index 000..7cb9712
--- /dev/null
+++ b/dist/Safe/t/safesecurity.t
@@ -0,0 +1,32 @@
+#!perl
+
+BEGIN {
+require Config;
+import Config;
+if ($Config{'extensions'} !~ /\bOpcode\b/) {
+   print 1..0\n;
+   exit 0;
+}
+}
+
+use strict;
+use warnings;
+use Test::More;
+use Safe;
+plan(tests = 1);
+
+my $c = new Safe;
+
+{
+package My::Controller;
+sub jopa { return jopa }
+}
+
+$c-reval(q{
+package My::Controller;
+sub jopa { return hacked }
+
+My::Controller-jopa; # let it cache package
+});
+
+is(My::Controller-jopa, jopa, outside packages cannot be overriden);
diff --git a/ext/Opcode/Opcode.pm b/ext/Opcode/Opcode.pm
index a48b01d..3da8d94 100644
--- a/ext/Opcode/Opcode.pm
+++ b/ext/Opcode/Opcode.pm
@@ -6,7 +6,7 @@ use strict;
 
 our($VERSION, @ISA, @EXPORT_OK);
 
-$VERSION = 1.27;
+$VERSION = 1.28;
 
 use Carp;
 use Exporter ();
diff --git a/ext/Opcode/Opcode.xs b/ext/Opcode/Opcode.xs
index 386dddf..594f5b2 100644
--- a/ext/Opcode/Opcode.xs
+++ b/ext/Opcode/Opcode.xs
@@ -310,7 +310,7 @@ PPCODE:
 dummy_hv = save_hash(PL_incgv);
 GvHV(PL_incgv) = 
(HV*)SvREFCNT_inc(GvHV(gv_HVadd(gv_fetchpvs(INC,GV_ADD,SVt_PVHV;
 
-/* Invalidate ISA and method caches */
+/* Invalidate class and method caches */
 ++PL_sub_generation

[perl.git] branch blead, updated. v5.21.2-95-g8593948

2014-08-05 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/8593948372c4d40805c4be6f37bff62d656cd087?hp=205b8145e88fdb6ead534ed102faa8b6aecbe085

- Log -
commit 8593948372c4d40805c4be6f37bff62d656cd087
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Aug 5 10:02:09 2014 +0200

Regenerate local Safe MANIFEST
---

Summary of changes:
 dist/Safe/MANIFEST | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/dist/Safe/MANIFEST b/dist/Safe/MANIFEST
index cb08dd3..0c533a5 100644
--- a/dist/Safe/MANIFEST
+++ b/dist/Safe/MANIFEST
@@ -1,6 +1,8 @@
 Changes
-MANIFEST   This list of files
 Makefile.PL
+MANIFEST   This list of files
+META.json  Module JSON meta-data (added by MakeMaker)
+META.yml   Module meta-data (added by MakeMaker)
 README
 Safe.pm
 t/safe1.t
@@ -10,9 +12,8 @@ t/safeload.t
 t/safenamedcap.t
 t/safeops.t
 t/saferegexp.t
+t/safesecurity.t
 t/safesort.t
 t/safeuniversal.t
 t/safeutf8.t
 t/safewrap.t
-META.yml Module meta-data (added by MakeMaker)
-META.jsonModule JSON meta-data (added by 
MakeMaker)

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.21.2-96-g372c0b6

2014-08-05 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/372c0b63b2f187ac484211146915dcecdf1bd778?hp=8593948372c4d40805c4be6f37bff62d656cd087

- Log -
commit 372c0b63b2f187ac484211146915dcecdf1bd778
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Aug 5 10:15:58 2014 +0200

Add syber to AUTHORS
---

Summary of changes:
 AUTHORS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/AUTHORS b/AUTHORS
index 9db941e..934c50c 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1124,6 +1124,7 @@ Stian Seeberg sseeb...@nimsoft.no
 Sullivan Beck  sb...@cpan.org
 Sven Strickrothsven.strickr...@tu-clausthal.de
 Sven Verdoolaege   sk...@breughel.ufsia.ac.be
+syber  sy...@crazypanda.ru
 SynaptiCAD, Inc.   sa...@syncad.com
 Takis Psarogiannakopoulos  ta...@xfree86.org
 Taro KAWAGISHI

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.21.2-78-g3f10e7b

2014-07-30 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/3f10e7b3c488077eb8624f47ccf07844c38a206a?hp=f04d2c345149d984ed5180f12fa007908c91b131

- Log -
commit 3f10e7b3c488077eb8624f47ccf07844c38a206a
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Wed Jul 30 16:13:20 2014 +0200

Fix tabs in MANIFEST
---

Summary of changes:
 MANIFEST | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MANIFEST b/MANIFEST
index b63c75b..99ce663 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -5142,7 +5142,7 @@ t/op/ref.tSee if refs and objects 
work
 t/op/repeat.t  See if x operator works
 t/op/require_37033.t   See if require always closes rsfp
 t/op/require_errors.t  See if errors from require are reported 
correctly
-t/op/require_override.t See if require handles no argument properly
+t/op/require_override.tSee if require handles no argument 
properly
 t/op/reset.t   See if reset operator works
 t/op/reverse.t See if reverse operator works
 t/op/rt119311.tTest bug #119311 (die/DESTROY/recursion)

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.21.2-79-ga12b621

2014-07-30 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/a12b621d793c8351fe47e57f6bfa2df451bd6f44?hp=3f10e7b3c488077eb8624f47ccf07844c38a206a

- Log -
commit a12b621d793c8351fe47e57f6bfa2df451bd6f44
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Wed Jul 30 16:40:46 2014 +0200

Avoid pack/unpack to produce the binary form of a utf8 string
---

Summary of changes:
 t/run/switchC.t | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/run/switchC.t b/t/run/switchC.t
index b1a243c..f6aa868 100644
--- a/t/run/switchC.t
+++ b/t/run/switchC.t
@@ -18,7 +18,7 @@ my $r;
 my $tmpfile = tempfile();
 my $scriptfile = tempfile();
 
-my $b = pack(C*, unpack(U0C*, pack(U,256)));
+my $b = chr 256; utf8::encode $b;
 
 $r = runperl( switches = [ '-CO', '-w' ],
  prog = 'print chr(256)',

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.21.2-43-g4ba3add

2014-07-24 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/4ba3adde25c4edf2e470f13677632b6d2f9e2fcd?hp=d62b8c6ab04885d004d4a52686f68518d49a3604

- Log -
commit 4ba3adde25c4edf2e470f13677632b6d2f9e2fcd
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Thu Jul 24 13:26:10 2014 +0200

Remove flagging OP_READLINE with OPf_SPECIAL

This was used to distinguish forms FILE from $file, but doesn't
seem to be used anymore by anything.
---

Summary of changes:
 op.h   | 1 -
 toke.c | 2 --
 2 files changed, 3 deletions(-)

diff --git a/op.h b/op.h
index 9f94caf..c76f37d 100644
--- a/op.h
+++ b/op.h
@@ -114,7 +114,6 @@ Deprecated.  Use CGIMME_V instead.
/*  On OP_(ENTER|LEAVE)EVAL, don't clear $@ */
 /*  On pushre, rx is used as part of split, 
e.g. split   */
/*  On regcomp, use re 'eval' was in scope */
-   /*  On OP_READLINE, was $filehandle */
/*  On RV2[ACGHS]V, don't create GV--in
defined()*/
/*  On OP_DBSTATE, indicates breakpoint
diff --git a/toke.c b/toke.c
index cb379ef..745a451 100644
--- a/toke.c
+++ b/toke.c
@@ -9374,8 +9374,6 @@ intro_sym:
newUNOP(OP_RV2SV, 0,
newGVOP(OP_GV, 0, gv)));
}
-   if (!readline_overriden)
-   PL_lex_op-op_flags |= OPf_SPECIAL;
/* we created the ops in PL_lex_op, so make pl_yylval.ival a null 
op */
pl_yylval.ival = OP_NULL;
}

--
Perl5 Master Repository


[perl.git] branch rgs/nomagicopen, created. v5.21.2-46-g7f5bb34

2014-07-24 Thread Rafael Garcia-Suarez
In perl.git, the branch rgs/nomagicopen has been created

http://perl5.git.perl.org/perl.git/commitdiff/7f5bb3418c4fc2d6e2523bf918a7d9e33f9a7acc?hp=

at  7f5bb3418c4fc2d6e2523bf918a7d9e33f9a7acc (commit)

- Log -
commit 7f5bb3418c4fc2d6e2523bf918a7d9e33f9a7acc
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Thu Jul 24 17:43:29 2014 +0200

Introduce the double-diamond operator 

This operator works like  or ARGV, as it reads the list of file
names to open from the command-line arguments. However, it disables
the magic-open feature (that forks to execute piped commands) :

$ bleadperl -e 'while(){print}' 'echo foo |'
foo
$ bleadperl -e 'while(){print}' 'echo foo |'
Can't open echo foo |: No such file or directory at -e line 1.
---

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.19.8-512-g8a50cd0

2014-02-19 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/8a50cd03a18f63853c30d77231f3eed37cdf7efa?hp=b79bb8373d09257612fa6517489b425bf5c77fcb

- Log -
commit 8a50cd03a18f63853c30d77231f3eed37cdf7efa
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Wed Feb 19 15:41:51 2014 +0100

Do not dereference hv before ensuring it's not NULL

This should fix RT #116441 and possibly other bugs.
---

Summary of changes:
 hv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hv.c b/hv.c
index 1d322fe..a9322aa 100644
--- a/hv.c
+++ b/hv.c
@@ -1753,10 +1753,11 @@ Perl_hv_undef_flags(pTHX_ HV *hv, U32 flags)
 {
 dVAR;
 XPVHV* xhv;
-const bool save = !!SvREFCNT(hv);
+bool save;
 
 if (!hv)
return;
+save = !!SvREFCNT(hv);
 DEBUG_A(Perl_hv_assert(aTHX_ hv));
 xhv = (XPVHV*)SvANY(hv);
 

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.17.11-30-gf97f22a

2013-04-29 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/f97f22a31553828b6aaefb7b10b3b57f2f74438a?hp=8b3945e7b7b7ae6fd2369864ebe169bd9a91cf4e

- Log -
commit f97f22a31553828b6aaefb7b10b3b57f2f74438a
Author: Breno G. de Oliveira g...@cpan.org
Date:   Mon Apr 29 02:05:17 2013 -0300

updating README.macosx to reflect current systems.
---

Summary of changes:
 README.macosx |   76 +++-
 1 files changed, 47 insertions(+), 29 deletions(-)

diff --git a/README.macosx b/README.macosx
index 0501b1f..7191352 100644
--- a/README.macosx
+++ b/README.macosx
@@ -10,9 +10,9 @@ perlmacosx - Perl under Mac OS X
 
 This document briefly describes Perl under Mac OS X.
 
-  curl http://www.cpan.org/src/perl-5.12.3.tar.gz  perl-5.12.3.tar.gz 
-  tar -xzf perl-5.12.3.tar.gz 
-  cd perl-5.12.3
+  curl http://www.cpan.org/src/perl-5.18.0.tar.gz  perl-5.18.0.tar.gz
+  tar -xzf perl-5.18.0.tar.gz
+  cd perl-5.18.0
   ./Configure -des -Dprefix=/usr/local/
   make
   make test
@@ -20,13 +20,23 @@ This document briefly describes Perl under Mac OS X.
 
 =head1 DESCRIPTION
 
-The latest Perl release (5.12.3 as of this writing) builds without changes
+The latest Perl release (5.18.0 as of this writing) builds without changes
 under all versions of Mac OS X from 10.3 Panther onwards. 
 
-In order to build your own version of Perl you will need 'make'
-this is part of the Apples developer tools (you only need the 'unix tools'),
-usually supplied with Mac OS install DVDs. You do not need the latest 
-version of Xcode (which is now charged for) in order to install make.
+In order to build your own version of Perl you will need 'make',
+which is part of Apple's developer tools - also known as Xcode. From
+Mac OS X 10.7 Lion onwards, it can be downloaded separately as the
+'Command Line Tools' bundle directly from 
Lhttps://developer.apple.com/downloads/
+(you will need a free account to log in), or as a part of the Xcode suite,
+freely available at the App Store. Xcode is a pretty big app, so
+unless you already have it or really want it, you are advised to get the
+'Command Line Tools' bundle separately from the link above. If you want
+to do it from within Xcode, go to Xcode - Preferences - Downloads and
+select the 'Command Line Tools' option.
+
+Between Mac OS X 10.3 Panther and 10.6 Snow Leopard, the 'Command
+Line Tools' bundle was called 'unix tools', and was usually supplied
+with Mac OS install DVDs.
 
 Earlier Mac OS X releases (10.2 Jaguar and older) did not include a
 completely thread-safe libc, so threading is not fully supported. Also,
@@ -53,9 +63,18 @@ on a file server and used by many Macs.
 
 First, export the path to the SDK into the build environment:
 
-export SDK=/Developer/SDKs/MacOSX10.3.9.sdk
+export 
SDK=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
 
-Use an SDK by exporting some additions to Perl's 'ccflags' and '..flags'
+Please make sure the SDK version (i.e. the numbers right before '.sdk')
+matches your system's (in this case, Mac OS X 10.8 Mountain Lion), as it is
+possible to have more than one SDK installed. Also make sure the path exists
+in your system, and if it doesn't please make sure the SDK is properly
+installed, as it should come with the 'Command Line Tools' bundle mentioned
+above. Finally, if you have an older Mac OS X (10.6 Snow Leopard and below)
+running Xcode 4.2 or lower, the SDK path might be something like
+C'/Developer/SDKs/MacOSX10.3.9.sdk'.
+
+You can use the SDK by exporting some additions to Perl's 'ccflags' and 
'..flags'
 config variables:
 
 ./Configure -Accflags=-nostdinc -B$SDK/usr/include/gcc \
@@ -66,11 +85,18 @@ config variables:
 
 =head2 Universal Binary support
 
-To compile perl as a universal binary (built for both ppc and intel), export
-the SDK variable as above, selecting the 10.4u SDK:
+Note: From Mac OS X 10.6 Snow Leopard onwards, Apple only supports
+Intel-based hardware. This means you can safely skip this section unless
+you have an older Apple computer running on ppc or wish to create a perl
+binary with backwards compatibility.
+
+You can compile perl as a universal binary (built for both ppc and intel).
+In Mac OS X 10.4 Tiger, you must export the 'u' variant of the SDK:
 
 export SDK=/Developer/SDKs/MacOSX10.4u.sdk
 
+Mac OS X 10.5 Leopard and above do not require the 'u' variant.
+
 In addition to the compiler flags used to select the SDK, also add the flags
 for creating a universal binary:
 
@@ -80,12 +106,6 @@ for creating a universal binary:
 -Aldflags=-arch i686 -arch ppc -Wl,-syslibroot,$SDK \
 -de
 
-In Leopard (MacOSX 10.5.6 at the time of this writing) you must use the 10.5 
SDK:
-
-export SDK=/Developer/SDKs/MacOSX10.5.sdk

[perl.git] branch blead, updated. v5.17.11-16-g76073c8

2013-04-23 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/76073c8890e651146559ee560dd616e908c697d0?hp=2ac1dd082a7da7efc20dfaf7b7d4fe145efce0b9

- Log -
commit 76073c8890e651146559ee560dd616e908c697d0
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Apr 23 13:08:43 2013 +0200

Spelling typo in perllocale
---

Summary of changes:
 pod/perllocale.pod |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pod/perllocale.pod b/pod/perllocale.pod
index 052db49..ad8e64b 100644
--- a/pod/perllocale.pod
+++ b/pod/perllocale.pod
@@ -76,7 +76,7 @@ This for the most part is beyond the scope of Perl
 
 =item Category LC_COLLATE: Collation
 
-This indicates the ordering of letters for comparision and sorting.
+This indicates the ordering of letters for comparison and sorting.
 In Latin alphabets, for example, b, generally follows a.
 
 =item Category LC_CTYPE: Character Types

--
Perl5 Master Repository


[perl.git] branch smueller/padsv_nolv, updated. v5.17.9-35-gaf8a8bc

2013-02-27 Thread Rafael Garcia-Suarez
In perl.git, the branch smueller/padsv_nolv has been updated

http://perl5.git.perl.org/perl.git/commitdiff/af8a8bc9ae79d50f98a95af0242701b54721d237?hp=01785aa431268818974b17c7a6bdd1dfe2869696

- Log -
commit af8a8bc9ae79d50f98a95af0242701b54721d237
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Wed Feb 27 12:09:35 2013 +0100

Don't use padsv_nolv in attributed my declarations

When checking the optree constructed for my variables declarations with
attributes, disable the padsv_nolv optimisation that might have been done by
ck_padsv earlier.

I think that another, probably simpler and more efficient, approach to
implement the padsv_nolv optimisation would be to do it directly at optree
construction time, in my_kids() or my_attrs(), instead of doing that
optype-change dance in the ck functions.
---

Summary of changes:
 op.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/op.c b/op.c
index f4859bd..46b535d 100644
--- a/op.c
+++ b/op.c
@@ -8280,6 +8280,11 @@ Perl_ck_spair(pTHX_ OP *o)
type == OP_PADAV || type == OP_PADHV ||
type == OP_RV2AV || type == OP_RV2HV)
return o;
+if (type == OP_PADSV_NOLV) {
+/* revert the work that could have been done by ck_padsv */
+newop-op_type = OP_PADSV;
+newop-op_ppaddr = PL_ppaddr[OP_PADSV];
+}
}
 #ifdef PERL_MAD
op_getmad(kUNOP-op_first,newop,'K');

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.17.9-55-g707b805

2013-02-27 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/707b805eb119df89ce8192e0415768c10dc19501?hp=e3fc134b1ac7f28cea00beac3f3718ea514d9c2b

- Log -
commit 707b805eb119df89ce8192e0415768c10dc19501
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Wed Feb 27 13:52:01 2013 +0100

Note what incrementing the op_type actually does

This comment is intended to improve the greppability of the code.
---

Summary of changes:
 op.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/op.c b/op.c
index 91b9d5d..2b83188 100644
--- a/op.c
+++ b/op.c
@@ -8269,6 +8269,8 @@ Perl_ck_spair(pTHX_ OP *o)
 #endif
kUNOP-op_first = newop;
 }
+/* transforms OP_REFGEN into OP_SREFGEN, OP_CHOP into OP_SCHOP,
+ * and OP_CHOMP into OP_SCHOMP */
 o-op_ppaddr = PL_ppaddr[++o-op_type];
 return ck_fun(o);
 }

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.17.9-9-gac4ec33

2013-02-21 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/ac4ec33ee07ea2ee74672667bd81582062239279?hp=00a1356009c12c2c662b1482d1cb8f3dd2f50bf2

- Log -
commit ac4ec33ee07ea2ee74672667bd81582062239279
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Thu Feb 21 08:35:38 2013 +0100

Upgrade to Safe 2.35 from CPAN
---

Summary of changes:
 dist/Safe/Changes  |8 
 dist/Safe/META.yml |2 +-
 dist/Safe/Safe.pm  |9 +++--
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/dist/Safe/Changes b/dist/Safe/Changes
index 7acc3d5..8cde1db 100644
--- a/dist/Safe/Changes
+++ b/dist/Safe/Changes
@@ -1,3 +1,11 @@
+2.35 Thu Feb 21 2013
+- localize %SIG in the Safe compartment
+- actually check that we call execution methods on a Safe object
+
+2.34
+- Test bug #111462, Safe + %^H + disallowed ops (Father Chrysostomos)
+  cf Perl 5 change 42440e3c68e8bafb7e2a74763360939de0fad6be
+
 2.33 Tue Apr  3 2012
 - Don’t eval code under ‘no strict’ (Father Chrysostomos)
   cf. Perl 5 change 25dc25e774abbe993644899cf4d9f9925a9fb9a8
diff --git a/dist/Safe/META.yml b/dist/Safe/META.yml
index 3e6eb55..bcffb01 100644
--- a/dist/Safe/META.yml
+++ b/dist/Safe/META.yml
@@ -18,4 +18,4 @@ no_index:
 - t
 - inc
 requires: {}
-version: 2.33
+version: 2.35
diff --git a/dist/Safe/Safe.pm b/dist/Safe/Safe.pm
index 46e1e50..f00853e 100644
--- a/dist/Safe/Safe.pm
+++ b/dist/Safe/Safe.pm
@@ -3,7 +3,7 @@ package Safe;
 use 5.003_11;
 use Scalar::Util qw(reftype refaddr);
 
-$Safe::VERSION = 2.34;
+$Safe::VERSION = 2.35;
 
 # *** Don't declare any lexicals above this point ***
 #
@@ -21,7 +21,7 @@ sub lexless_anon_sub {
 # Uses a closure (on $__ExPr__) to pass in the code to be executed.
 # (eval on one line to keep line numbers as expected by caller)
 eval sprintf
-'package %s; %s sub { @_=(); eval q[my $__ExPr__;] . $__ExPr__; }',
+'package %s; %s sub { @_=(); eval q[local *SIG; my $__ExPr__;] . 
$__ExPr__; }',
 $_[0], $_[1] ? 'use strict;' : '';
 }
 
@@ -355,6 +355,8 @@ sub _clean_stash {
 
 sub reval {
 my ($obj, $expr, $strict) = @_;
+die Bad Safe object unless $obj-isa('Safe');
+
 my $root = $obj-{Root};
 
 my $evalsub = lexless_anon_sub($root, $strict, $expr);
@@ -405,6 +407,7 @@ sub _find_code_refs {
 
 sub wrap_code_ref {
 my ($obj, $sub) = @_;
+die Bad safe object unless $obj-isa('Safe');
 
 # wrap code ref $sub with _safe_call_sv so that, when called, the
 # execution will happen with the compartment fully 'in effect'.
@@ -440,6 +443,8 @@ sub wrap_code_ref {
 
 sub rdo {
 my ($obj, $file) = @_;
+die Bad Safe object unless $obj-isa('Safe');
+
 my $root = $obj-{Root};
 
 my $sg = sub_generation();

--
Perl5 Master Repository


[perl.git] branch rgs/Safe, deleted. v5.17.9-7-g3133851

2013-02-21 Thread Rafael Garcia-Suarez
In perl.git, the branch rgs/Safe has been deleted

http://perl5.git.perl.org/perl.git/commitdiff/?hp=3133851f531a0f32a1842d110fd7f7d7804362b1

   was  3133851f531a0f32a1842d110fd7f7d7804362b1

---
3133851f531a0f32a1842d110fd7f7d7804362b1 Upgrade to Safe 2.35 from CPAN
---

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.17.9-10-ge739c65

2013-02-21 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/e739c653b69150d3bbe873918ad5c265e6a421a7?hp=ac4ec33ee07ea2ee74672667bd81582062239279

- Log -
commit e739c653b69150d3bbe873918ad5c265e6a421a7
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Thu Feb 21 14:08:18 2013 +0100

Update Maintainers.pl for Safe 2.35
---

Summary of changes:
 Porting/Maintainers.pl |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 5ede296..0a16c54 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -1611,7 +1611,7 @@ use File::Glob qw(:case);
 
 'Safe' = {
 'MAINTAINER'   = 'rgarcia',
-'DISTRIBUTION' = 'RGARCIA/Safe-2.33.tar.gz',
+'DISTRIBUTION' = 'RGARCIA/Safe-2.35.tar.gz',
 'FILES'= q[dist/Safe],
 'UPSTREAM' = 'blead',
 },

--
Perl5 Master Repository


[perl.git] branch rgs/undeprecate-lex-topic, updated. v5.17.8-201-g92f9c85

2013-02-20 Thread Rafael Garcia-Suarez
In perl.git, the branch rgs/undeprecate-lex-topic has been updated

http://perl5.git.perl.org/perl.git/commitdiff/92f9c85c925c66189d6aa43227d48cd87f69b22c?hp=368a782c95d8be962932affc9e08faf84003eea8

- Log -
commit 92f9c85c925c66189d6aa43227d48cd87f69b22c
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Wed Feb 20 16:58:55 2013 +0100

Perldelta note for undeprecating my $_
---

Summary of changes:
 pod/perldelta.pod |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 4ae25e5..24d52dc 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -61,6 +61,8 @@ This release reverts that change.
 
 =head1 Deprecations
 
+The premature deprecation of lexical $_ in 5.17.7 has been reverted.
+
 =head2 Deprecated pragma
 
 =over

--
Perl5 Master Repository


[perl.git] branch rgs/undeprecate-lex-topic, deleted. v5.17.8-201-g92f9c85

2013-02-20 Thread Rafael Garcia-Suarez
In perl.git, the branch rgs/undeprecate-lex-topic has been deleted

http://perl5.git.perl.org/perl.git/commitdiff/?hp=92f9c85c925c66189d6aa43227d48cd87f69b22c

   was  92f9c85c925c66189d6aa43227d48cd87f69b22c

---
92f9c85c925c66189d6aa43227d48cd87f69b22c Perldelta note for undeprecating my $_
---

--
Perl5 Master Repository


[perl.git] branch dual/Safe, deleted. v5.15.9-72-gd3f461d

2013-02-20 Thread Rafael Garcia-Suarez
In perl.git, the branch dual/Safe has been deleted

http://perl5.git.perl.org/perl.git/commitdiff/?hp=d3f461d309ebce94be1d2a5489ffeba0b70322fe

   was  d3f461d309ebce94be1d2a5489ffeba0b70322fe

---
d3f461d309ebce94be1d2a5489ffeba0b70322fe Fix MANIFEST and release Safe version 
2.33
---

--
Perl5 Master Repository


[perl.git] branch rgs/Safe, created. v5.17.9-7-g3133851

2013-02-20 Thread Rafael Garcia-Suarez
In perl.git, the branch rgs/Safe has been created

http://perl5.git.perl.org/perl.git/commitdiff/3133851f531a0f32a1842d110fd7f7d7804362b1?hp=

at  3133851f531a0f32a1842d110fd7f7d7804362b1 (commit)

- Log -
commit 3133851f531a0f32a1842d110fd7f7d7804362b1
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Thu Feb 21 08:35:38 2013 +0100

Upgrade to Safe 2.35 from CPAN
---

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.17.8-199-g5567318

2013-02-19 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/55673181017b5e113ef58bbb59978319aebbadcb?hp=cff517f58dd82d18e36fcb75e3263c76b73e0f13

- Log -
commit 55673181017b5e113ef58bbb59978319aebbadcb
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Feb 19 09:59:09 2013 +0100

Silence encoding.pm deprecation warnings in the core test suite
---

Summary of changes:
 t/op/tr.t   |1 +
 t/re/pat_advanced.t |1 +
 t/uni/chr.t |1 +
 t/uni/greek.t   |1 +
 t/uni/latin2.t  |1 +
 t/uni/tr_7jis.t |1 +
 t/uni/tr_eucjp.t|1 +
 t/uni/tr_sjis.t |1 +
 t/uni/tr_utf8.t |1 +
 9 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/t/op/tr.t b/t/op/tr.t
index 057be47..53530f2 100644
--- a/t/op/tr.t
+++ b/t/op/tr.t
@@ -512,6 +512,7 @@ SKIP: {
 eval q{ $a ~= tr/a/b/; };
 ok 1;
 SKIP: {
+no warnings deprecated;
 skip no encoding, 1 unless eval { require encoding; 1 };
 eval q{ use encoding utf8; $a ~= tr/a/b/; };
 ok 1;
diff --git a/t/re/pat_advanced.t b/t/re/pat_advanced.t
index 29a64dd..b63491e 100644
--- a/t/re/pat_advanced.t
+++ b/t/re/pat_advanced.t
@@ -1804,6 +1804,7 @@ EOP
   'IsPunct disagrees with [:punct:] outside ASCII');
 
 my @isPunctLatin1 = eval q {
+no warnings 'deprecated';
 use encoding 'latin1';
 grep {/[[:punct:]]/ != /\p{IsPunct}/} map {chr} 0x80 .. 0xff;
 };
diff --git a/t/uni/chr.t b/t/uni/chr.t
index 854d725..9445d32 100644
--- a/t/uni/chr.t
+++ b/t/uni/chr.t
@@ -9,6 +9,7 @@ BEGIN {
 
 use strict;
 plan (tests = 8);
+no warnings 'deprecated';
 use encoding 'johab';
 
 ok(chr(0x7f) eq \x7f);
diff --git a/t/uni/greek.t b/t/uni/greek.t
index 1737a67..5326ab9 100644
--- a/t/uni/greek.t
+++ b/t/uni/greek.t
@@ -9,6 +9,7 @@ BEGIN {
 
 plan tests = 72;
 
+no warnings 'deprecated';
 use encoding greek; # iso 8859-7
 
 # U+0391, \xC1, \301, GREEK CAPITAL LETTER ALPHA
diff --git a/t/uni/latin2.t b/t/uni/latin2.t
index 1527471..6e7d980 100644
--- a/t/uni/latin2.t
+++ b/t/uni/latin2.t
@@ -9,6 +9,7 @@ BEGIN {
 
 plan tests = 94;
 
+no warnings 'deprecated';
 use encoding latin2; # iso 8859-2
 
 # U+00C1, \xC1, \301, LATIN CAPITAL LETTER A WITH ACUTE
diff --git a/t/uni/tr_7jis.t b/t/uni/tr_7jis.t
index 2118070..2108319 100644
--- a/t/uni/tr_7jis.t
+++ b/t/uni/tr_7jis.t
@@ -13,6 +13,7 @@ BEGIN {
 
 use strict;
 plan(tests = 6);
+no warnings 'deprecated';
 use encoding 'iso-2022-jp';
 
 my @hiragana =  map {chr} ord($B$!(B)..ord($B$s(B);
diff --git a/t/uni/tr_eucjp.t b/t/uni/tr_eucjp.t
index 27daf32..a317bb1 100644
--- a/t/uni/tr_eucjp.t
+++ b/t/uni/tr_eucjp.t
@@ -12,6 +12,7 @@ BEGIN {
 
 use strict;
 plan(tests = 6);
+no warnings 'deprecated';
 use encoding 'euc-jp';
 
 my @hiragana =  map {chr} ord(¤¡)..ord(¤ó);
diff --git a/t/uni/tr_sjis.t b/t/uni/tr_sjis.t
index 290dd8c..a82b35c 100644
--- a/t/uni/tr_sjis.t
+++ b/t/uni/tr_sjis.t
@@ -12,6 +12,7 @@ BEGIN {
 
 use strict;
 plan(tests = 6);
+no warnings 'deprecated';
 use encoding 'shiftjis';
 
 my @hiragana =  map {chr} ord(‚Ÿ)..ord(‚ñ);
diff --git a/t/uni/tr_utf8.t b/t/uni/tr_utf8.t
index 25a6753..2a566d9 100644
--- a/t/uni/tr_utf8.t
+++ b/t/uni/tr_utf8.t
@@ -13,6 +13,7 @@ BEGIN {
 
 use strict;
 plan(tests = 8);
+no warnings 'deprecated';
 use encoding 'utf8';
 
 my @hiragana =  map {chr} ord(ぁ)..ord(ん);

--
Perl5 Master Repository


[perl.git] branch rgs/undeprecate-lex-topic, created. v5.17.8-200-g368a782

2013-02-19 Thread Rafael Garcia-Suarez
In perl.git, the branch rgs/undeprecate-lex-topic has been created

http://perl5.git.perl.org/perl.git/commitdiff/368a782c95d8be962932affc9e08faf84003eea8?hp=

at  368a782c95d8be962932affc9e08faf84003eea8 (commit)

- Log -
commit 368a782c95d8be962932affc9e08faf84003eea8
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Feb 19 15:53:10 2013 +0100

Un-deprecate the support for lexical $_
---

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.17.3-233-g681a49b

2012-09-03 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/681a49bfebe715e645e428b1b7cc1976507eb70f?hp=d787f4a5ba95039e3f0b8f63ebc649cde1011c69

- Log -
commit 681a49bfebe715e645e428b1b7cc1976507eb70f
Author: Sebastien Aperghis-Tramoni sa...@cpan.org
Date:   Mon Sep 3 16:36:06 2012 +0200

Upgrade to XSLoader 0.16
---

Summary of changes:
 Porting/Maintainers.pl   |2 +-
 dist/XSLoader/Makefile.PL|   20 ++--
 dist/XSLoader/XSLoader_pm.PL |6 +++---
 3 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 9ab2631..a422184 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -2122,7 +2122,7 @@ use File::Glob qw(:case);
 
 'XSLoader' = {
 'MAINTAINER'   = 'saper',
-'DISTRIBUTION' = 'SAPER/XSLoader-0.15.tar.gz',
+'DISTRIBUTION' = 'SAPER/XSLoader-0.16.tar.gz',
 'FILES'= q[dist/XSLoader],
 'EXCLUDED' = [
 qr{^eg/},
diff --git a/dist/XSLoader/Makefile.PL b/dist/XSLoader/Makefile.PL
index 111d85a..008f602 100644
--- a/dist/XSLoader/Makefile.PL
+++ b/dist/XSLoader/Makefile.PL
@@ -34,17 +34,25 @@ my $installdirs = $]  5.011 ? perl : site;
 
 WriteMakefile(
 NAME= $PACKAGE,
-($ExtUtils::MakeMaker::VERSION  6.30 ?
- (LICENSE   = 'perl',
-  AUTHOR= 'Sebastien Aperghis-Tramoni sebast...@aperghis.net',
-  ABSTRACT_FROM = 'XSLoader_pm.PL',
- ) : ()),
+LICENSE = 'perl',
+AUTHOR  = 'Sebastien Aperghis-Tramoni sebast...@aperghis.net',
 VERSION_FROM= 'XSLoader_pm.PL',
+ABSTRACT_FROM   = 'XSLoader_pm.PL',
 INSTALLDIRS = $installdirs,
 PL_FILES= { 'XSLoader_pm.PL'  = 'XSLoader.pm' },
 PM  = { 'XSLoader.pm' = '$(INST_ARCHLIB)/XSLoader.pm' },
 PREREQ_PM   = {
-'Test::More' = '0.62',
+'Test::More' = '0.47',
+},
+META_MERGE  = {
+resources   = {
+repository  = 'git://perl5.git.perl.org/perl.git',
+license = 'http://dev.perl.org/licenses/',
+homepage= 'https://metacpan.org/module/Math::BigInt',
+irc = 'irc://irc.perl.org/#p5p',
+mailinglist = 'http://lists.perl.org/list/perl5-porters.html',
+bugtracker  = 
https://rt.perl.org/rt3/Search/Results.html?Query=Queue='perl5' AND Content 
LIKE 'module=XSLoader' AND (Status='open' OR Status='new' OR Status='stalled'),
+},
 },
 dist= { COMPRESS = 'gzip -9f', SUFFIX = 'gz', },
 clean   = { FILES = 'XSLoader-* XSLoader.pm' },
diff --git a/dist/XSLoader/XSLoader_pm.PL b/dist/XSLoader/XSLoader_pm.PL
index 98a19ea..fb5707c 100644
--- a/dist/XSLoader/XSLoader_pm.PL
+++ b/dist/XSLoader/XSLoader_pm.PL
@@ -201,7 +201,7 @@ XSLoader - Dynamically load C libraries into Perl code
 
 =head1 VERSION
 
-Version 0.15
+Version 0.16
 
 =head1 SYNOPSIS
 
@@ -257,7 +257,7 @@ If no C$VERSION was specified on the Cbootstrap line, 
the last line becomes
 
 XSLoader::load 'YourPackage';
 
-If the call to Cload is from the YourPackage, then that can be further
+If the call to Cload is from CYourPackage, then that can be further
 simplified to
 
 XSLoader::load();
@@ -289,7 +289,7 @@ Cuse XSLoader by Crequire, so the compiler does not 
know that a function
 CXSLoader::load() is present.
 
 This boilerplate uses the low-overhead CXSLoader if present; if used with
-an antic Perl which has no CXSLoader, it falls back to using CDynaLoader.
+an antique Perl which has no CXSLoader, it falls back to using CDynaLoader.
 
 =head1 Order of initialization: early load()
 

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.17.3-234-ge52529c

2012-09-03 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/e52529ca2472f8f4697aeab0a74a65c9c5189801?hp=681a49bfebe715e645e428b1b7cc1976507eb70f

- Log -
commit e52529ca2472f8f4697aeab0a74a65c9c5189801
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Mon Sep 3 17:39:41 2012 +0200

Make XSLoader's UPSTREAM as undef

The upstream is supposed to be blead, but the CPAN version of
XSLoader 0.16 and the one that has shipped with perl 5.17.3 are
different (doc changes only). The problem (cmp_version.t failing)
should disappear after the next perl release.
---

Summary of changes:
 Porting/Maintainers.pl |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index a422184..a228103 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -2132,7 +2132,8 @@ use File::Glob qw(:case);
 ),
 'XSLoader.pm',# we use XSLoader_pm.PL
 ],
-'UPSTREAM' = 'blead',
+# Revert UPSTREAM to 'blead' after 0.17 is released
+'UPSTREAM' = undef,
 },
 
 's2p' = {

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.16.0-193-g35bb012

2012-05-23 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/35bb012088df9f7586da9a62c90f3dd3ef609cad?hp=3866ea3be51f0998b848d22c4ef960965bda7199

- Log -
commit 35bb012088df9f7586da9a62c90f3dd3ef609cad
Merge: 3866ea3 5f9f83b
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Wed May 23 15:53:31 2012 +0200

Merge branch 'rgs/overload' into blead
---

Summary of changes:
 gv.c |   13 ++---
 lib/overload.t   |2 +-
 lib/unicore/mktables |3 ++-
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/gv.c b/gv.c
index 58025b3..f75b76a 100644
--- a/gv.c
+++ b/gv.c
@@ -2733,9 +2733,16 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, 
int flags)
(cvp = (AMT_AMAGIC((AMT*)mg-mg_ptr)
  ? (amtp = (AMT*)mg-mg_ptr)-table
  : NULL))
-   (cv = cvp[off=method])) { /* Method for right
-* argument found */
-  lr=1;
+   ((cv = cvp[off=method+assignshift])
+  || (assign  amtp-fallback  AMGfallNEVER  /* fallback to
+  * usual 
method */
+  (
+#ifdef DEBUGGING
+   fl = 1,
+#endif
+   cv = cvp[off=method] { /* Method for right
+   * argument found */
+   lr=1;
 } else if (((cvp  amtp-fallback  AMGfallNEVER)
 || (ocvp  oamtp-fallback  AMGfallNEVER))
!(flags  AMGf_unary)) {
diff --git a/lib/overload.t b/lib/overload.t
index 72e3b6e..87845b1 100644
--- a/lib/overload.t
+++ b/lib/overload.t
@@ -202,7 +202,7 @@ is($b, 89);
 is(ref $a, Oscalar);
 is($copies, 1);
 
-eval q[package Oscalar; use overload ('+=' = sub {$ {$_[0]} += 3*$_[1];
+eval q[package Oscalar; use overload ('+=' = sub {$ {$_[0]} += 3*$_[1];
   $_[0] } ) ];
 $c=new Oscalar;# Cause rehash
 
diff --git a/lib/unicore/mktables b/lib/unicore/mktables
index ab029e4..4018e95 100644
--- a/lib/unicore/mktables
+++ b/lib/unicore/mktables
@@ -12882,9 +12882,10 @@ END
 Type = $ENUM,
 Initialize = $age,
 );
+my $q_in = $in;
 $in-add_comment(join_lines(END
 THIS FILE SHOULD NOT BE USED FOR ANY PURPOSE.  The values in this file are the
-same as for $age, and not for what $in really means.  This is because anything
+same as for $age, and not for what $q_in really means.  This is because 
anything
 defined in a given release should have multiple values: that release and all
 higher ones.  But only one value per code point can be represented in a table
 like this.

--
Perl5 Master Repository


[perl.git] branch rgs/overload, deleted. v5.16.0-150-g5f9f83b

2012-05-23 Thread Rafael Garcia-Suarez
In perl.git, the branch rgs/overload has been deleted

http://perl5.git.perl.org/perl.git/commitdiff/?hp=5f9f83be9cdcd54449f7f40db078fe367d780475

   was  5f9f83be9cdcd54449f7f40db078fe367d780475

---
5f9f83be9cdcd54449f7f40db078fe367d780475 Fix mktables bug due to the previous 
overload fix
---

--
Perl5 Master Repository


[perl.git] branch rgs/overload, deleted. v5.15.8-183-g809f751

2012-05-22 Thread Rafael Garcia-Suarez
In perl.git, the branch rgs/overload has been deleted

http://perl5.git.perl.org/perl.git/commitdiff/?hp=809f751e6a79849f8fa71568def987da0addbe27

   was  809f751e6a79849f8fa71568def987da0addbe27

---
809f751e6a79849f8fa71568def987da0addbe27 Lookup overloaded assignment operators 
when trying to swap the arguments
---

--
Perl5 Master Repository


[perl.git] branch rgs/overload, created. v5.16.0-149-gf041cf0

2012-05-22 Thread Rafael Garcia-Suarez
In perl.git, the branch rgs/overload has been created

http://perl5.git.perl.org/perl.git/commitdiff/f041cf0f9c6469c41de8b73d5f7b426710c3ff8b?hp=

at  f041cf0f9c6469c41de8b73d5f7b426710c3ff8b (commit)

- Log -
commit f041cf0f9c6469c41de8b73d5f7b426710c3ff8b
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Mar 20 09:17:02 2012 +0100

Lookup overloaded assignment operators when trying to swap the arguments

This is in the case where we search for an overloaded operator when
passing the AMGf_assign flag (we're executing an assignment operator
like +=).

At the very beginning of Perl_amagic_call, if the flag AMGf_noleft is
not passed, we first try to look up the overload method corresponding
to the assignment operator, then the normal one if fallback is
authorized. However, if this fails, when trying later to find
overload magic with the arguments swapped (if AMGf_noright is not
passed), this procedure was not used and we looked up directly the base
operation from which the assignment operator might be derived.
As a consequence of what an operator like += might have looked
autogenerated even when fallback=0 was passed.

This change only necessitates a minor adjustment in lib/overload.t,
where an overloaded += method wasn't corresponding semantically to the
overloaded + method of the same class, which can be seen as a
pathological case.
---

--
Perl5 Master Repository


[perl.git] branch rgs/overload, updated. v5.16.0-150-g5f9f83b

2012-05-22 Thread Rafael Garcia-Suarez
In perl.git, the branch rgs/overload has been updated

http://perl5.git.perl.org/perl.git/commitdiff/5f9f83be9cdcd54449f7f40db078fe367d780475?hp=f041cf0f9c6469c41de8b73d5f7b426710c3ff8b

- Log -
commit 5f9f83be9cdcd54449f7f40db078fe367d780475
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue May 22 17:23:20 2012 +0200

Fix mktables bug due to the previous overload fix

Due to the previous patch, perl can't generate the operator for .= in
package Property anymore (because fallback is '0' in that package), so
we need to work around that; this patch implements the least intrusive
workaround possible.
---

Summary of changes:
 lib/unicore/mktables |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/unicore/mktables b/lib/unicore/mktables
index b4d980b..3ad7a48 100644
--- a/lib/unicore/mktables
+++ b/lib/unicore/mktables
@@ -12881,9 +12881,10 @@ END
 Type = $ENUM,
 Initialize = $age,
 );
+my $q_in = $in;
 $in-add_comment(join_lines(END
 THIS FILE SHOULD NOT BE USED FOR ANY PURPOSE.  The values in this file are the
-same as for $age, and not for what $in really means.  This is because anything
+same as for $age, and not for what $q_in really means.  This is because 
anything
 defined in a given release should have multiple values: that release and all
 higher ones.  But only one value per code point can be represented in a table
 like this.

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.15.9-219-g16f6a27

2012-04-24 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/16f6a273412ea24870f58e8b808cc3359e20abce?hp=581af396908352663eb714834fb9f9ce3936d673

- Log -
commit 16f6a273412ea24870f58e8b808cc3359e20abce
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Apr 24 09:41:31 2012 +0200

perldelta: Fix an internal POD link
---

Summary of changes:
 Porting/perl5160delta.pod |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Porting/perl5160delta.pod b/Porting/perl5160delta.pod
index 2f6e09c..c3746bf 100644
--- a/Porting/perl5160delta.pod
+++ b/Porting/perl5160delta.pod
@@ -117,7 +117,7 @@ lvalue will always extend to the end of the string, even if 
the string
 becomes longer.
 
 Since this change also allowed many bugs to be fixed (see
-L/Fixes to the Csubstr operator), and since the behaviour
+L/The Csubstr operator), and since the behaviour
 of negative offsets has never been specified, so the
 change was deemed acceptable.
 

--
Perl5 Master Repository


[perl.git] branch dual/Safe, updated. v5.15.9-72-gd3f461d

2012-04-03 Thread Rafael Garcia-Suarez
In perl.git, the branch dual/Safe has been updated

http://perl5.git.perl.org/perl.git/commitdiff/d3f461d309ebce94be1d2a5489ffeba0b70322fe?hp=2c9ec40e3923bc3222014f8549ec33543a583a2e

- Log -
commit d3f461d309ebce94be1d2a5489ffeba0b70322fe
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Apr 3 08:41:29 2012 +0200

Fix MANIFEST and release Safe version 2.33

M   dist/Safe/Changes
M   dist/Safe/MANIFEST
M   dist/Safe/Safe.pm

commit 7ec8d481ac36c9219cf1e7b69c1c488d68cafc4e
Merge: 2c9ec40 65ae636
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Apr 3 08:33:01 2012 +0200

Merge branch 'blead' into dual/Safe

Conflicts:
dist/Safe/t/safeload.t
---

Summary of changes:
 Configure  |   49 +--
 Porting/Glossary   |5 
 Porting/pod_lib.pl |   10 +++-
 dist/Safe/Changes  |4 +++
 dist/Safe/MANIFEST |1 +
 dist/Safe/Safe.pm  |8 +++---
 dist/Safe/t/safeload.t |9 +++-
 dist/Safe/t/safeops.t  |   23 +++--
 hints/netbsd.sh|2 +-
 uconfig.h  |2 +-
 uconfig.sh |1 +
 11 files changed, 91 insertions(+), 23 deletions(-)

diff --git a/Configure b/Configure
index f87e6fd..fdbbf20 100755
--- a/Configure
+++ b/Configure
@@ -28,7 +28,7 @@
 # See Porting/pumpkin.pod for more information on metaconfig.
 #
 
-# Generated on Thu Feb 16 16:57:30 CET 2012 [metaconfig 3.5 PL0]
+# Generated on Sun Apr  1 12:00:35 CEST 2012 [metaconfig 3.5 PL0]
 # (with additional metaconfig patches by perl...@perl.org)
 
 cat c1$$ EOF
@@ -843,6 +843,7 @@ cccdlflags=''
 ccdlflags=''
 dlsrc=''
 ld=''
+ld_can_script=''
 lddlflags=''
 usedl=''
 doublesize=''
@@ -7945,8 +7946,9 @@ Some systems use ld to create libraries that can be 
dynamically loaded,
 while other systems (such as those using ELF) use $cc.
 
 EOM
-   case $ld in
-   '') $cat try.c EOM
+
+: Determine if this is ELF
+   $cat try.c EOM
 /* Test for whether ELF binaries are produced */
 #include fcntl.h
 #$i_stdlib I_STDLIB
@@ -7963,22 +7965,26 @@ int main() {
if(i == -1)
exit(1); /* fail */
if(read(i,b,4)==4  b[0]==127  b[1]=='E'  b[2]=='L'  b[3]=='F')
-   exit(0); /* succeed (yes, it's ELF) */
+   exit(0); /* succeed (yes, it is ELF) */
else
exit(1); /* fail */
 }
 EOM
-   if $cc $ccflags $ldflags try.c /dev/null 21  $run ./a.out; 
then
+   if $cc $ccflags $ldflags try.c /dev/null 21  $run ./a.out; then
+   bin_ELF=$define
+   fi
+   $rm_try
+
+   case $ld in
+   '') if $test $bin_ELF = $define; then
cat EOM
 You appear to have ELF support.  I'll use $cc to build dynamic libraries.
 EOM
dflt=$cc
-   bin_ELF=$define
else
echo I'll use ld to build dynamic libraries.
dflt='ld'
fi
-   $rm_try
;;
*)  dflt=$ld
;;
@@ -8085,6 +8091,34 @@ EOM
 ;;
 esac
 
+ld_can_script=$undef
+case $bin_ELF$usedl in
+$define$define)
+# Abuse try.h and a.out names for neat cleanup
+$cat try.c EOM
+void foo() {}
+void bar() {}
+EOM
+$cat try.h EOM
+LIBTEST_42 {
+ global:
+  foo;
+ local: *;
+ };
+EOM
+if $cc $cccdlflags $ccdlflags $ccflags \
+   $ldflags $lddlflags -o a.out try.c \
+   -Wl,--version-script=try.h /dev/null 21 \
+ $test -s a.out ; then
+   echo ld supports scripting 4
+   ld_can_script=$define
+else
+   echo ld does not support scripting 4
+fi
+$rm_try
+;;
+esac
+
 : Do we want a shared libperl?
 also=''
 case $usedl in
@@ -23471,6 +23505,7 @@ ivtype='$ivtype'
 known_extensions='$known_extensions'
 ksh='$ksh'
 ld='$ld'
+ld_can_script='$ld_can_script'
 lddlflags='$lddlflags'
 ldflags='$ldflags'
 ldflags_uselargefiles='$ldflags_uselargefiles'
diff --git a/Porting/Glossary b/Porting/Glossary
index e42d750..23ffbfe 100644
--- a/Porting/Glossary
+++ b/Porting/Glossary
@@ -3619,6 +3619,11 @@ ld (dlsrc.U):
On ELF systems, it should be $cc.  Mostly, we'll try to respect
the hint file setting.
 
+ld_can_script (dlsrc.U):
+   This variable shows if the loader accepts scripts in the form of
+   -Wl,--version-script=ld.script. This is currently only supported
+   for GNU ld on ELF in dynamic loading builds.
+
 lddlflags (dlsrc.U):
This variable contains any special flags that might need to be
passed to $ld to create a shared library suitable for dynamic
diff --git a/Porting/pod_lib.pl b/Porting/pod_lib.pl
index 98c32f4..b257c66 100644
--- a/Porting/pod_lib.pl
+++ b/Porting/pod_lib.pl
@@ -248,11 +248,9 @@ sub

[perl.git] branch blead, updated. v5.15.9-55-g69f0857

2012-03-31 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/69f0857ceb3d6c587ce864cec2bf48cc666426c7?hp=39e518fd0507d74dbc0c77604a10ed01af505ee5

- Log -
commit 69f0857ceb3d6c587ce864cec2bf48cc666426c7
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Sat Mar 31 10:55:12 2012 +0200

Typo fix in the list of maintainers

M   Porting/Maintainers.pl

commit 3364991097dafedb70f6e6a832cbc6fb01991dc7
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Sat Mar 31 10:54:51 2012 +0200

Show maintainer name in corecpan output

M   Porting/corecpan.pl
---

Summary of changes:
 Porting/Maintainers.pl |2 +-
 Porting/corecpan.pl|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 16dba1f..905215b 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -192,7 +192,7 @@ use File::Glob qw(:case);
 %Modules = (
 
 'AnyDBM_File' = {
-'MAINTAINERS' = 'p5p',
+'MAINTAINER'  = 'p5p',
 'FILES'   = q[lib/AnyDBM_File.{pm,t}],
 'UPSTREAM'= 'blead',
 },
diff --git a/Porting/corecpan.pl b/Porting/corecpan.pl
index 41778c1..3a38d11 100755
--- a/Porting/corecpan.pl
+++ b/Porting/corecpan.pl
@@ -159,7 +159,7 @@ else {
for my $file (sort keys %{$results{$dist}}) {
my ($vcore, $vcpan) = @{$results{$dist}{$file}}{@labels};
if (our $opt_v or $vcore ne $vcpan) {
-   print \n$dist:\n unless ($distname_printed++);
+   print \n$dist ($Modules{$dist}{MAINTAINER}):\n unless 
($distname_printed++);
print \t$file: core=$vcore, cpan=$vcpan\n;
}
}

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.15.9-56-g2e77690

2012-03-31 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/2e7769021bc2a280a4de2b75287a35f775694e1b?hp=69f0857ceb3d6c587ce864cec2bf48cc666426c7

- Log -
commit 2e7769021bc2a280a4de2b75287a35f775694e1b
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Sat Mar 31 11:27:05 2012 +0200

Adjust skip condition of tests for fields.pm to cover 5.14.*

and improve diagnostics
---

Summary of changes:
 dist/base/t/fields.t |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dist/base/t/fields.t b/dist/base/t/fields.t
index 87c6ccc..df5834d 100644
--- a/dist/base/t/fields.t
+++ b/dist/base/t/fields.t
@@ -108,10 +108,10 @@ package main;
 ok(exists $x-{b}, 'x has b');
 
 SKIP: {
-skip These tests trigger a perl bug, 2 if $]  5.014001;
+skip These tests trigger a perl bug, 2 if $]  5.015;
 $x-{a} = __PACKAGE__;
-ok eval { delete $x-{a}; 1 }, 'deleting COW values';
+ok eval { delete $x-{a}; 1 }, 'deleting COW values' or diag $@;
 $x-{a} = __PACKAGE__;
-ok eval { %$x = (); 1 }, 'clearing a restr hash containing COWs';
+ok eval { %$x = (); 1 }, 'clearing a restr hash containing COWs' or 
diag $@;
 }
 }

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.15.9-58-ge5b1b4c

2012-03-31 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/e5b1b4c7972a112957188e0797f82e5d54943bcb?hp=2e7769021bc2a280a4de2b75287a35f775694e1b

- Log -
commit e5b1b4c7972a112957188e0797f82e5d54943bcb
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Sat Mar 31 12:11:51 2012 +0200

Update base.pm's Changes file from the perldeltas

M   dist/base/Changes

commit 472677c4357628ecc5fa6d5341c43f6f165cc639
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Sat Mar 31 12:10:36 2012 +0200

Remove test for a functionality that was removed

(this wasn't found earlier because this test file is only
run with perls = 5.8.x)

M   dist/base/t/fields-5_8_0.t
---

Summary of changes:
 dist/base/Changes  |7 +++
 dist/base/t/fields-5_8_0.t |   15 +--
 2 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/dist/base/Changes b/dist/base/Changes
index 0a25aa3..b24ba05 100644
--- a/dist/base/Changes
+++ b/dist/base/Changes
@@ -1,3 +1,10 @@
+2.18
+- Backport from bleadperl before 5.16.0 release
+- base no longer sets a module's $VERSION to -1 when a module it
+  loads does not define a $VERSION.
+- base no longer internally skips loading modules it has already
+  loaded and instead relies on require to inspect %INC.
+
 2.15
 - Bump version to 2.15 so base and fields have the same version again
 
diff --git a/dist/base/t/fields-5_8_0.t b/dist/base/t/fields-5_8_0.t
index 2da1412..9abab94 100644
--- a/dist/base/t/fields-5_8_0.t
+++ b/dist/base/t/fields-5_8_0.t
@@ -100,7 +100,7 @@ my %expect = (
 'Foo::Bar::Baz' = 'b1:1,b2:2,b3:3,foo:4,bar:5,baz:6',
 );
 
-print 1.., int(keys %expect)+21, \n;
+print 1.., int(keys %expect)+20, \n;
 my $testno = 0;
 while (my($class, $exp) = each %expect) {
no strict 'refs';
@@ -187,19 +187,6 @@ print ok , ++$testno, \n;
 print $a-{bar}-{A}, \n;
 }
 
-
-# Test $VERSION bug
-package No::Version;
-
-use vars qw($Foo);
-sub VERSION { 42 }
-
-package Test::Version;
-
-use base qw(No::Version);
-print # $No::Version::VERSION\nnot  unless $No::Version::VERSION =~ /set by 
base\.pm/;
-print ok , ++$testno ,\n;
-
 # Test Inverse of $VERSION bug base.pm should not clobber existing $VERSION
 package Has::Version;
 

--
Perl5 Master Repository


[perl.git] branch dual/Safe, updated. v5.15.9-61-g312434d

2012-03-31 Thread Rafael Garcia-Suarez
In perl.git, the branch dual/Safe has been updated

http://perl5.git.perl.org/perl.git/commitdiff/312434d200ea2a8487b21594aeb6c13838c42b0b?hp=a49e8abf3f8e4ce0620ae23a4ef9875a6a2fe720

- Log -
commit 312434d200ea2a8487b21594aeb6c13838c42b0b
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Sat Mar 31 16:15:21 2012 +0200

Make Safe play nice with Devel::Cover
---

Summary of changes:
 dist/Safe/Safe.pm |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dist/Safe/Safe.pm b/dist/Safe/Safe.pm
index 9335dc6..5aa2f6e 100644
--- a/dist/Safe/Safe.pm
+++ b/dist/Safe/Safe.pm
@@ -140,6 +140,9 @@ my $default_share = [qw[
 Tie::Hash::NamedCapture::SCALAR
 Tie::Hash::NamedCapture::flags
 ])];
+if (defined $Devel::Cover::VERSION) {
+push @$default_share, 'Devel::Cover::use_file';
+}
 
 sub new {
 my($class, $root, $mask) = @_;

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.15.9-59-g258f564

2012-03-31 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/258f564231885d20cd3b29a014dda4c79b44b1b0?hp=e5b1b4c7972a112957188e0797f82e5d54943bcb

- Log -
commit 258f564231885d20cd3b29a014dda4c79b44b1b0
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Sat Mar 31 16:16:09 2012 +0200

Add perltodo in the list of ignored pods

(like the other obsolete manpage placeholders)
---

Summary of changes:
 Porting/pod_lib.pl |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Porting/pod_lib.pl b/Porting/pod_lib.pl
index 98c32f4..945e61c 100644
--- a/Porting/pod_lib.pl
+++ b/Porting/pod_lib.pl
@@ -252,7 +252,7 @@ sub get_pod_metadata {
 # in perl.pod, they just exist so that if someone types perldoc perltoot
 # they get some sort of pointer to the new docs.
 my %ignoredpods
-= map { ( $_.pod = 1 ) } qw( perlboot perlbot perltooc perltoot );
+= map { ( $_.pod = 1 ) } qw( perlboot perlbot perltodo perltooc 
perltoot );
 
 # Convert these to a list of filenames.
 ++$our_pods{$_.pod} foreach keys %{$state{pods}};

--
Perl5 Master Repository


[perl.git] branch book/perlsecret, updated. v5.15.9-63-gb590b68

2012-03-31 Thread Rafael Garcia-Suarez
In perl.git, the branch book/perlsecret has been updated

http://perl5.git.perl.org/perl.git/commitdiff/b590b68d8540cf4da30364ac213ff720308d8798?hp=1891d0d8b6142275dda5ad7dd5d2d5d7f6de209f

- Log -
commit b590b68d8540cf4da30364ac213ff720308d8798
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Sat Mar 31 17:10:33 2012 +0200

Insert ignored PODs in MANIFEST

and regenerate pod lists
---

Summary of changes:
 MANIFEST   |2 +-
 Porting/pod_lib.pl |4 
 win32/pod.mak  |4 
 3 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/MANIFEST b/MANIFEST
index db8d35a..7ef2458 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -4734,7 +4734,7 @@ pod/perlreref.pod Perl regular expressions quick 
reference
 pod/perlretut.pod  Perl regular expressions tutorial
 pod/perlrun.podPerl execution and options
 pod/perlsec.podPerl security
-pod/perlsecret.pod Perl secret operators
+pod/perlsecret.pod The perlsecret manpage
 pod/perlsource.pod Guide to the Perl source tree
 pod/perlstyle.pod  Perl style guide
 pod/perlsub.podPerl subroutines
diff --git a/Porting/pod_lib.pl b/Porting/pod_lib.pl
index f4e09d6..e82e203 100644
--- a/Porting/pod_lib.pl
+++ b/Porting/pod_lib.pl
@@ -296,6 +296,10 @@ sub get_pod_metadata {
 }
 
 my @inconsistent;
+foreach (keys %ignoredpods) {
+s/\.pod$//;
+$state{pods}{$_} = The $_ manpage;
+}
 foreach my $i (sort keys %disk_pods) {
 push @inconsistent, $0: $i exists but is unknown by buildtoc\n
 unless $our_pods{$i} || $ignoredpods{$i};
diff --git a/win32/pod.mak b/win32/pod.mak
index 4ef661b..d7e22e5 100644
--- a/win32/pod.mak
+++ b/win32/pod.mak
@@ -121,6 +121,7 @@ POD = perl.pod  \
perlretut.pod   \
perlrun.pod \
perlsec.pod \
+   perlsecret.pod  \
perlsource.pod  \
perlstyle.pod   \
perlsub.pod \
@@ -249,6 +250,7 @@ MAN = perl.man  \
perlretut.man   \
perlrun.man \
perlsec.man \
+   perlsecret.man  \
perlsource.man  \
perlstyle.man   \
perlsub.man \
@@ -377,6 +379,7 @@ HTML = perl.html\
perlretut.html  \
perlrun.html\
perlsec.html\
+   perlsecret.html \
perlsource.html \
perlstyle.html  \
perlsub.html\
@@ -505,6 +508,7 @@ TEX = perl.tex  \
perlretut.tex   \
perlrun.tex \
perlsec.tex \
+   perlsecret.tex  \
perlsource.tex  \
perlstyle.tex   \
perlsub.tex \

--
Perl5 Master Repository


[perl.git] branch dual/Safe, updated. v5.15.9-62-g2c9ec40

2012-03-31 Thread Rafael Garcia-Suarez
In perl.git, the branch dual/Safe has been updated

http://perl5.git.perl.org/perl.git/commitdiff/2c9ec40e3923bc3222014f8549ec33543a583a2e?hp=312434d200ea2a8487b21594aeb6c13838c42b0b

- Log -
commit 2c9ec40e3923bc3222014f8549ec33543a583a2e
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Sat Mar 31 17:23:15 2012 +0200

Release version 2.32 of Safe
---

Summary of changes:
 dist/Safe/Changes |3 +++
 dist/Safe/Safe.pm |2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dist/Safe/Changes b/dist/Safe/Changes
index 593049c..55c22d9 100644
--- a/dist/Safe/Changes
+++ b/dist/Safe/Changes
@@ -1,3 +1,6 @@
+2.32 Sat Mar 31 2012
+- Make Safe play nice with Devel::Cover
+
 2.31 Fri Jan 20 2012
 - Now need to use code points above 255 to get SWASHNEW to load
 
diff --git a/dist/Safe/Safe.pm b/dist/Safe/Safe.pm
index 5aa2f6e..97654cb 100644
--- a/dist/Safe/Safe.pm
+++ b/dist/Safe/Safe.pm
@@ -4,7 +4,7 @@ use 5.003_11;
 use strict;
 use Scalar::Util qw(reftype refaddr);
 
-$Safe::VERSION = 2.31;
+$Safe::VERSION = 2.32;
 
 # *** Don't declare any lexicals above this point ***
 #

--
Perl5 Master Repository


[perl.git] branch rgs/overload, created. v5.15.8-183-g809f751

2012-03-20 Thread Rafael Garcia-Suarez
In perl.git, the branch rgs/overload has been created

http://perl5.git.perl.org/perl.git/commitdiff/809f751e6a79849f8fa71568def987da0addbe27?hp=

at  809f751e6a79849f8fa71568def987da0addbe27 (commit)

- Log -
commit 809f751e6a79849f8fa71568def987da0addbe27
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Mar 20 09:17:02 2012 +0100

Lookup overloaded assignment operators when trying to swap the arguments

This is in the case where we search for an overloaded operator when
passing the AMGf_assign flag (we're executing an assignment operator
like +=).

At the very beginning of Perl_amagic_call, if the flag AMGf_noleft is
not passed, we first try to look up the overload method corresponding
to the assignment operator, then the normal one if fallback is
authorized. However, if this fails, when trying later to find
overload magic with the arguments swapped (if AMGf_noright is not
passed), this procedure was not used and we looked up directly the base
operation from which the assignment operator might be derived.
As a consequence of what an operator like += might have looked
autogenerated even when fallback=0 was passed.

This change only necessitates a minor adjustment in lib/overload.t,
where an overloaded += method wasn't corresponding semantically to the
overloaded + method of the same class, which can be seen as a
pathological case.
---

--
Perl5 Master Repository


[perl.git] branch rjbs/unicook, updated. v5.15.8-79-ge699a22

2012-03-09 Thread Rafael Garcia-Suarez
In perl.git, the branch rjbs/unicook has been updated

http://perl5.git.perl.org/perl.git/commitdiff/e699a22ba2971f0871b9143cbf32a3f024db01de?hp=c6babdd817eec74a65d8454a798b8265b517d73a

- Log -
commit e699a22ba2971f0871b9143cbf32a3f024db01de
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Thu Mar 8 19:31:47 2012 +0100

Fixes for a few trivial typos
---

Summary of changes:
 pod/perlunicook.pod |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/pod/perlunicook.pod b/pod/perlunicook.pod
index 4196347..ddd6b68 100644
--- a/pod/perlunicook.pod
+++ b/pod/perlunicook.pod
@@ -50,7 +50,7 @@ Always decompose on the way in, then recompose on the way out.
 
 =head2 ℞ 2: Fine-tuning Unicode warnings
 
-As of v5.14, Perl distinguishes three sublasses of UTF‑8 warnings.
+As of v5.14, Perl distinguishes three subclasses of UTF‑8 warnings.
 
  use v5.14;  # subwarnings unavailable any earlier
  no warnings nonchar;  # the 66 forbidden non-characters
@@ -273,7 +273,7 @@ call Cbinmode explicitly:
 
 =head2 ℞ 17: Make file I/O default to utf8
 
-Files opened without an encoding arugment will be in UTF-8:
+Files opened without an encoding argument will be in UTF-8:
 
  $ perl -CD ...
  or
@@ -533,7 +533,7 @@ use the UCA for sorting text.
  my @list = $col-sort(@old_list);
 
 See the Iucsort program from the LUnicode::Tussle CPAN module
-for a conveninent command-line interface to this module.
+for a convenient command-line interface to this module.
 
 =head2 ℞ 36: Case- Iand accent-insensitive Unicode sort
 
@@ -852,7 +852,7 @@ spindle, and mutilate any of the examples in this manpage 
however you please
 for inclusion into your own programs without any encumbrance whatsoever.
 Acknowledgement via code comment is polite but not required.
 
-=head1 REVISON HISTORY
+=head1 REVISION HISTORY
 
 v1.0.0 – first public release, 2012-02-27
 

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.15.7-280-g2f1fe8a

2012-02-06 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/2f1fe8a307fbb12ecf2c3255caeec84ea9e56ce7?hp=8c72d15656ec9706955ec6a368ddeb493db7cc58

- Log -
commit 2f1fe8a307fbb12ecf2c3255caeec84ea9e56ce7
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Mon Feb 6 10:05:00 2012 +0100

Document the special meaning of indir on the shebang line
---

Summary of changes:
 pod/perlrun.pod |   11 ++-
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/pod/perlrun.pod b/pod/perlrun.pod
index 22f50cc..6ddc608 100644
--- a/pod/perlrun.pod
+++ b/pod/perlrun.pod
@@ -93,11 +93,12 @@ getting whatever version is first in the user's path.  If 
you want
 a specific version of Perl, say, perl5.005_57, you should place
 that directly in the C#! line's path.
 
-If the C#! line does not contain the word perl, the program named after
-the C#! is executed instead of the Perl interpreter.  This is slightly
-bizarre, but it helps people on machines that don't do C#!, because they
-can tell a program that their SHELL is F/usr/bin/perl, and Perl will then
-dispatch the program to the correct interpreter for them.
+If the C#! line does not contain the word perl nor the word indir
+the program named after the C#! is executed instead of the Perl
+interpreter.  This is slightly bizarre, but it helps people on machines
+that don't do C#!, because they can tell a program that their SHELL is
+F/usr/bin/perl, and Perl will then dispatch the program to the correct
+interpreter for them.
 
 After locating your program, Perl compiles the entire program to an
 internal form.  If there are any compilation errors, execution of the

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.15.7-92-g34daab0

2012-01-27 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/34daab0fa047b2849547189ae5f48b276658af01?hp=69a8a234c3a2ac32565c2a341127dbd2cbf56025

- Log -
commit 34daab0fa047b2849547189ae5f48b276658af01
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Fri Jan 27 10:23:12 2012 +0100

Allow prototypes (_@) and (_%)

Those will be equivalent to (_;@) and (_;%) ; since perlsub already
states that the semicolon is redundant before @ and % this is in
line with the existing documentation.

M   op.c
M   pod/perlsub.pod
M   t/comp/uproto.t
M   toke.c

commit cc2cb33e7c6571bb162ba54eeb5765e0edcd76d1
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Fri Jan 27 09:59:54 2012 +0100

Show test names in output

M   t/comp/uproto.t
---

Summary of changes:
 op.c|2 +-
 pod/perlsub.pod |6 +++---
 t/comp/uproto.t |   27 +--
 toke.c  |2 +-
 4 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/op.c b/op.c
index 30cc7f8..479d2ba 100644
--- a/op.c
+++ b/op.c
@@ -9145,7 +9145,7 @@ Perl_ck_entersub_args_proto(pTHX_ OP *entersubop, GV 
*namegv, SV *protosv)
continue;
case '_':
/* _ must be at the end */
-   if (proto[1]  proto[1] != ';')
+   if (proto[1]  !strchr(;@%, proto[1]))
goto oops;
case '$':
proto++;
diff --git a/pod/perlsub.pod b/pod/perlsub.pod
index 1add95f..9d6fd25 100644
--- a/pod/perlsub.pod
+++ b/pod/perlsub.pod
@@ -1136,9 +1136,9 @@ is of an acceptable type.
 A semicolon (C;) separates mandatory arguments from optional arguments.
 It is redundant before C@ or C%, which gobble up everything else.
 
-As the last character of a prototype, or just before a semicolon, you can
-use C_ in place of C$: if this argument is not provided, C$_ will be
-used instead.
+As the last character of a prototype, or just before a semicolon, a C@
+or a C%, you can use C_ in place of C$: if this argument is not
+provided, C$_ will be used instead.
 
 Note how the last three examples in the table above are treated
 specially by the parser.  Cmygrep() is parsed as a true list
diff --git a/t/comp/uproto.t b/t/comp/uproto.t
index 6d251da..d3ad19f 100644
--- a/t/comp/uproto.t
+++ b/t/comp/uproto.t
@@ -1,6 +1,6 @@
 #!perl
 
-print 1..39\n;
+print 1..43\n;
 my $test = 0;
 
 sub failed {
@@ -19,10 +19,10 @@ sub failed {
 }
 
 sub like {
-my ($got, $pattern) = @_;
+my ($got, $pattern, $name) = @_;
 $test = $test + 1;
 if (defined $got  $got =~ $pattern) {
-   print ok $test\n;
+   print ok $test - $name\n;
# Principle of least surprise - maintain the expected interface, even
# though we aren't using it here (yet).
return 1;
@@ -31,17 +31,17 @@ sub like {
 }
 
 sub is {
-my ($got, $expect) = @_;
+my ($got, $expect, $name) = @_;
 $test = $test + 1;
 if (defined $expect) {
if (defined $got  $got eq $expect) {
-   print ok $test\n;
+   print ok $test - $name\n;
return 1;
}
failed($got, '$expect', $name);
 } else {
if (!defined $got) {
-   print ok $test\n;
+   print ok $test - $name\n;
return 1;
}
failed($got, 'undef', $name);
@@ -120,6 +120,21 @@ $expected = $_ = mydir; mymkdir();
 mymkdir($expected = foo);
 $expected = foo 493; mymkdir foo = 0755;
 
+sub mylist (_@) { is(@_, $expected, mylist) }
+$expected = foo;
+$_ = foo;
+mylist();
+$expected = 10 11 12 13;
+mylist(10, 11 .. 13);
+
+sub mylist2 (_%) { is(@_, $expected, mylist2) }
+$expected = foo;
+$_ = foo;
+mylist2();
+$expected = 10 a 1;
+my %hash = (a = 1);
+mylist2(10, %hash);
+
 # $_ says modifiable, it's not passed by copy
 
 sub double(_) { $_[0] *= 2 }
diff --git a/toke.c b/toke.c
index baa21d6..7893eb4 100644
--- a/toke.c
+++ b/toke.c
@@ -8150,7 +8150,7 @@ Perl_yylex(pTHX)
}
else {
if ( underscore ) {
-   if ( *p != ';' )
+   if ( !strchr(;@%, *p) )
bad_proto = TRUE;
underscore = FALSE;
}

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.15.7-76-g919f76a

2012-01-25 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/919f76a3449f063cc80397cca2b402c89b2e5f07?hp=803e389cdb9c1254934c107b0dcddbfd9821cd0a

- Log -
commit 919f76a3449f063cc80397cca2b402c89b2e5f07
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Wed Jan 25 11:41:13 2012 +0100

Make the display of the warning Useless use of a constant (%s) more robust

If the constant is a string (POK), we dump it using pv_pretty, to
properly escape non-printable characters. This also improves detection
of utf-8 encoding in the constant to be printed. Also, this patch
streamlines the tests for the type and value of that constant.

Potential backwards-compatibility issues : if the constant is a string
it will now be enclosed in double quotes, like this :
Useless use of a constant (a) in void context
instead of
Useless use of a constant (a) in void context
---

Summary of changes:
 op.c |   25 +
 t/lib/warnings/op|   12 +++-
 t/lib/warnings/perly |   26 +-
 3 files changed, 37 insertions(+), 26 deletions(-)

diff --git a/op.c b/op.c
index 3af6ee7..e31f742 100644
--- a/op.c
+++ b/op.c
@@ -1167,14 +1167,6 @@ Perl_scalarvoid(pTHX_ OP *o)
no_bareword_allowed(o);
else {
if (ckWARN(WARN_VOID)) {
-   if (SvOK(sv)) {
-   SV* msv = sv_2mortal(Perl_newSVpvf(aTHX_
-   a constant (%SVf), sv));
-   useless = SvPV_nolen(msv);
-useless_is_utf8 = SvUTF8(msv);
-   }
-   else
-   useless = a constant (undef);
/* don't warn on optimised away booleans, eg 
 * use constant Foo, 5; Foo || print; */
if (cSVOPo-op_private  OPpCONST_SHORTCIRCUIT)
@@ -1196,7 +1188,24 @@ Perl_scalarvoid(pTHX_ OP *o)
strnEQ(maybe_macro, ds, 2) ||
strnEQ(maybe_macro, ig, 2))
useless = NULL;
+   else {
+   SV * const dsv = newSV(0);
+   SV* msv = sv_2mortal(Perl_newSVpvf(aTHX_
+   a constant (%s),
+   pv_pretty(dsv, maybe_macro, SvCUR(sv), 32, 
NULL, NULL,
+   PERL_PV_PRETTY_DUMP | 
PERL_PV_ESCAPE_NOCLEAR | PERL_PV_ESCAPE_UNI_DETECT )));
+   SvREFCNT_dec(dsv);
+   useless = SvPV_nolen(msv);
+   useless_is_utf8 = SvUTF8(msv);
+   }
}
+   else if (SvOK(sv)) {
+   SV* msv = sv_2mortal(Perl_newSVpvf(aTHX_
+   a constant (%SVf), sv));
+   useless = SvPV_nolen(msv);
+   }
+   else
+   useless = a constant (undef);
}
}
op_null(o); /* don't execute or even remember it */
diff --git a/t/lib/warnings/op b/t/lib/warnings/op
index 344cf12..8f57920 100644
--- a/t/lib/warnings/op
+++ b/t/lib/warnings/op
@@ -526,6 +526,7 @@ use warnings 'void' ;
 2 + 2; # optimized to OP_CONST
 use constant U = undef;
 U;
+qq/   \n/;
 5 || print bad\n;# test OPpCONST_SHORTCIRCUIT
 print boo\n if U;# test OPpCONST_SHORTCIRCUIT
 no warnings 'void' ;
@@ -534,11 +535,12 @@ no warnings 'void' ;
 x . y; # optimized to OP_CONST
 2 + 2; # optimized to OP_CONST
 EXPECT
-Useless use of a constant (abc) in void context at - line 3.
+Useless use of a constant (abc) in void context at - line 3.
 Useless use of a constant (7) in void context at - line 4.
-Useless use of a constant (xy) in void context at - line 5.
+Useless use of a constant (xy) in void context at - line 5.
 Useless use of a constant (4) in void context at - line 6.
 Useless use of a constant (undef) in void context at - line 8.
+Useless use of a constant (\\t\n) in void context at - line 9.
 
 # op.c
 use utf8;
@@ -555,9 +557,9 @@ no warnings 'void' ;
 àḆc; # OP_CONST
 Ẋ . ƴ; # optimized to OP_CONST
 EXPECT
-Useless use of a constant (àḆc) in void context at - line 5.
-Useless use of a constant (Ẋƴ) in void context at - line 6.
-Useless use of a constant (FOO) in void context at - line 7.
+Useless use of a constant (\340\x{1e06}c) in void context at - line 5.
+Useless use of a constant (\x{1e8a}\x{1b4}) in void context at - line 6.
+Useless use of a constant (\x{ff26}\x{ff2f}\x{ff2f}) in void context at - 
line 7.
 Useless use of a constant (undef) in void context at - line 9.
 
 # op.c
diff --git a/t/lib/warnings/perly b/t/lib/warnings/perly
index 02e29fd..d2b9560 100644
--- a/t/lib/warnings/perly
+++ b/t/lib/warnings/perly

[perl.git] branch blead, updated. v5.15.7-82-gd3bcd21

2012-01-25 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/d3bcd21f9c56ad29603330017e1fef6e7910189b?hp=7a9b248bd4287aff0152aae161526c23245dc045

- Log -
commit d3bcd21f9c56ad29603330017e1fef6e7910189b
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Wed Jan 25 12:34:17 2012 +0100

Initialize buffer to an empty string to avoid spurious uninitialized 
warnings
---

Summary of changes:
 op.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/op.c b/op.c
index e31f742..30cc7f8 100644
--- a/op.c
+++ b/op.c
@@ -1189,7 +1189,7 @@ Perl_scalarvoid(pTHX_ OP *o)
strnEQ(maybe_macro, ig, 2))
useless = NULL;
else {
-   SV * const dsv = newSV(0);
+   SV * const dsv = newSVpvs();
SV* msv = sv_2mortal(Perl_newSVpvf(aTHX_
a constant (%s),
pv_pretty(dsv, maybe_macro, SvCUR(sv), 32, 
NULL, NULL,

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.15.7-83-gd7cf15e

2012-01-25 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/d7cf15ed3621c923ff3ce120367eec0f05078d4b?hp=d3bcd21f9c56ad29603330017e1fef6e7910189b

- Log -
commit d7cf15ed3621c923ff3ce120367eec0f05078d4b
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Wed Jan 25 12:45:25 2012 +0100

Correctly escape UTF-8 in hash keys in uninitialized warnings
---

Summary of changes:
 sv.c   |3 ++-
 t/lib/warnings/9uninit |4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/sv.c b/sv.c
index 2dce137..be5aec8 100644
--- a/sv.c
+++ b/sv.c
@@ -13895,7 +13895,8 @@ Perl_varname(pTHX_ const GV *const gv, const char 
gvtype, PADOFFSET targ,
SV * const sv = newSV(0);
*SvPVX(name) = '$';
Perl_sv_catpvf(aTHX_ name, {%s},
-   pv_display(sv,SvPVX_const(keyname), SvCUR(keyname), 0, 32));
+   pv_pretty(sv, SvPVX_const(keyname), SvCUR(keyname), 32, NULL, NULL,
+   PERL_PV_PRETTY_DUMP | PERL_PV_ESCAPE_UNI_DETECT ));
SvREFCNT_dec(sv);
 }
 else if (subscript_type == FUV_SUBSCRIPT_ARRAY) {
diff --git a/t/lib/warnings/9uninit b/t/lib/warnings/9uninit
index 0d2d841..37e24e7 100644
--- a/t/lib/warnings/9uninit
+++ b/t/lib/warnings/9uninit
@@ -1189,10 +1189,10 @@ use warnings 'uninitialized';
 my ($v);
 
 # check hash key is sanitised
-my %h = (\0011\002\r\n\t\f\\\abcdefghijklmnopqrstuvwxyz, undef);
+my %h = (\0011\002\r\n\t\fx{1234}abcdefghijklmnopqrstuvwxyz, undef);
 $v = join '', %h;
 EXPECT
-Use of uninitialized value $h{\0011\2\r\n\t\f\\\abcdefghijklm...} in join 
or string at - line 6.
+Use of uninitialized value $h{\0011\2\r\n\t\fx{1234}abcde...} in join 
or string at - line 6.
 
 use warnings 'uninitialized';
 my ($m1, $v);

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.15.5-298-gad084f5

2011-12-06 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/ad084f51cd17539ef55b510228156cd4f83c9729?hp=b8c25b3c5a25bcbc18a1bf60211b429b4e03a5e2

- Log -
commit ad084f51cd17539ef55b510228156cd4f83c9729
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Dec 6 22:02:21 2011 +0100

Upgrade to Safe 2.30

[rt.cpan.org #72872] Fix bad interaction with loading
Tie::Hash::NamedCapture on perls = 5.14.0
---

Summary of changes:
 MANIFEST   |1 +
 dist/Safe/Changes  |4 
 dist/Safe/MANIFEST |1 +
 dist/Safe/META.yml |4 ++--
 dist/Safe/Safe.pm  |   21 +++--
 dist/Safe/t/safenamedcap.t |   21 +
 6 files changed, 40 insertions(+), 12 deletions(-)
 create mode 100644 dist/Safe/t/safenamedcap.t

diff --git a/MANIFEST b/MANIFEST
index 7153dd4..c6eb168 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -3422,6 +3422,7 @@ dist/Safe/t/safe1.t   See if Safe works
 dist/Safe/t/safe2.tSee if Safe works
 dist/Safe/t/safe3.tSee if Safe works
 dist/Safe/t/safeload.t Tests that some modules can be loaded by Safe
+dist/Safe/t/safenamedcap.t Tests that Tie::Hash::NamedCapture can be loaded
 dist/Safe/t/safeops.t  Tests that all ops can be trapped by Safe
 dist/Safe/t/safesort.t Tests Safe with sort
 dist/Safe/t/safeuniversal.tTests Safe with functions from universal.c
diff --git a/dist/Safe/Changes b/dist/Safe/Changes
index 385287c..54f9dc6 100644
--- a/dist/Safe/Changes
+++ b/dist/Safe/Changes
@@ -1,3 +1,7 @@
+2.30 Tue Dec  6 2011
+- Fix bad interaction with loading Tie::Hash::NamedCapture
+  on perls = 5.14.0 [rt.cpan.org #72872]
+
 2.29 Sun Oct 31 2010
 - Add version::vxs::VCMP to Safe's default share
 
diff --git a/dist/Safe/MANIFEST b/dist/Safe/MANIFEST
index a610ca7..b527bc4 100644
--- a/dist/Safe/MANIFEST
+++ b/dist/Safe/MANIFEST
@@ -7,6 +7,7 @@ t/safe1.t
 t/safe2.t
 t/safe3.t
 t/safeload.t
+t/safenamedcap.t
 t/safeops.t
 t/safesort.t
 t/safeuniversal.t
diff --git a/dist/Safe/META.yml b/dist/Safe/META.yml
index 58d10ed..14c4c5a 100644
--- a/dist/Safe/META.yml
+++ b/dist/Safe/META.yml
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:   Safe
-version:2.29
+version:2.30
 abstract:   ~
 author:  []
 license:unknown
@@ -14,7 +14,7 @@ no_index:
 directory:
 - t
 - inc
-generated_by:   ExtUtils::MakeMaker version 6.55_02
+generated_by:   ExtUtils::MakeMaker version 6.57_05
 meta-spec:
 url:  http://module-build.sourceforge.net/META-spec-v1.4.html
 version:  1.4
diff --git a/dist/Safe/Safe.pm b/dist/Safe/Safe.pm
index 70549c5..8d0e4fd 100644
--- a/dist/Safe/Safe.pm
+++ b/dist/Safe/Safe.pm
@@ -4,7 +4,7 @@ use 5.003_11;
 use strict;
 use Scalar::Util qw(reftype refaddr);
 
-$Safe::VERSION = 2.29;
+$Safe::VERSION = 2.30;
 
 # *** Don't declare any lexicals above this point ***
 #
@@ -102,15 +102,6 @@ my $default_share = [qw[
 re::regname
 re::regnames
 re::regnames_count
-Tie::Hash::NamedCapture::FETCH
-Tie::Hash::NamedCapture::STORE
-Tie::Hash::NamedCapture::DELETE
-Tie::Hash::NamedCapture::CLEAR
-Tie::Hash::NamedCapture::EXISTS
-Tie::Hash::NamedCapture::FIRSTKEY
-Tie::Hash::NamedCapture::NEXTKEY
-Tie::Hash::NamedCapture::SCALAR
-Tie::Hash::NamedCapture::flags
 UNIVERSAL::DOES
 version::()
 version::new
@@ -137,6 +128,16 @@ my $default_share = [qw[
 version::vxs::VCMP
 ]), ($] = 5.011  qw[
 re::regexp_pattern
+]), ($] = 5.010  $]  5.014  qw[
+Tie::Hash::NamedCapture::FETCH
+Tie::Hash::NamedCapture::STORE
+Tie::Hash::NamedCapture::DELETE
+Tie::Hash::NamedCapture::CLEAR
+Tie::Hash::NamedCapture::EXISTS
+Tie::Hash::NamedCapture::FIRSTKEY
+Tie::Hash::NamedCapture::NEXTKEY
+Tie::Hash::NamedCapture::SCALAR
+Tie::Hash::NamedCapture::flags
 ])];
 
 sub new {
diff --git a/dist/Safe/t/safenamedcap.t b/dist/Safe/t/safenamedcap.t
new file mode 100644
index 000..6afa70e
--- /dev/null
+++ b/dist/Safe/t/safenamedcap.t
@@ -0,0 +1,21 @@
+BEGIN {
+if ($]  5.010) {
+   print 1..0\n;
+   exit 0;
+}
+require Config;
+import Config;
+if ($Config{'extensions'} !~ /\bOpcode\b/) {
+   print 1..0\n;
+   exit 0;
+}
+}
+
+use strict;
+use Test::More;
+use Safe;
+plan(tests = 1);
+
+BEGIN { Safe-new }
+foo =~ /(?foofo*)/;
+is( $+{foo}, foo, Named capture works );

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.15.5-247-g0beff06

2011-12-01 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/0beff067932254cd3dc853ac18c0e666b9e4cd75?hp=936a258b3bd6beb80194d6856e785f700e800472

- Log -
commit 0beff067932254cd3dc853ac18c0e666b9e4cd75
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Thu Dec 1 15:10:49 2011 +0100

Install perlfaq and perlglossary manpages in section 1 of the manual
---

Summary of changes:
 installman |3 +++
 utils.lst  |   11 +++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/installman b/installman
index b5b2620..2c20790 100755
--- a/installman
+++ b/installman
@@ -133,6 +133,9 @@ sub pod2man {
   if (-f $_ and /\.p(?:m|od)$/) {
   my $fullname = $_;
   s!^\Q$poddir\E/!!;
+  # perlfaq manpages are installed in section 
1,
+  # so skip when searching files for section 3
+  return if m(perlfaq.?\.pod|perlglossary.pod);
   $modpods{$fullname} = $_;
   }
   }},
diff --git a/utils.lst b/utils.lst
index ad68c1a..037b3eb 100644
--- a/utils.lst
+++ b/utils.lst
@@ -1,3 +1,14 @@
+cpan/perlfaq/lib/perlfaq.pod
+cpan/perlfaq/lib/perlfaq1.pod
+cpan/perlfaq/lib/perlfaq2.pod
+cpan/perlfaq/lib/perlfaq3.pod
+cpan/perlfaq/lib/perlfaq4.pod
+cpan/perlfaq/lib/perlfaq5.pod
+cpan/perlfaq/lib/perlfaq6.pod
+cpan/perlfaq/lib/perlfaq7.pod
+cpan/perlfaq/lib/perlfaq8.pod
+cpan/perlfaq/lib/perlfaq9.pod
+cpan/perlfaq/lib/perlglossary.pod
 cpan/Pod-LaTeX/blib/script/pod2latex
 cpan/podlators/blib/script/pod2man
 cpan/podlators/blib/script/pod2text

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.15.2-187-g00c1390

2011-08-31 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/00c1390f3fd32e7cc0959bd9d47ee28d14ef7e42?hp=925798f29c677c612a63a08a92ebb5f169e27b02

- Log -
commit 00c1390f3fd32e7cc0959bd9d47ee28d14ef7e42
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Wed Aug 31 21:59:40 2011 +0200

Make switchC.t pass if the environment variable PERL_UNICODE contains S

(actually doing so the quick way, by skipping the last test, that tests
for -CS on the shebang line)
---

Summary of changes:
 t/run/switchC.t |   17 +++--
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/t/run/switchC.t b/t/run/switchC.t
index 5223b00..b1a243c 100644
--- a/t/run/switchC.t
+++ b/t/run/switchC.t
@@ -28,7 +28,7 @@ like( $r, qr/^$b(?:\r?\n)?$/s, '-CO: no warning on UTF-8 
output' );
 SKIP: {
 if (exists $ENV{PERL_UNICODE} 
($ENV{PERL_UNICODE} eq  || $ENV{PERL_UNICODE} =~ /[SO]/)) {
-   skip(qq[cannot test with PERL_UNICODE locale  or /[SO]/], 1);
+   skip(qq[cannot test with PERL_UNICODE  or /[SO]/], 1);
 }
 $r = runperl( switches = [ '-CI', '-w' ],
  prog = 'print ord(STDIN)',
@@ -96,8 +96,13 @@ $r = runperl( switches = [ '-CA', '-w' ],
 like( $r, qr/^Too late for -CS option at -e line 1\.$/s,
   '#!perl -C with different -C on command line' );
 
-$r = runperl( switches = [ '-w' ],
- progs= [ '#!perl -CS', 'print chr(256)' ],
-  stderr   = 1, );
-like( $r, qr/^Too late for -CS option at -e line 1\.$/s,
-  '#!perl -C but not command line' );
+SKIP: {
+if (exists $ENV{PERL_UNICODE}  $ENV{PERL_UNICODE} =~ /S/) {
+   skip(qq[cannot test with PERL_UNICODE including S], 1);
+}
+$r = runperl( switches = [ '-w' ],
+  progs= [ '#!perl -CS', 'print chr(256)' ],
+  stderr   = 1, );
+like( $r, qr/^Too late for -CS option at -e line 1\.$/s,
+  '#!perl -C but not command line' );
+}

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.9-142-g8250589

2011-01-27 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/82505891db31e111f883f34516330c3d94c70486?hp=cfc889ad29c3a0868d6182fddbe612d7f51d6b11

- Log -
commit 82505891db31e111f883f34516330c3d94c70486
Author: Leon Timmermans faw...@gmail.com
Date:   Mon Jan 24 16:48:02 2011 +0100

Made binmode $fh, ':scalar' DWIM

This silences this warning:
  $ perl -we 'open my $f, , \my $x; binmode $f, scalar'
  Use of uninitialized value in binmode at -e line 1.
---

Summary of changes:
 ext/PerlIO-scalar/scalar.xs |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ext/PerlIO-scalar/scalar.xs b/ext/PerlIO-scalar/scalar.xs
index e081c17..b6cc5c1 100644
--- a/ext/PerlIO-scalar/scalar.xs
+++ b/ext/PerlIO-scalar/scalar.xs
@@ -22,7 +22,7 @@ PerlIOScalar_pushed(pTHX_ PerlIO * f, const char *mode, SV * 
arg,
  * using, otherwise arg (from binmode presumably) is either NULL
  * or the _name_ of the scalar
  */
-if (arg) {
+if (arg  SvOK(arg)) {
if (SvROK(arg)) {
if (SvREADONLY(SvRV(arg))  mode  *mode != 'r') {
if (ckWARN(WARN_LAYER))

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.7-126-ga51ee39

2010-11-27 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/a51ee39bac6a83e6d63d3e6d8941ae352ef3546f?hp=4b074b7191cf70ddeff23e80e0d7a236842ebd1a

- Log -
commit a51ee39bac6a83e6d63d3e6d8941ae352ef3546f
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Sat Nov 27 15:47:44 2010 +0100

Fix a warning (that spotted a potential mro bug that I could not produce)
---

Summary of changes:
 mro.c |   15 +++
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/mro.c b/mro.c
index a5f1de0..4b90e67 100644
--- a/mro.c
+++ b/mro.c
@@ -985,15 +985,14 @@ S_mro_gather_and_rename(pTHX_ HV * const stashes, HV * 
const seen_stashes,
/* If oldstash is not null, then we can use its HvENAME to look up
   the isarev hash, since all its subclasses will be listed there.
 
-  If oldstash is null, then this is an empty spot with no stash in
-  it, so subclasses could be listed in isarev hashes belonging to
-  any of the names, so we have to check all of them. */
-   if(oldstash) {
+  If oldstash is null or is no longer in the symbol table, then
+  this is an empty spot with no stash in it, so subclasses could
+  be listed in isarev hashes belonging to any of the names, so we
+  have to check all of them. */
+   char *hvename = oldstash ? HvENAME(oldstash) : NULL;
+   if (hvename) {
fetched_isarev = TRUE;
-   svp
-= hv_fetch(
-PL_isarev, HvENAME(oldstash), HvENAMELEN_get(oldstash), 0
-  );
+   svp = hv_fetch(PL_isarev, hvename, HvENAMELEN_get(oldstash), 0);
if (svp) isarev = MUTABLE_HV(*svp);
}
else if(SvTYPE(namesv) == SVt_PVAV) {

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.7-78-g1f93372

2010-11-24 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/1f933721fdfb02e4d62d10a1a69032d38d4db05d?hp=2850478b7555b16cccb2e9234c8a939af507940b

- Log -
commit 1f933721fdfb02e4d62d10a1a69032d38d4db05d
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Wed Nov 24 14:43:30 2010 +0100

Don't use try as a variable name

try being a C++ keyword, this produces compilation warnings.
---

Summary of changes:
 regexec.c |   16 
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/regexec.c b/regexec.c
index f43e6e4..375d4fd 100644
--- a/regexec.c
+++ b/regexec.c
@@ -6397,32 +6397,32 @@ S_reginclass(pTHX_ const regexp * const prog, register 
const regnode * const n,
IV i;
for (i = 0; i = av_len(list); i++) {
SV** try_p = av_fetch(list, i, FALSE);
-   char* try;
+   char* try_c;
if (try_p == NULL) {
Perl_croak(aTHX_ panic: invalid 
PL_utf8_foldclosures structure);
}
/* Don't have to worry about embeded
 * nulls since NULL isn't folded or
 * foldable */
-   try = SvPVX(*try_p);
-   if (UTF8_IS_INVARIANT(*try)
+   try_c = SvPVX(*try_p);
+   if (UTF8_IS_INVARIANT(*try_c)
 ANYOF_BITMAP_TEST(n,
-   
UNI_TO_NATIVE(*try)))
+   
UNI_TO_NATIVE(*try_c)))
{
match = TRUE;
break;
}
else if
-   (UTF8_IS_DOWNGRADEABLE_START(*try)
+   (UTF8_IS_DOWNGRADEABLE_START(*try_c)
  ANYOF_BITMAP_TEST(n,
 UNI_TO_NATIVE(
-   TWO_BYTE_UTF8_TO_UNI(try[0],
-try[1]
+   TWO_BYTE_UTF8_TO_UNI(try_c[0],
+
try_c[1]
{
match = TRUE;
break;
} else if (swash_fetch(sw,
-   (U8*) try, 1))
+   (U8*) try_c, 1))
{
match = TRUE;
break;

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.6-608-gb2df766

2010-11-20 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/b2df766153cc0378e7d4ef5eaf61bb69a8e3c9c0?hp=2528605288634d5ddf6636ed4d85fb289b622e4a

- Log -
commit b2df766153cc0378e7d4ef5eaf61bb69a8e3c9c0
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Sat Nov 20 15:00:46 2010 +0100

Typo in perldelta
---

Summary of changes:
 pod/perldelta.pod |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index f3f5dbf..380274d 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -784,7 +784,7 @@ complete. See FREADME.win32 for more details.
 
 =item VMS
 
-Record-oriented files (record format variable or variable wih fixed control)
+Record-oriented files (record format variable or variable with fixed control)
 opened for write by the perlio layer will now be line buffered to prevent the
 introduction of spurious line breaks whenever the perlio buffer fills up.
 

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.6-567-gd90d5a3

2010-11-17 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/d90d5a3845e854b868ede5476fd329d1fb85fd46?hp=59aae9bd33055ccfc97baf9341df5d03d55934ed

- Log -
commit d90d5a3845e854b868ede5476fd329d1fb85fd46
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Wed Nov 17 09:28:30 2010 +0100

Spelling/grammar nits
---

Summary of changes:
 pod/perlop.pod |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pod/perlop.pod b/pod/perlop.pod
index aaa86de..c577f36 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -510,7 +510,7 @@ Although it has no direct equivalent in C, Perl's C// 
operator is related
 to its C-style or.  In fact, it's exactly the same as C||, except that it
 tests the left hand side's definedness instead of its truth.  Thus, C$a // $b
 is similar to Cdefined($a) || $b (except that it returns the value of C$a
-rather than the value of Cdefined($a)) and yields the same result than
+rather than the value of Cdefined($a)) and yields the same result as
 Cdefined($a) ? $a : $b (except that the ternary-operator form can be
 used as a lvalue, while C$a // $b cannot).  This is very useful for
 providing default values for variables.  If you actually want to test if
@@ -1142,7 +1142,7 @@ example, see Lperlrebackslash/Octal escapes.)  Starting 
in Perl 5.14, you may
 use C\o{} instead which avoids all these problems.  Otherwise, it is best to
 use this construct only for ordinals C\077 and below, remembering to pad to
 the left with zeros to make three digits.  For larger ordinals, either use
-C\o{} , or convert to someething else, such as to hex and use C\x{}
+C\o{} , or convert to something else, such as to hex and use C\x{}
 instead.
 
 Having fewer than 3 digits may lead to a misleading warning message that says

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.6-539-gbdc7923

2010-11-15 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/bdc7923bddf5c9272e5e4e7e5618229a2b598165?hp=aca83993e8f7992e6cffa683d01dd8bb4c5440f2

- Log -
commit bdc7923bddf5c9272e5e4e7e5618229a2b598165
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Mon Nov 15 11:47:53 2010 +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.
---

Summary of changes:
 pod/perlop.pod |9 +
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/pod/perlop.pod b/pod/perlop.pod
index 5dd86eb..aaa86de 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -510,10 +510,11 @@ Although it has no direct equivalent in C, Perl's C// 
operator is related
 to its C-style or.  In fact, it's exactly the same as C||, except that it
 tests the left hand side's definedness instead of its truth.  Thus, C$a // $b
 is similar to Cdefined($a) || $b (except that it returns the value of C$a
-rather than the value of Cdefined($a)) and is exactly equivalent to
-Cdefined($a) ? $a : $b.  This is very useful for providing default values
-for variables.  If you actually want to test if at least one of C$a and
-C$b is defined, use Cdefined($a // $b).
+rather than the value of Cdefined($a)) and yields the same result than
+Cdefined($a) ? $a : $b (except that the ternary-operator form can be
+used as a lvalue, while C$a // $b cannot).  This is very useful for
+providing default values for variables.  If you actually want to test if
+at least one of C$a and C$b is defined, use Cdefined($a // $b).
 
 The C||, C// and C operators return the last value evaluated
 (unlike C's C|| and C, which return 0 or 1). Thus, a reasonably

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.6-393-g27df231

2010-11-06 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/27df23140def00922ce186da623f2c3724e0b36a?hp=0b06a75363d6bf6cd309efd90b7182a041a1f4f1

- Log -
commit 27df23140def00922ce186da623f2c3724e0b36a
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Sat Nov 6 16:06:34 2010 +0100

Add new ops in Opcode, so it does not warn at compilation

The ops are the recently-introduced reach, rvalues, rkeys and transr.
---

Summary of changes:
 ext/Opcode/Opcode.pm |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ext/Opcode/Opcode.pm b/ext/Opcode/Opcode.pm
index 3776324..0766940 100644
--- a/ext/Opcode/Opcode.pm
+++ b/ext/Opcode/Opcode.pm
@@ -6,7 +6,7 @@ use strict;
 
 our($VERSION, @ISA, @EXPORT_OK);
 
-$VERSION = 1.16;
+$VERSION = 1.17;
 
 use Carp;
 use Exporter ();
@@ -311,7 +311,7 @@ invert_opset function.
 rv2av aassign aelem aelemfast aslice av2arylen
 
 rv2hv helem hslice each values keys exists delete aeach akeys avalues
-boolkeys
+boolkeys reach rvalues rkeys
 
 preinc i_preinc predec i_predec postinc i_postinc postdec i_postdec
 int hex oct abs pow multiply i_multiply divide i_divide
@@ -325,7 +325,7 @@ invert_opset function.
 
 substr vec stringify study pos length index rindex ord chr
 
-ucfirst lcfirst uc lc quotemeta trans chop schop chomp schomp
+ucfirst lcfirst uc lc quotemeta trans transr chop schop chomp schomp
 
 match split qr
 

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.6-277-g1699865

2010-10-31 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/169986538ca31decb52c9931e6700230c17821c8?hp=d5944336d74c819152158dabfd806d49ad0ecb21

- Log -
commit 169986538ca31decb52c9931e6700230c17821c8
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Sun Oct 31 14:17:20 2010 +0100

Bump Safe's version to 2.29

M   dist/Safe/Changes
M   dist/Safe/META.yml
M   dist/Safe/Safe.pm

commit 45c3e378e4f0099778aec21f94f40fc2357470ca
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Sun Oct 31 14:08:53 2010 +0100

Add version::vxs::VCMP to Safe's default share

This is to accomodate this new function in version.pm 0.85.

M   dist/Safe/Safe.pm
---

Summary of changes:
 dist/Safe/Changes  |3 +++
 dist/Safe/META.yml |4 ++--
 dist/Safe/Safe.pm  |3 ++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/dist/Safe/Changes b/dist/Safe/Changes
index 7dc1c1d..385287c 100644
--- a/dist/Safe/Changes
+++ b/dist/Safe/Changes
@@ -1,3 +1,6 @@
+2.29 Sun Oct 31 2010
+- Add version::vxs::VCMP to Safe's default share
+
 2.28 Mon Sep 13 2010
 - Avoid infinite loop in _find_code_refs.
   Patch by Yasushi Nakajima (rt.cpan.org #61262)
diff --git a/dist/Safe/META.yml b/dist/Safe/META.yml
index 8938397..58d10ed 100644
--- a/dist/Safe/META.yml
+++ b/dist/Safe/META.yml
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:   Safe
-version:2.28
+version:2.29
 abstract:   ~
 author:  []
 license:unknown
@@ -14,7 +14,7 @@ no_index:
 directory:
 - t
 - inc
-generated_by:   ExtUtils::MakeMaker version 6.57_05
+generated_by:   ExtUtils::MakeMaker version 6.55_02
 meta-spec:
 url:  http://module-build.sourceforge.net/META-spec-v1.4.html
 version:  1.4
diff --git a/dist/Safe/Safe.pm b/dist/Safe/Safe.pm
index 5d40528..70549c5 100644
--- a/dist/Safe/Safe.pm
+++ b/dist/Safe/Safe.pm
@@ -4,7 +4,7 @@ use 5.003_11;
 use strict;
 use Scalar::Util qw(reftype refaddr);
 
-$Safe::VERSION = 2.28;
+$Safe::VERSION = 2.29;
 
 # *** Don't declare any lexicals above this point ***
 #
@@ -134,6 +134,7 @@ my $default_share = [qw[
 version::vxs::stringify
 version::vxs::new
 version::vxs::parse
+version::vxs::VCMP
 ]), ($] = 5.011  qw[
 re::regexp_pattern
 ])];

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.5-282-gad97526

2010-10-04 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/ad97526782cdd5392f99d55127e22a7eb5ea9851?hp=7001ab9ef23c71d16d78a845cc0c5507f4d29bff

- Log -
commit ad97526782cdd5392f99d55127e22a7eb5ea9851
Author: Zefram zef...@fysh.org
Date:   Mon Oct 4 10:14:28 2010 +0200

add stray save_* functions to the API
---

Summary of changes:
 embed.fnc  |8 
 embed.h|4 ++--
 global.sym |2 ++
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/embed.fnc b/embed.fnc
index def0c36..8ed216c 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1042,7 +1042,7 @@ Ap|void   
|save_destructor|DESTRUCTORFUNC_NOCONTEXT_t f|NN void* p
 Ap |void   |save_destructor_x|DESTRUCTORFUNC_t f|NULLOK void* p
 Apmb   |void   |save_freesv|NULLOK SV* sv
 : Used in SAVEFREOP(), used in op.c, pp_ctl.c
-pmb|void   |save_freeop|NULLOK OP* o
+Apmb   |void   |save_freeop|NULLOK OP* o
 Apmb   |void   |save_freepv|NULLOK char* pv
 Ap |void   |save_generic_svref|NN SV** sptr
 Ap |void   |save_generic_pvref|NN char** str
@@ -1064,7 +1064,7 @@ Ap|void   |save_long  |NN long* longp
 Apmb   |void   |save_mortalizesv|NN SV* sv
 Ap |void   |save_nogv  |NN GV* gv
 : Used in SAVEFREOP(), used in gv.c, op.c, perl.c, pp_ctl.c, pp_sort.c
-pmb|void   |save_op
+Apmb   |void   |save_op
 Ap |SV*|save_scalar|NN GV* gv
 Ap |void   |save_pptr  |NN char** pptr
 Ap |void   |save_vptr  |NN void *ptr
@@ -1074,9 +1074,9 @@ Ap|void   |save_sptr  |NN SV** sptr
 Ap |SV*|save_svref |NN SV** sptr
 Ap |void   |save_pushptr   |NULLOK void *const ptr|const int type
 : Used by SAVECOPARYBASE() in op.c
-p  |void   |save_pushi32ptr|const I32 i|NULLOK void *const ptr|const int 
type
+Ap |void   |save_pushi32ptr|const I32 i|NULLOK void *const ptr|const int 
type
 : Used by SAVESWITCHSTACK() in pp.c
-p  |void   |save_pushptrptr|NULLOK void *const ptr1 \
+Ap |void   |save_pushptrptr|NULLOK void *const ptr1 \
|NULLOK void *const ptr2|const int type
 #if defined(PERL_IN_SCOPE_C)
 s  |void   |save_pushptri32ptr|NULLOK void *const ptr1|const I32 i \
diff --git a/embed.h b/embed.h
index 5ed1748..370d175 100644
--- a/embed.h
+++ b/embed.h
@@ -441,7 +441,9 @@
 #define save_nogv(a)   Perl_save_nogv(aTHX_ a)
 #define save_padsv_and_mortalize(a)Perl_save_padsv_and_mortalize(aTHX_ a)
 #define save_pptr(a)   Perl_save_pptr(aTHX_ a)
+#define save_pushi32ptr(a,b,c) Perl_save_pushi32ptr(aTHX_ a,b,c)
 #define save_pushptr(a,b)  Perl_save_pushptr(aTHX_ a,b)
+#define save_pushptrptr(a,b,c) Perl_save_pushptrptr(aTHX_ a,b,c)
 #define save_re_context()  Perl_save_re_context(aTHX)
 #define save_scalar(a) Perl_save_scalar(aTHX_ a)
 #define save_set_svflags(a,b,c)Perl_save_set_svflags(aTHX_ a,b,c)
@@ -1435,8 +1437,6 @@
 #define rsignal_restore(a,b)   Perl_rsignal_restore(aTHX_ a,b)
 #define rsignal_save(a,b,c)Perl_rsignal_save(aTHX_ a,b,c)
 #define rxres_save(a,b)Perl_rxres_save(aTHX_ a,b)
-#define save_pushi32ptr(a,b,c) Perl_save_pushi32ptr(aTHX_ a,b,c)
-#define save_pushptrptr(a,b,c) Perl_save_pushptrptr(aTHX_ a,b,c)
 #define sawparens(a)   Perl_sawparens(aTHX_ a)
 #define scalar(a)  Perl_scalar(aTHX_ a)
 #define scalarvoid(a)  Perl_scalarvoid(aTHX_ a)
diff --git a/global.sym b/global.sym
index 13e68cc..ffd2249 100644
--- a/global.sym
+++ b/global.sym
@@ -511,7 +511,9 @@ Perl_save_nogv
 Perl_save_op
 Perl_save_padsv_and_mortalize
 Perl_save_pptr
+Perl_save_pushi32ptr
 Perl_save_pushptr
+Perl_save_pushptrptr
 Perl_save_re_context
 Perl_save_scalar
 Perl_save_set_svflags

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.5-283-g07ffcb7

2010-10-04 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/07ffcb738e9467df21e3d33604cf09c125e7ff52?hp=ad97526782cdd5392f99d55127e22a7eb5ea9851

- Log -
commit 07ffcb738e9467df21e3d33604cf09c125e7ff52
Author: Zefram zef...@fysh.org
Date:   Mon Oct 4 10:26:42 2010 +0200

[PATCH] function to parse Perl statement sequence

New API function parse_stmtseq() parses a sequence of statements, up to
closing brace or EOF.
---

Summary of changes:
 MANIFEST|1 +
 embed.fnc   |1 +
 embed.h |1 +
 ext/XS-APItest/APItest.pm   |2 +-
 ext/XS-APItest/APItest.xs   |   18 +-
 ext/XS-APItest/t/looprest.t |   87 +++
 global.sym  |1 +
 perly.act   |  851 ---
 perly.h |  290 
 perly.tab   | 1611 ++-
 perly.y |   29 +-
 proto.h |1 +
 toke.c  |   46 ++
 13 files changed, 1585 insertions(+), 1354 deletions(-)
 create mode 100644 ext/XS-APItest/t/looprest.t

diff --git a/MANIFEST b/MANIFEST
index dce1738..becb633 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -3355,6 +3355,7 @@ ext/XS-APItest/t/grok.t   XS::APItest: tests for 
grok* functions
 ext/XS-APItest/t/hash.tXS::APItest: tests for hash related APIs
 ext/XS-APItest/t/keyword_multiline.t   test keyword plugin parsing across lines
 ext/XS-APItest/t/keyword_plugin.t  test keyword plugin mechanism
+ext/XS-APItest/t/looprest.ttest recursive descent statement-sequence 
parsing
 ext/XS-APItest/t/Markers.pmHelper for ./blockhooks.t
 ext/XS-APItest/t/my_cxt.t  XS::APItest: test MY_CXT interface
 ext/XS-APItest/t/my_exit.t XS::APItest: test my_exit
diff --git a/embed.fnc b/embed.fnc
index 8ed216c..c0c5a3f 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -630,6 +630,7 @@ AMpd|I32|lex_read_unichar|U32 flags
 AMpd   |void   |lex_read_space |U32 flags
 : Public parser API
 AMpd   |OP*|parse_fullstmt |U32 flags
+AMpd   |OP*|parse_stmtseq  |U32 flags
 : Used in various files
 Ap |void   |op_null|NN OP* o
 : FIXME. Used by Data::Alias
diff --git a/embed.h b/embed.h
index 370d175..86a3a99 100644
--- a/embed.h
+++ b/embed.h
@@ -367,6 +367,7 @@
 #define packlist(a,b,c,d,e)Perl_packlist(aTHX_ a,b,c,d,e)
 #define pad_findmy(a,b,c)  Perl_pad_findmy(aTHX_ a,b,c)
 #define parse_fullstmt(a)  Perl_parse_fullstmt(aTHX_ a)
+#define parse_stmtseq(a)   Perl_parse_stmtseq(aTHX_ a)
 #define pmop_dump(a)   Perl_pmop_dump(aTHX_ a)
 #define pop_scope()Perl_pop_scope(aTHX)
 #define pregcomp(a,b)  Perl_pregcomp(aTHX_ a,b)
diff --git a/ext/XS-APItest/APItest.pm b/ext/XS-APItest/APItest.pm
index 474d528..bb95682 100644
--- a/ext/XS-APItest/APItest.pm
+++ b/ext/XS-APItest/APItest.pm
@@ -36,7 +36,7 @@ sub import {
}
 }
 foreach (keys %{$exports||{}}) {
-   next unless /\A(?:rpn|calcrpn|stufftest|swaptwostmts)\z/;
+   next unless /\A(?:rpn|calcrpn|stufftest|swaptwostmts|looprest)\z/;
$^H{XS::APItest/$_} = 1;
delete $exports-{$_};
 }
diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs
index 67c2738..4b3d470 100644
--- a/ext/XS-APItest/APItest.xs
+++ b/ext/XS-APItest/APItest.xs
@@ -381,7 +381,7 @@ my_rpeep (pTHX_ OP *o)
  (SvFLAGS(sv)  (SVf_IOK|SVf_NOK|SVf_POK|SVp_IOK|SVp_NOK|SVp_POK)))
 
 static SV *hintkey_rpn_sv, *hintkey_calcrpn_sv, *hintkey_stufftest_sv;
-static SV *hintkey_swaptwostmts_sv;
+static SV *hintkey_swaptwostmts_sv, *hintkey_looprest_sv;
 static int (*next_keyword_plugin)(pTHX_ char *, STRLEN, OP **);
 
 /* low-level parser helpers */
@@ -553,6 +553,17 @@ static OP *THX_parse_keyword_swaptwostmts(pTHX)
 return !a ? b : !b ? a : newLISTOP(OP_LINESEQ, 0, b, a);
 }
 
+#define parse_keyword_looprest() THX_parse_keyword_looprest(aTHX)
+static OP *THX_parse_keyword_looprest(pTHX)
+{
+I32 condline;
+OP *body;
+condline = CopLINE(PL_curcop);
+body = parse_stmtseq(0);
+return newWHILEOP(0, 1, NULL, condline, newSVOP(OP_CONST, 0, PL_sv_yes),
+   body, NULL, 1);
+}
+
 /* plugin glue */
 
 #define keyword_active(hintkey_sv) THX_keyword_active(aTHX_ hintkey_sv)
@@ -585,6 +596,10 @@ static int my_keyword_plugin(pTHX_
keyword_active(hintkey_swaptwostmts_sv)) {
*op_ptr = parse_keyword_swaptwostmts();
return KEYWORD_PLUGIN_STMT;
+} else if(keyword_len == 8  strnEQ(keyword_ptr, looprest, 8) 
+   keyword_active(hintkey_looprest_sv)) {
+   *op_ptr = parse_keyword_looprest();
+   return KEYWORD_PLUGIN_STMT;
 } else {
return next_keyword_plugin(aTHX_ keyword_ptr, keyword_len, op_ptr);
 }

[perl.git] branch blead, updated. v5.13.5-281-g7001ab9

2010-10-04 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/7001ab9ef23c71d16d78a845cc0c5507f4d29bff?hp=d7d7fefda1ec0b9784e8148011dbac52e088dd91

- Log -
commit 7001ab9ef23c71d16d78a845cc0c5507f4d29bff
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Mon Oct 4 09:53:12 2010 +0200

Update AUTHORS
---

Summary of changes:
 AUTHORS |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index e4cf219..43dbce7 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -12,6 +12,7 @@
 # code kit is, of course, allowed.)
 -- 
 A. C. Yardley  yard...@tanet.net
+A. Sinan Unur  na...@cpan.org
 Aaron Cranep...@aaroncrane.co.uk
 Aaron B. Dossett   aa...@iglou.com
 Aaron J. Mackeyaj...@virginia.edu

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.5-18-g2163083

2010-09-20 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/21630838a66f778c0a320128e9a7db71d785f293?hp=d9f0b46418e111c5d35dd5f6e3196a145a545f97

- Log -
commit 21630838a66f778c0a320128e9a7db71d785f293
Author: Father Chrysostomos spr...@cpan.org
Date:   Mon Sep 20 09:44:15 2010 +0200

Don’t use PL_op without checking it first.
---

Summary of changes:
 doio.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/doio.c b/doio.c
index 2f660cc..526e1b5 100644
--- a/doio.c
+++ b/doio.c
@@ -1241,7 +1241,9 @@ Perl_do_print(pTHX_ register SV *sv, PerlIO *fp)
else {
assert((char *)result == tmps);
Perl_ck_warner_d(aTHX_ packWARN(WARN_UTF8),
-Wide character in %s, OP_DESC(PL_op));
+Wide character in %s,
+  PL_op ? OP_DESC(PL_op) : print
+   );
}
}
/* To detect whether the process is about to overstep its

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.5-21-g8e7d0c4

2010-09-20 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/8e7d0c4b4f9a32461518a61c3643c060cadc7b52?hp=65efc2f779afe1f849b3400dfd17c33f7f829604

- Log -
commit 8e7d0c4b4f9a32461518a61c3643c060cadc7b52
Author: Father Chrysostomos spr...@cpan.org
Date:   Mon Sep 20 10:23:35 2010 +0200

[perl #77930] cx_stack reallocation during sort

Reset cx in pp_sort before POPSUB, as the pointer may no
longer be valid.
---

Summary of changes:
 pp_sort.c   |3 +++
 t/op/sort.t |   20 +++-
 2 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/pp_sort.c b/pp_sort.c
index f1ec82a..f96d568 100644
--- a/pp_sort.c
+++ b/pp_sort.c
@@ -1679,6 +1679,9 @@ PP(pp_sort)
 
if (!(flags  OPf_SPECIAL)) {
SV *sv;
+   /* Reset cx, in case the context stack has been
+  reallocated. */
+   cx = cxstack[cxstack_ix];
POPSUB(cx, sv);
LEAVESUB(sv);
}
diff --git a/t/op/sort.t b/t/op/sort.t
index f92cc95..59b8321 100644
--- a/t/op/sort.t
+++ b/t/op/sort.t
@@ -6,7 +6,7 @@ BEGIN {
 require 'test.pl';
 }
 use warnings;
-plan( tests = 159 );
+plan( tests = 160 );
 
 # these shouldn't hang
 {
@@ -890,3 +890,21 @@ fresh_perl_is('sub w ($$) {my ($l, my $r) = @_; my $v = 
\...@_; undef @_; @_ = 0..2
 
 is($count, 0, 'all gone');
 }
+
+# [perl #77930] The context stack may be reallocated during a sort, as a
+#   result of deeply-nested (or not-so-deeply-nested) calls
+#   from a custom sort subroutine.
+fresh_perl_is
+ '
+   $sub = sub {
+local $count = $count+1;
+()-$sub if $count  1000;
+$a cmp $b
+   };
+   () = sort $sub qwa b c d e f g;
+   print ok
+ ',
+ 'ok',
+  {},
+ '[perl #_] cx_stack reallocation during sort'
+;

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.4-311-g346e4e5

2010-09-17 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/346e4e567b90e9980b46c684af017e17b763fa74?hp=2793cb42c554ddf216f1ffc5a6d2a867adcd6c0d

- Log -
commit 346e4e567b90e9980b46c684af017e17b763fa74
Author: Karl Williamson pub...@khwilliamson.com
Date:   Thu Sep 16 13:26:07 2010 -0600

PATCH: perldelta entry for [\8] [perl #76840] fix.
---

Summary of changes:
 pod/perldelta.pod |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 6b77887..1907863 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -609,6 +609,14 @@ reference to a copy of a glob:
 This was a mistake, and the previous behaviour from perl 5.10 and 5.12, which 
is
 to treat \$var as a scalar reference, has now been restored.
 
+=item *
+
+The regular expression bracketed character class C[\8\9] was
+effectively the same as C[89\000], incorrectly matching a NULL character.
+It also gave incorrect warnings that the C8 and C9 were ignored.
+Now C[\8\9] is the same as C[89] and gives legitimate warnings that
+C\8 and C\9 are unrecognized escape sequences, passed-through.
+
 =back
 
 =head1 Known Problems

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.4-303-gdefdfed

2010-09-16 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/defdfed5e6b9e2f8b9451febd0406ed351042bb9?hp=b28e2c3cb7448b983edc991b66c9eb650488d89b

- Log -
commit defdfed5e6b9e2f8b9451febd0406ed351042bb9
Author: Zefram zef...@fysh.org
Date:   Wed Sep 15 00:21:16 2010 +0100

add hv_copy_hints_hv and save_hints to the API
---

Summary of changes:
 MANIFEST |2 +
 embed.fnc|4 +-
 embed.h  |8 +
 ext/XS-APItest/APItest.xs|   68 ++
 ext/XS-APItest/t/copyhints.t |   10 ++
 ext/XS-APItest/t/savehints.t |   10 ++
 global.sym   |2 +
 hv.c |   14 +++-
 op.c |2 +-
 pp_ctl.c |2 +-
 proto.h  |4 ++-
 scope.c  |2 +-
 12 files changed, 114 insertions(+), 14 deletions(-)
 create mode 100644 ext/XS-APItest/t/copyhints.t
 create mode 100644 ext/XS-APItest/t/savehints.t

diff --git a/MANIFEST b/MANIFEST
index 5450c21..5492753 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -3332,6 +3332,7 @@ ext/XS-APItest/t/blockhooks.t XS::APItest: tests for 
PL_blockhooks
 ext/XS-APItest/t/Block.pm  Helper for ./blockhooks.t
 ext/XS-APItest/t/caller.t  XS::APItest: tests for caller_cx
 ext/XS-APItest/t/call.tXS::APItest extension
+ext/XS-APItest/t/copyhints.t   test hv_copy_hints_hv() API
 ext/XS-APItest/t/exception.t   XS::APItest extension
 ext/XS-APItest/t/hash.tXS::APItest: tests for hash related APIs
 ext/XS-APItest/t/Markers.pmHelper for ./blockhooks.t
@@ -3344,6 +3345,7 @@ ext/XS-APItest/t/printf.t XS::APItest extension
 ext/XS-APItest/t/ptr_table.t   Test ptr_table_* APIs
 ext/XS-APItest/t/push.tXS::APItest extension
 ext/XS-APItest/t/rmagical.tXS::APItest extension
+ext/XS-APItest/t/savehints.t   test SAVEHINTS() API
 ext/XS-APItest/t/svpeek.t  XS::APItest extension
 ext/XS-APItest/t/svsetsv.t Test behaviour of sv_setsv with/without 
PERL_CORE
 ext/XS-APItest/t/temp_lv_sub.t XS::APItest: tests for lvalue subs returning 
temps
diff --git a/embed.fnc b/embed.fnc
index 4f3690c..0f666d7 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -455,7 +455,7 @@ Apd |HV*|gv_stashpvn|NN const char* name|U32 
namelen|I32 flags
 Apd|HV*|gv_stashsv |NN SV* sv|I32 flags
 Apd|void   |hv_clear   |NULLOK HV *hv
 : used in SAVEHINTS() and op.c
-poM|HV *   |hv_copy_hints_hv|NULLOK HV *const ohv
+ApdR   |HV *   |hv_copy_hints_hv|NULLOK HV *const ohv
 Ap |void   |hv_delayfree_ent|NN HV *hv|NULLOK HE *entry
 Abmd   |SV*|hv_delete  |NULLOK HV *hv|NN const char *key|I32 klen \
|I32 flags
@@ -1046,7 +1046,7 @@ Ap|void   |save_generic_pvref|NN char** str
 Ap |void   |save_shared_pvref|NN char** str
 Ap |void   |save_gp|NN GV* gv|I32 empty
 Ap |HV*|save_hash  |NN GV* gv
-p  |void   |save_hints
+Ap |void   |save_hints
 Amp|void   |save_helem |NN HV *hv|NN SV *key|NN SV **sptr
 Ap |void   |save_helem_flags|NN HV *hv|NN SV *key|NN SV **sptr|const U32 
flags
 Ap |void   |save_hptr  |NN HV** hptr
diff --git a/embed.h b/embed.h
index e7fbcf3..9e43d48 100644
--- a/embed.h
+++ b/embed.h
@@ -309,6 +309,7 @@
 #define gv_stashpvnPerl_gv_stashpvn
 #define gv_stashsv Perl_gv_stashsv
 #define hv_clear   Perl_hv_clear
+#define hv_copy_hints_hv   Perl_hv_copy_hints_hv
 #define hv_delayfree_ent   Perl_hv_delayfree_ent
 #define hv_common  Perl_hv_common
 #define hv_common_key_len  Perl_hv_common_key_len
@@ -853,9 +854,7 @@
 #define save_shared_pvref  Perl_save_shared_pvref
 #define save_gpPerl_save_gp
 #define save_hash  Perl_save_hash
-#ifdef PERL_CORE
 #define save_hints Perl_save_hints
-#endif
 #define save_helem_flags   Perl_save_helem_flags
 #define save_hptr  Perl_save_hptr
 #define save_I16   Perl_save_I16
@@ -2763,8 +2762,7 @@
 #define gv_stashpvn(a,b,c) Perl_gv_stashpvn(aTHX_ a,b,c)
 #define gv_stashsv(a,b)Perl_gv_stashsv(aTHX_ a,b)
 #define hv_clear(a)Perl_hv_clear(aTHX_ a)
-#ifdef PERL_CORE
-#endif
+#define hv_copy_hints_hv(a)Perl_hv_copy_hints_hv(aTHX_ a)
 #define hv_delayfree_ent(a,b)  Perl_hv_delayfree_ent(aTHX_ a,b)
 #define hv_common(a,b,c,d,e,f,g,h) Perl_hv_common(aTHX_ a,b,c,d,e,f,g,h)
 #define hv_common_key_len(a,b,c,d,e,f) Perl_hv_common_key_len(aTHX_ 
a,b,c,d,e,f)
@@ -3311,9 +3309,7 @@
 #define save_shared_pvref(a)   Perl_save_shared_pvref(aTHX_ a)
 #define save_gp(a,b)   Perl_save_gp(aTHX_ a,b)
 #define save_hash(a)   

[perl.git] branch blead, updated. v5.13.4-304-g1a7c1a8

2010-09-16 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/1a7c1a8ac3571ba89254e7a8641c72a66c90b463?hp=defdfed5e6b9e2f8b9451febd0406ed351042bb9

- Log -
commit 1a7c1a8ac3571ba89254e7a8641c72a66c90b463
Author: Rainer Tammer tam...@tammer.net
Date:   Thu Sep 16 09:22:52 2010 +0200

Add info regarding AIX 7.1
---

Summary of changes:
 README.aix |   66 ++-
 1 files changed, 34 insertions(+), 32 deletions(-)

diff --git a/README.aix b/README.aix
index dfcf0c6..8f56e2f 100644
--- a/README.aix
+++ b/README.aix
@@ -33,12 +33,12 @@ like DBD::Oracle, it is better to use the _r version of the 
compiler.
 This will not build a threaded Perl, but a thread-enabled Perl. See
 also LThreaded Perl later on.
 
-As of writing (2010-05) only the IIBM XL C for AIX or IIBM XL C/C++
-for AIX compiler is supported by IBM on AIX 5L/6.1.
+As of writing (2010-09) only the IIBM XL C for AIX or IIBM XL C/C++
+for AIX compiler is supported by IBM on AIX 5L/6.1/7.1.
 
 The following compiler versions are currently supported by IBM:
 
-IBM XL C and IBM XL C/C++ V8, V9, V10
+IBM XL C and IBM XL C/C++ V8, V9, V10, V11
 
 The XL C for AIX is integrated in the XL C/C++ for AIX compiler and
 therefore also supported.
@@ -50,8 +50,8 @@ adding -qipa to the optimization flags (-Doptimize='-O 
-qipa').
 The PTF for APAR IZ35785 which solves this problem is available
 from IBM (April 2009 PTF for XL C/C++ Enterprise Edition for AIX, V9.0).
 
-If you choose XL C/C++ V11 you need the April 2010 PTF installed
-otherwise you will not get a working Perl version.
+If you choose XL C/C++ V11 you need the April 2010 PTF (or newer)
+installed otherwise you will not get a working Perl version.
 
 Perl can be compiled with either IBM's ANSI C compiler or with gcc.
 The former is recommended, as not only it can compile Perl with no
@@ -73,22 +73,24 @@ wanted libraries if the presence of one of these two header 
files is
 detected. If you want to build Perl with GDBM support then please install
 at least gdbm-devel-1.8.3-5 (or higher).
 
-=head2 Perl 5.12 was successfully compiled and tested on:
-
-AIX Level| Compiler Level| w th | w/o th
--+---+--+---
-5.1 TL9 32 bit   | XL C/C++ V7   | OK   | OK
-5.1 TL9 64 bit   | XL C/C++ V7   | OK   | OK
-5.2 TL10 SP8 32 bit  | XL C/C++ V8   | OK   | OK
-5.2 TL10 SP8 32 bit  | gcc 3.2.2 | OK   | OK
-5.2 TL10 SP8 64 bit  | XL C/C++ V8   | OK   | OK
-5.3 TL8 SP8 32 bit   | XL C/C++ V9 + IZ35785 | OK   | OK
-5.3 TL8 SP8 32 bit   | gcc 4.2.4 | OK   | OK
-5.3 TL8 SP8 64 bit   | XL C/C++ V9 + IZ35785 | OK   | OK
-5.3 TL10 SP3 32 bit  | XL C/C++ V11 + April 2010 | OK   | OK
-5.3 TL10 SP3 64 bit  | XL C/C++ V11 + April 2010 | OK   | OK
-6.1 TL1 SP7 32 bit   | XL C/C++ V10  | OK   | OK
-6.1 TL1 SP7 64 bit   | XL C/C++ V10  | OK   | OK
+=head2 Perl 5 was successfully compiled and tested on:
+
+Perl   | AIX Level   | Compiler Level  | w th | w/o th
+---+-+-+--+---
+5.12.2 |5.1 TL9 32 bit   | XL C/C++ V7 | OK   | OK
+5.12.2 |5.1 TL9 64 bit   | XL C/C++ V7 | OK   | OK
+5.12.2 |5.2 TL10 SP8 32 bit  | XL C/C++ V8 | OK   | OK
+5.12.2 |5.2 TL10 SP8 32 bit  | gcc 3.2.2   | OK   | OK
+5.12.2 |5.2 TL10 SP8 64 bit  | XL C/C++ V8 | OK   | OK
+5.12.2 |5.3 TL8 SP8 32 bit   | XL C/C++ V9 + IZ35785   | OK   | OK
+5.12.2 |5.3 TL8 SP8 32 bit   | gcc 4.2.4   | OK   | OK
+5.12.2 |5.3 TL8 SP8 64 bit   | XL C/C++ V9 + IZ35785   | OK   | OK
+5.12.2 |5.3 TL10 SP3 32 bit  | XL C/C++ V11 + Apr 2010 | OK   | OK
+5.12.2 |5.3 TL10 SP3 64 bit  | XL C/C++ V11 + Apr 2010 | OK   | OK
+5.12.2 |6.1 TL1 SP7 32 bit   | XL C/C++ V10| OK   | OK
+5.12.2 |6.1 TL1 SP7 64 bit   | XL C/C++ V10| OK   | OK
+5.13   |7.1 TL0 SP1 32 bit   | XL C/C++ V11 + Jul 2010 | OK   | OK
+5.13   |7.1 TL0 SP1 64 bit   | XL C/C++ V11 + Jul 2010 | OK   | OK
 
 w th   = with thread support
 w/o th = without thread support
@@ -123,19 +125,19 @@ Should yield no problems.
 
 =head2 Threaded Perl
 
-Should yield no problems with AIX 5.1 / 5.2 / 5.3 and 6.1.
+Should yield no problems with AIX 5.1 / 5.2 / 5.3 / 6.1 / 7.1.
 
 IBM uses the AIX system Perl (V5.6.0 on AIX 5.1 and V5.8.2 on
-AIX 5.2 / 5.3 and 6.1; V5.8.8 on AIX 5.3 TL11 and AIX 6.1 TL4) for
-some AIX system scripts. If you switch the links in /usr/bin from the
-AIX system Perl (/usr/opt/perl5) to the newly build Perl 

[perl.git] branch blead, updated. v5.13.4-307-geb06eac

2010-09-16 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/eb06eac93f0120092363c6c7ba87bb7054e76844?hp=1a7c1a8ac3571ba89254e7a8641c72a66c90b463

- Log -
commit eb06eac93f0120092363c6c7ba87bb7054e76844
Author: Father Chrysostomos spr...@cpan.org
Date:   Thu Sep 16 14:09:17 2010 +0200

Fix Wide character in warn warning

M   doio.c
M   t/op/warn.t

commit 83c64918110c20f99f55c77d9dfc27f217fb
Author: Father Chrysostomos spr...@cpan.org
Date:   Thu Sep 16 14:07:50 2010 +0200

Fix warn to respect utf8-encoded scalars [perl #45549]

M   t/op/warn.t
M   util.c

commit 95961f2bb1706f8782e09e22425d5958169ef5cd
Author: Father Chrysostomos spr...@cpan.org
Date:   Thu Sep 16 14:07:13 2010 +0200

change warn.t to use test.pl

M   t/op/warn.t
---

Summary of changes:
 doio.c  |2 +-
 t/op/warn.t |   55 ---
 util.c  |4 +---
 3 files changed, 46 insertions(+), 15 deletions(-)

diff --git a/doio.c b/doio.c
index 5f57b38..2f660cc 100644
--- a/doio.c
+++ b/doio.c
@@ -1241,7 +1241,7 @@ Perl_do_print(pTHX_ register SV *sv, PerlIO *fp)
else {
assert((char *)result == tmps);
Perl_ck_warner_d(aTHX_ packWARN(WARN_UTF8),
-Wide character in print);
+Wide character in %s, OP_DESC(PL_op));
}
}
/* To detect whether the process is about to overstep its
diff --git a/t/op/warn.t b/t/op/warn.t
index ec3b9ca..b47bd90 100644
--- a/t/op/warn.t
+++ b/t/op/warn.t
@@ -1,12 +1,14 @@
 #!./perl
 #line 3 warn.t
 
-print 1..18\n;
-my $test_num = 0;
-sub ok {
-print $_[0] ?  : not , ok , ++$test_num, \n;
+BEGIN {
+chdir 't' if -d 't';
+@INC = '../lib';
+require './test.pl';
 }
 
+plan 21;
+
 my @warnings;
 my $wa = []; my $ea = [];
 $SIG{__WARN__} = sub { push @warnings, $_[0] };
@@ -24,7 +26,7 @@ ok @warnings==1  $warnings[0] eq foobar\n;
 @warnings = ();
 $@ = ;
 warn foo;
-ok @warnings==1  $warnings[0] eq foo at warn.t line 26.\n;
+ok @warnings==1  $warnings[0] eq foo at warn.t line 28.\n;
 
 @warnings = ();
 $@ = ;
@@ -35,13 +37,13 @@ ok @warnings==1  ref($warnings[0]) eq ARRAY  
$warnings[0] == $wa;
 $@ = ;
 warn ;
 ok @warnings==1 
-$warnings[0] eq Warning: something's wrong at warn.t line 36.\n;
+$warnings[0] eq Warning: something's wrong at warn.t line 38.\n;
 
 @warnings = ();
 $@ = ;
 warn;
 ok @warnings==1 
-$warnings[0] eq Warning: something's wrong at warn.t line 42.\n;
+$warnings[0] eq Warning: something's wrong at warn.t line 44.\n;
 
 @warnings = ();
 $@ = ERR\n;
@@ -56,7 +58,7 @@ ok @warnings==1  $warnings[0] eq foobar\n;
 @warnings = ();
 $@ = ERR\n;
 warn foo;
-ok @warnings==1  $warnings[0] eq foo at warn.t line 58.\n;
+ok @warnings==1  $warnings[0] eq foo at warn.t line 60.\n;
 
 @warnings = ();
 $@ = ERR\n;
@@ -67,13 +69,13 @@ ok @warnings==1  ref($warnings[0]) eq ARRAY  
$warnings[0] == $wa;
 $@ = ERR\n;
 warn ;
 ok @warnings==1 
-$warnings[0] eq ERR\n\t...caught at warn.t line 68.\n;
+$warnings[0] eq ERR\n\t...caught at warn.t line 70.\n;
 
 @warnings = ();
 $@ = ERR\n;
 warn;
 ok @warnings==1 
-$warnings[0] eq ERR\n\t...caught at warn.t line 74.\n;
+$warnings[0] eq ERR\n\t...caught at warn.t line 76.\n;
 
 @warnings = ();
 $@ = $ea;
@@ -88,7 +90,7 @@ ok @warnings==1  $warnings[0] eq foobar\n;
 @warnings = ();
 $@ = $ea;
 warn foo;
-ok @warnings==1  $warnings[0] eq foo at warn.t line 90.\n;
+ok @warnings==1  $warnings[0] eq foo at warn.t line 92.\n;
 
 @warnings = ();
 $@ = $ea;
@@ -105,4 +107,35 @@ $@ = $ea;
 warn;
 ok @warnings==1  ref($warnings[0]) eq ARRAY  $warnings[0] == $ea;
 
+fresh_perl_like(
+ '
+   $a = \xee\n;
+   print STDERR $a; warn $a;
+   utf8::upgrade($a);
+   print STDERR $a; warn $a;
+ ',
+  qr/^\xee(?:\r?\n\xee){3}/,
+  {},
+ 'warn emits logical characters, not internal bytes [perl #45549]'  
+);
+
+fresh_perl_like(
+ '
+   $a = \xee\n;
+   print STDERR $a; warn $a;
+   utf8::upgrade($a);
+   print STDERR $a; warn $a;
+ ',
+  qr/^\xc3\xae(?:\r?\n\xc3\xae){3}/,
+  { switches = ['-CE'] },
+ 'warn respects :utf8 layer'
+);
+
+fresh_perl_like(
+ 'warn chr 300',
+  qr/^Wide character in warn .*\n\xc4\xac at /,
+  {},
+ 'Wide character in warn (not print)'
+);
+
 1;
diff --git a/util.c b/util.c
index 1809f70..2ab14d7 100644
--- a/util.c
+++ b/util.c
@@ -1399,10 +1399,8 @@ Perl_write_to_stderr(pTHX_ SV* msv)
dSAVED_ERRNO;
 #endif
PerlIO * const serr = Perl_error_log;
-   STRLEN msglen;
-   const char* message = SvPVx_const(msv, msglen);
 
-   PERL_WRITE_MSG_TO_CONSOLE(serr, message, msglen);
+   do_print(msv, serr);
(void)PerlIO_flush(serr);
 #ifdef USE_SFIO
RESTORE_ERRNO;

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.4-308-gc99e91e

2010-09-16 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/c99e91e919b4bb89bab7829a9026ee01b1fff2a1?hp=eb06eac93f0120092363c6c7ba87bb7054e76844

- Log -
commit c99e91e919b4bb89bab7829a9026ee01b1fff2a1
Author: Karl Williamson k...@khw-desktop.(none)
Date:   Sun Jul 18 12:28:14 2010 -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.
---

Summary of changes:
 handy.h|5 +
 pod/perlop.pod |3 ---
 regcomp.c  |   14 +-
 t/lib/warnings/regcomp |   13 +
 t/re/re_tests  |   15 +++
 5 files changed, 42 insertions(+), 8 deletions(-)

diff --git a/handy.h b/handy.h
index a1d753d..e091a9b 100644
--- a/handy.h
+++ b/handy.h
@@ -455,6 +455,10 @@ whitespace.
 Returns a boolean indicating whether the C Cchar is a US-ASCII (Basic Latin)
 digit.
 
+=for apidoc Am|bool|isOCTAL|char ch
+Returns a boolean indicating whether the C Cchar is a US-ASCII (Basic Latin)
+octal digit, [0-7].
+
 =for apidoc Am|bool|isUPPER|char ch
 Returns a boolean indicating whether the C Cchar is a US-ASCII (Basic Latin)
 uppercase character.
@@ -516,6 +520,7 @@ patched there.  The file as of this writing is 
cpan/Devel-PPPort/parts/inc/misc
 #define isPSXSPC(c)(isSPACE(c) || (c) == '\v')
 #define isBLANK(c) ((c) == ' ' || (c) == '\t')
 #define isDIGIT(c) ((c) = '0'  (c) = '9')
+#define isOCTAL(c) ((c) = '0'  (c) = '7')
 #ifdef EBCDIC
 /* In EBCDIC we do not do locales: therefore() isupper() is fine. */
 #   define isUPPER(c)  isupper(c)
diff --git a/pod/perlop.pod b/pod/perlop.pod
index 08da209..cb0a291 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -1141,9 +1141,6 @@ the left with zeros to make three digits.  For larger 
ordinals, either use
 C\o{} , or convert to someething else, such as to hex and use C\x{}
 instead.
 
-A backslash followed by a non-octal digit in a bracketed character class
-(C[\8] or C[\9]) will be interpreted as a NULL character and the digit.
-
 Having fewer than 3 digits may lead to a misleading warning message that says
 that what follows is ignored.  For example, C\128 in the ASCII character 
set
 is equivalent to the two characters C\n8, but the warning CIllegal octal
diff --git a/regcomp.c b/regcomp.c
index 13f82e2..1b4e1be 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -7555,8 +7555,9 @@ tryagain:
case '0': case '1': case '2': case '3':case '4':
case '5': case '6': case '7': case '8':case '9':
if (*p == '0' ||
- (isDIGIT(p[1])  atoi(p) = RExC_npar) ) {
-I32 flags = 0;
+   (isOCTAL(p[1])  atoi(p) = RExC_npar))
+   {
+   I32 flags = PERL_SCAN_SILENT_ILLDIGIT;
STRLEN numlen = 3;
ender = grok_oct(p, numlen, flags, NULL);
if (ender  0xff) {
@@ -8179,9 +8180,10 @@ parseit:
value = grok_bslash_c(*RExC_parse++, SIZE_ONLY);
break;
case '0': case '1': case '2': case '3': case '4':
-   case '5': case '6': case '7': case '8': case '9':
+   case '5': case '6': case '7':
{
-   I32 flags = 0;
+   /* Take 1-3 octal digits */
+   I32 flags = PERL_SCAN_SILENT_ILLDIGIT;
numlen = 3;
value = grok_oct(--RExC_parse, numlen, flags, NULL);
RExC_parse += numlen;
@@ -8199,10 +8201,12 @@ parseit:
break;
}
default:
-   if (!SIZE_ONLY  isALPHA(value))
+   /* Allow \_ to not give an error */
+   if (!SIZE_ONLY  isALNUM(value)  value != '_') {
ckWARN2reg(RExC_parse,
   Unrecognized escape \\%c in character class 
passed through,
   (int)value);
+   }
break;
}
} /* end of \blah */
diff --git a/t/lib/warnings/regcomp b/t/lib/warnings/regcomp
index 6bc6845..98280f6 100644
--- a/t/lib/warnings/regcomp
+++ b/t/lib/warnings/regcomp
@@ -237,3 +237,16 @@ Missing braces on \o{} in regex; marked by -- HERE in 
m/[\o -- HERE ]/ at - li
 $a = qr/[\o{}]/;
 EXPECT
 Number with no digits in regex; marked by -- HERE in m/[\o{} -- HERE ]/ at - 
line 2.
+
+# regcomp.c [S_regclass]
+use warnings 'regexp' ;
+$a = qr/[\8\9]/;
+$a = qr/[\_\0]/; # 

[perl.git] branch blead, updated. v5.13.4-225-g526fd1b

2010-09-13 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/526fd1b4d7270fff44588238f2411032c109da6e?hp=25222ff958727e01a3a480924b65ba188c7c3ea2

- Log -
commit 526fd1b4d7270fff44588238f2411032c109da6e
Author: Father Chrysostomos spr...@cpan.org
Date:   Mon Sep 13 09:57:15 2010 +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.
---

Summary of changes:
 ext/PerlIO-scalar/scalar.xs |7 +++
 perlio.c|2 +-
 t/io/open.t |   12 +++-
 3 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/ext/PerlIO-scalar/scalar.xs b/ext/PerlIO-scalar/scalar.xs
index f2481f4..b93b9e9 100644
--- a/ext/PerlIO-scalar/scalar.xs
+++ b/ext/PerlIO-scalar/scalar.xs
@@ -47,9 +47,15 @@ PerlIOScalar_pushed(pTHX_ PerlIO * f, const char *mode, SV * 
arg,
 SvUPGRADE(s-var, SVt_PV);
 code = PerlIOBase_pushed(aTHX_ f, mode, Nullsv, tab);
 if (!SvOK(s-var) || (PerlIOBase(f)-flags)  PERLIO_F_TRUNCATE)
+{
+   sv_force_normal(s-var);
SvCUR_set(s-var, 0);
+}
 if ((PerlIOBase(f)-flags)  PERLIO_F_APPEND)
+{
+   sv_force_normal(s-var);
s-posn = SvCUR(s-var);
+}
 else
s-posn = 0;
 SvSETMAGIC(s-var);
@@ -166,6 +172,7 @@ PerlIOScalar_write(pTHX_ PerlIO * f, const void *vbuf, 
Size_t count)
SV *sv = s-var;
char *dst;
SvGETMAGIC(sv);
+   sv_force_normal(sv);
if ((PerlIOBase(f)-flags)  PERLIO_F_APPEND) {
dst = SvGROW(sv, SvCUR(sv) + count);
offset = SvCUR(sv);
diff --git a/perlio.c b/perlio.c
index c83b2bb..79b7efa 100644
--- a/perlio.c
+++ b/perlio.c
@@ -1449,7 +1449,7 @@ PerlIO_layer_from_ref(pTHX_ SV *sv)
 /*
  * For any scalar type load the handler which is bundled with perl
  */
-if (SvTYPE(sv)  SVt_PVAV  !isGV_with_GP(sv)) {
+if (SvTYPE(sv)  SVt_PVAV  (!isGV_with_GP(sv) || SvFAKE(sv))) {
PerlIO_funcs *f = PerlIO_find_layer(aTHX_ STR_WITH_LEN(scalar), 1);
/* This isn't supposed to happen, since PerlIO::scalar is core,
 * but could happen anyway in smaller installs or with PAR */
diff --git a/t/io/open.t b/t/io/open.t
index 01bfaca..5bbcb0b 100644
--- a/t/io/open.t
+++ b/t/io/open.t
@@ -10,7 +10,7 @@ $|  = 1;
 use warnings;
 use Config;
 
-plan tests = 110;
+plan tests = 111;
 
 my $Perl = which_perl();
 
@@ -337,3 +337,13 @@ fresh_perl_is(
 ',
 'ok', { stderr = 1 },
 '[perl #77492]: open $fh, , \*glob causes SEGV');
+
+# [perl #77684] Opening a reference to a glob copy.
+{
+my $var = *STDOUT;
+open my $fh, , \$var;
+print $fh hello;
+is $var, hello, '[perl #77684]: open $fh, , \$glob_copy'
+# when this fails, it leaves an extra file:
+or unlink \*STDOUT;
+}

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.4-227-g4125141

2010-09-13 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/4125141464884619e852c7b0986a51eba8fe1636?hp=526fd1b4d7270fff44588238f2411032c109da6e

- Log -
commit 4125141464884619e852c7b0986a51eba8fe1636
Author: Karl Williamson pub...@khwilliamson.com
Date:   Tue Aug 31 20:20:01 2010 -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.

M   handy.h

commit cf301eb7d17e4d58d25337e997b1c7b0133e3c91
Author: Karl Williamson pub...@khwilliamson.com
Date:   Tue Aug 31 19:34:50 2010 -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.

M   handy.h
---

Summary of changes:
 handy.h |   34 +++---
 1 files changed, 27 insertions(+), 7 deletions(-)

diff --git a/handy.h b/handy.h
index bbeb1ff..a1d753d 100644
--- a/handy.h
+++ b/handy.h
@@ -482,6 +482,20 @@ patched there.  The file as of this writing is 
cpan/Devel-PPPort/parts/inc/misc
 
 */
 
+/* FITS_IN_8_BITS(c) returns true if c occupies no more than 8 bits.  It is
+ * designed to be hopefully bomb-proof, making sure that no bits of
+ * information are lost even on a 64-bit machine, but to get the compiler to
+ * optimize it out if possible.  This is because Configure makes sure that the
+ * machine has an 8-bit byte, so if c is stored in a byte, the sizeof()
+ * guarantees that this evaluates to a constant true at compile time.  The use
+ * of the mask instead of ' 256' keeps gcc from complaining that it is alway
+ * true, when c's storage class is a byte */
+#ifdef HAS_QUAD
+#  define FITS_IN_8_BITS(c) ((sizeof(c) == 1) || (((U64)(c)  0xFF) == 
(U64)(c)))
+#else
+#  define FITS_IN_8_BITS(c) ((sizeof(c) == 1) || (((U32)(c)  0xFF) == 
(U32)(c)))
+#endif
+
 #define isALNUM(c) (isALPHA(c) || isDIGIT(c) || (c) == '_')
 #define isIDFIRST(c)   (isALPHA(c) || (c) == '_')
 #define isALPHA(c) (isUPPER(c) || isLOWER(c))
@@ -514,9 +528,7 @@ patched there.  The file as of this writing is 
cpan/Devel-PPPort/parts/inc/misc
 #   define isPUNCT(c)  ispunct(c)
 #   define isXDIGIT(c) isxdigit(c)
 #   define toUPPER(c)  toupper(c)
-#   define toUPPER_LATIN1_MOD(c)UNI_TO_NATIVE(PL_mod_latin1_uc[(U8) 
NATIVE_TO_UNI(c)])
 #   define toLOWER(c)  tolower(c)
-#   define toLOWER_LATIN1(c)   UNI_TO_NATIVE(PL_latin1_lc[(U8) 
NATIVE_TO_UNI(c)])
 #else
 #   define isUPPER(c)  ((c) = 'A'  (c) = 'Z')
 #   define isLOWER(c)  ((c) = 'a'  (c) = 'z')
@@ -528,12 +540,20 @@ patched there.  The file as of this writing is 
cpan/Devel-PPPort/parts/inc/misc
 #   define isPUNCT(c)  (((c) = 33  (c) = 47) || ((c) = 58  (c) = 64)  
|| ((c) = 91  (c) = 96) || ((c) = 123  (c) = 126))
 #   define isXDIGIT(c)  (isDIGIT(c) || ((c) = 'a'  (c) = 'f') || ((c) = 
'A'  (c) = 'F'))
 
-/* Use table lookup for speed */
-#   define toLOWER_LATIN1(c)   (PL_latin1_lc[(U8) c])
 
-/* Modified uc.  Is correct uc except for three non-ascii chars which are
- * all mapped to one of them, and these need special handling */
-#   define toUPPER_LATIN1_MOD(c)(PL_mod_latin1_uc[(U8) c])
+/* Use table lookup for speed; return error character for input
+ * out-of-range */
+#   define toLOWER_LATIN1(c)(FITS_IN_8_BITS(c)\
+? UNI_TO_NATIVE(PL_latin1_lc[ \
+  NATIVE_TO_UNI( (U8) (c)) ]) \
+: UNICODE_REPLACEMENT)
+/* Modified uc.  Is correct uc except for three non-ascii chars which are
+ * all mapped to one of them, and these need special handling; error
+ * character for input out-of-range */
+#   define toUPPER_LATIN1_MOD(c) (FITS_IN_8_BITS(c)   \
+ ? UNI_TO_NATIVE(PL_mod_latin1_uc[\
+  NATIVE_TO_UNI( (U8) (c)) ]) \
+ : UNICODE_REPLACEMENT)
 
 /* ASCII casing. */
 #   define toUPPER(c)  (isLOWER(c) ? (c) - ('a' - 'A') : (c))

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.4-230-gbbd61b5

2010-09-13 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/bbd61b5ffb7621c2fcb7c3dd1beba837f27a9b40?hp=4125141464884619e852c7b0986a51eba8fe1636

- Log -
commit bbd61b5ffb7621c2fcb7c3dd1beba837f27a9b40
Author: Karl Williamson pub...@khwilliamson.com
Date:   Wed Sep 1 11:40:32 2010 -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.

M   regcomp.c

commit 62fed28b592e017778cf07b732b66755ea7b0b61
Author: Karl Williamson pub...@khwilliamson.com
Date:   Wed Sep 1 10:32:44 2010 -0600

regcomp.c: Macroize changing regex to utf8

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

M   regcomp.c

commit fda99beead8afb9b424281d2aec5c49ca3d3cf78
Author: Karl Williamson pub...@khwilliamson.com
Date:   Wed Sep 1 10:18:20 2010 -0600

regcomp.c: Clarify and typos in comments

M   regcomp.c
---

Summary of changes:
 regcomp.c |   90 
 1 files changed, 60 insertions(+), 30 deletions(-)

diff --git a/regcomp.c b/regcomp.c
index 43b881d..2ad4df9 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -196,7 +196,10 @@ typedef struct RExC_state_t {
  */
 #defineWORST   0   /* Worst case. */
 #defineHASWIDTH0x01/* Known to match non-null strings. */
-#defineSIMPLE  0x02/* Simple enough to be STAR/PLUS 
operand. */
+
+/* Simple enough to be STAR/PLUS operand, in an EXACT node must be a single
+ * character, and if utf8, must be invariant. */
+#defineSIMPLE  0x02
 #defineSPSTART 0x04/* Starts with * or +. */
 #define TRYAGAIN   0x08/* Weeded out a declaration. */
 #define POSTPONED  0x10/* (?1),(?name), (??{...}) or similar */
@@ -218,6 +221,11 @@ typedef struct RExC_state_t {
 #define PAREN_SET(u8str,paren) PBYTE(u8str,paren) |= PBITVAL(paren)
 #define PAREN_UNSET(u8str,paren) PBYTE(u8str,paren) = (~PBITVAL(paren))
 
+/* If not already in utf8, do a longjmp back to the beginning */
+#define UTF8_LONGJMP 42 /* Choose a value not likely to ever conflict */
+#define REQUIRE_UTF8   STMT_START {   \
+ if (! UTF) JMPENV_JUMP(UTF8_LONGJMP); \
+} STMT_END
 
 /* About scan_data_t.
 
@@ -3289,11 +3297,11 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode 
**scanp,
 
 #ifdef DEBUGGING
OP(nxt1 + 1) = OPTIMIZED; /* was count. */
-   NEXT_OFF(nxt1+ 1) = 0; /* just for consistancy. */
-   NEXT_OFF(nxt2) = 0; /* just for consistancy with CURLY. */
+   NEXT_OFF(nxt1+ 1) = 0; /* just for consistency. */
+   NEXT_OFF(nxt2) = 0; /* just for consistency with CURLY. */
OP(nxt) = OPTIMIZED;/* was CLOSE. */
OP(nxt + 1) = OPTIMIZED; /* was count. */
-   NEXT_OFF(nxt+ 1) = 0; /* just for consistancy. */
+   NEXT_OFF(nxt+ 1) = 0; /* just for consistency. */
 #endif
}
  nogo:
@@ -4269,6 +4277,8 @@ Perl_re_compile(pTHX_ SV * const pattern, U32 pm_flags)
 I32 minlen = 0;
 I32 sawplus = 0;
 I32 sawopen = 0;
+U8 jump_ret = 0;
+dJMPENV;
 scan_data_t data;
 RExC_state_t RExC_state;
 RExC_state_t * const pRExC_state = RExC_state;
@@ -4292,7 +4302,37 @@ Perl_re_compile(pTHX_ SV * const pattern, U32 pm_flags)
   PL_colors[4],PL_colors[5],s);
 });
 
-redo_first_pass:
+/* Longjmp back to here if have to switch in midstream to utf8 */
+if (! RExC_orig_utf8) {
+

[perl.git] branch blead, updated. v5.13.4-231-gd369344

2010-09-13 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/d3693443d89a8951539475ab5b79d99f37fa782b?hp=bbd61b5ffb7621c2fcb7c3dd1beba837f27a9b40

- Log -
commit d3693443d89a8951539475ab5b79d99f37fa782b
Author: Bram p...@perl.wizbit.be
Date:   Sat Feb 27 23:46:46 2010 +0100

Add tests for 72922.

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

Summary of changes:
 t/re/qr.t |   63 -
 1 files changed, 62 insertions(+), 1 deletions(-)

diff --git a/t/re/qr.t b/t/re/qr.t
index 68fddf1..c7461d4 100644
--- a/t/re/qr.t
+++ b/t/re/qr.t
@@ -6,7 +6,7 @@ BEGIN {
 require './test.pl';
 }
 
-plan tests = 5;
+plan tests = 6;
 
 my $rx = qr//;
 
@@ -81,3 +81,64 @@ for($'){
  $flile =~ qr/(?:)/;
  is $scratch, [fetching], '/$qr/ with magical LHS';
 }
+
+{
+# [perl 72922]: A 'copy' of a Regex object which has magic should not crash
+# When a Regex object was copied and the copy weaken then the original 
regex object
+# could no longer be 'copied' with qr//
+
+my $prog = tempfile();
+open my $fh, , $prog or die Can't write to tempfile;
+print $fh 'EOTEST';
+require ./test.pl;
+$verbose = 1;
+use Scalar::Util 'weaken';
+sub s1 {
+my $re = qr/abcdef/;
+my $re_copy1 = $re;
+my $re_weak_copy = $re;;
+weaken($re_weak_copy);
+my $re_copy2 = qr/$re/;
+
+my $str_re = $re;
+is($$re_weak_copy, $str_re, weak copy equals original);
+is($re_copy1, $str_re, copy1 equals original);
+is($re_copy2, $str_re, copy2 equals original);
+
+my $refcnt_start = Internals::SvREFCNT($$re_weak_copy);
+
+undef $re;
+is(Internals::SvREFCNT($$re_weak_copy), $refcnt_start - 1, refcnt 
decreased);
+is($re_weak_copy, $str_re, weak copy still equals original);
+
+undef $re_copy2;
+is(Internals::SvREFCNT($$re_weak_copy), $refcnt_start - 1, refcnt not 
decreased);
+is($re_weak_copy, $str_re, weak copy still equals original);
+}
+s1();
+s1();
+EOTEST
+close $fh;
+
+my $out = runperl(stderr = 1, progfile = $prog);
+unlink $prog;
+
+my $expected = 'EOOUT';
+ok 1 - weak copy equals original
+ok 2 - copy1 equals original
+ok 3 - copy2 equals original
+ok 4 - refcnt decreased
+ok 5 - weak copy still equals original
+ok 6 - refcnt not decreased
+ok 7 - weak copy still equals original
+ok 8 - weak copy equals original
+ok 9 - copy1 equals original
+ok 10 - copy2 equals original
+ok 11 - refcnt decreased
+ok 12 - weak copy still equals original
+ok 13 - refcnt not decreased
+ok 14 - weak copy still equals original
+EOOUT
+
+is ($out, $expected, '[perl #72922] copy of a regex of which a weak copy 
exist');
+}

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.4-232-g704f71b

2010-09-13 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/704f71be23bfe26b12807102a4880855eef362d0?hp=d3693443d89a8951539475ab5b79d99f37fa782b

- Log -
commit 704f71be23bfe26b12807102a4880855eef362d0
Author: Bram p...@perl.wizbit.be
Date:   Mon Sep 13 14:43:36 2010 +0200

Extra tests for a regex followed by an operator or a statement modifier.

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

Summary of changes:
 t/re/pat.t |   37 -
 1 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/t/re/pat.t b/t/re/pat.t
index 447ac8f..ba0efcd 100644
--- a/t/re/pat.t
+++ b/t/re/pat.t
@@ -23,7 +23,7 @@ BEGIN {
 }
 
 
-plan tests = 366;  # Update this when adding/deleting tests.
+plan tests = 385;  # Update this when adding/deleting tests.
 
 run_tests() unless caller;
 
@@ -1044,6 +1044,41 @@ sub run_tests {
 
 }
 
+{
+# Test that a regex followed by an operator and/or a statement 
modifier work
+# These tests use string-eval so that it reports a clean error when it 
fails
+# (without the string eval the test script might be unparseable)
+
+# Note: these test check the behaviour that currently is valid syntax
+# If a new regex modifier is added and a test fails then there is a 
backwards-compatibilty issue
+# Note-2: a new deprecate warning was added for this with commit 
e6897b1a5db0410e387ccbf677e89fc4a1d8c97a
+# which indicate that this syntax will be removed in 5.16.
+# When this happens the tests can be removed
+
+no warnings 'syntax';
+iseq( eval q#my $r = a =~ m/a/lt 2;eval_ok $r#, eval_ok 1, 
regex (m//) followed by lt);
+iseq( eval q#my $r = a =~ m/a/le 1;eval_ok $r#, eval_ok 1, 
regex (m//) followed by le);
+iseq( eval q#my $r = a =~ m/a/eq 1;eval_ok $r#, eval_ok 1, 
regex (m//) followed by eq);
+iseq( eval q#my $r = a =~ m/a/ne 0;eval_ok $r#, eval_ok 1, 
regex (m//) followed by ne);
+iseq( eval q#my $r = a =~ m/a/and 1;eval_ok $r#, eval_ok 1, 
regex (m//) followed by and);
+iseq( eval q#my $r = a =~ m/a/unless 0;eval_ok $r#, eval_ok 1, 
regex (m//) followed by unless);
+iseq( eval q#my $c = 1; my $r; $r = a =~ m/a/while $c--;eval_ok 
$r#, eval_ok 1, regex (m//) followed by while);
+iseq( eval q#my $c = 0; my $r; $r = a =~ m/a/until $c++;eval_ok 
$r#, eval_ok 1, regex (m//) followed by until);
+iseq( eval q#my $r; $r = a =~ m/a/for 1;eval_ok $r#, eval_ok 1, 
regex (m//) followed by for);
+iseq( eval q#my $r; $r = a =~ m/a/foreach 1;eval_ok $r#, eval_ok 
1, regex (m//) followed by foreach);
+
+iseq( eval q#my $t = a; my $r = $t =~ s/a//lt 2;eval_ok $r#, 
eval_ok 1, regex (s///) followed by lt);
+iseq( eval q#my $t = a; my $r = $t =~ s/a//le 1;eval_ok $r#, 
eval_ok 1, regex (s///) followed by le);
+iseq( eval q#my $t = a; my $r = $t =~ s/a//ne 0;eval_ok $r#, 
eval_ok 1, regex (s///) followed by ne);
+iseq( eval q#my $t = a; my $r = $t =~ s/a//and 1;eval_ok $r#, 
eval_ok 1, regex (s///) followed by and);
+iseq( eval q#my $t = a; my $r = $t =~ s/a//unless 0;eval_ok $r#, 
eval_ok 1, regex (s///) followed by unless);
+
+iseq( eval q#my $c = 1; my $r; my $t = a; $r = $t =~ s/a//while 
$c--;eval_ok $r#, eval_ok 1, regex (s///) followed by while);
+iseq( eval q#my $c = 0; my $r; my $t = a; $r = $t =~ s/a//until 
$c++;eval_ok $r#, eval_ok 1, regex (s///) followed by until);
+iseq( eval q#my $r; my $t = a; $r = $t =~ s/a//for 1;eval_ok $r#, 
eval_ok 1, regex (s///) followed by for);
+iseq( eval q#my $r; my $t = a; $r = $t =~ s/a//for 1;eval_ok $r#, 
eval_ok 1, regex (s///) followed by foreach);
+}
+
 } # End of sub run_tests
 
 1;

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.4-235-g7d926cf

2010-09-13 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/7d926cfad45d0fd1b9546391623278b92d3e4757?hp=340458b54f884968f1f78789d57137d34f239152

- Log -
commit 7d926cfad45d0fd1b9546391623278b92d3e4757
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Mon Sep 13 15:15:40 2010 +0200

Bump Safe's VERSION to 2.28

M   dist/Safe/Changes
M   dist/Safe/META.yml
M   dist/Safe/Safe.pm

commit 7650682f4377a73dc7c46a6c3b8113a5f987c902
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Mon Sep 13 15:11:27 2010 +0200

Avoid infinite loop in _find_code_refs.

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

M   dist/Safe/Safe.pm
M   dist/Safe/t/safewrap.t
---

Summary of changes:
 dist/Safe/Changes  |4 
 dist/Safe/META.yml |4 ++--
 dist/Safe/Safe.pm  |   10 --
 dist/Safe/t/safewrap.t |   11 ++-
 4 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/dist/Safe/Changes b/dist/Safe/Changes
index a00878b..7dc1c1d 100644
--- a/dist/Safe/Changes
+++ b/dist/Safe/Changes
@@ -1,3 +1,7 @@
+2.28 Mon Sep 13 2010
+- Avoid infinite loop in _find_code_refs.
+  Patch by Yasushi Nakajima (rt.cpan.org #61262)
+
 2.27 Thu Apr 29 2010
 - Wrap coderefs returned by reval() and rdo()
 - Add even more version::vxs routines to the default share
diff --git a/dist/Safe/META.yml b/dist/Safe/META.yml
index 6718a37..8938397 100644
--- a/dist/Safe/META.yml
+++ b/dist/Safe/META.yml
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:   Safe
-version:2.27
+version:2.28
 abstract:   ~
 author:  []
 license:unknown
@@ -14,7 +14,7 @@ no_index:
 directory:
 - t
 - inc
-generated_by:   ExtUtils::MakeMaker version 6.56
+generated_by:   ExtUtils::MakeMaker version 6.57_05
 meta-spec:
 url:  http://module-build.sourceforge.net/META-spec-v1.4.html
 version:  1.4
diff --git a/dist/Safe/Safe.pm b/dist/Safe/Safe.pm
index bca4dfe..5d40528 100644
--- a/dist/Safe/Safe.pm
+++ b/dist/Safe/Safe.pm
@@ -2,9 +2,9 @@ package Safe;
 
 use 5.003_11;
 use strict;
-use Scalar::Util qw(reftype);
+use Scalar::Util qw(reftype refaddr);
 
-$Safe::VERSION = 2.27;
+$Safe::VERSION = 2.28;
 
 # *** Don't declare any lexicals above this point ***
 #
@@ -362,10 +362,12 @@ sub reval {
 return (wantarray) ? @subret : $subret[0];
 }
 
+my %OID;
 
 sub wrap_code_refs_within {
 my $obj = shift;
 
+%OID = ();
 $obj-_find_code_refs('wrap_code_ref', @_);
 }
 
@@ -377,6 +379,10 @@ sub _find_code_refs {
 for my $item (@_) {
 my $reftype = $item  reftype $item
 or next;
+
+# skip references already seen
+next if ++$OID{refaddr $item}  1;
+
 if ($reftype eq 'ARRAY') {
 $obj-_find_code_refs($visitor, @$item);
 }
diff --git a/dist/Safe/t/safewrap.t b/dist/Safe/t/safewrap.t
index 27166f8..b99f416 100644
--- a/dist/Safe/t/safewrap.t
+++ b/dist/Safe/t/safewrap.t
@@ -11,7 +11,7 @@ BEGIN {
 
 use strict;
 use Safe 1.00;
-use Test::More tests = 9;
+use Test::More tests = 10;
 
 my $safe = Safe-new('PLPerl');
 $safe-permit_only(qw(:default sort));
@@ -37,3 +37,12 @@ my $sub1w2 = $args[1][0][1]{sub};
 isnt $sub1w2, $sub1;
 is eval { $sub1w2-() }, undef;
 like $@, qr/eval .* trapped by operation mask/;
+
+# Avoid infinite recursion when looking for coderefs
+my $r = $safe-reval('END');
+%a = ();
+%b = (a = \%a);
+$a{b} = \%b;
+42;
+END
+is($r, 42);

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.4-238-gab3216d

2010-09-13 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/ab3216d918c7330bae0a9f1019f970db2c78f3c9?hp=9d88f05803089a7481b7fb4bef25d1e082b9803c

- Log -
commit ab3216d918c7330bae0a9f1019f970db2c78f3c9
Author: Aristotle Pagaltzis pagalt...@gmx.de
Date:   Mon Sep 13 16:58:24 2010 +0200

improve open.pm layer class error message
---

Summary of changes:
 lib/open.pm |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/open.pm b/lib/open.pm
index a6b4250..74119ca 100644
--- a/lib/open.pm
+++ b/lib/open.pm
@@ -108,7 +108,7 @@ sub import {
$in = $out = join(' ', @val);
}
else {
-   croak Unknown PerlIO layer class '$type';
+   croak Unknown PerlIO layer class '$type' (need IN, OUT or IO);
}
 }
 ${^OPEN} = join(\0, $in, $out);

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.4-171-gea25a9b

2010-09-08 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/ea25a9b2cf73948b1e8c5675de027e0ad13277bd?hp=c99cfaa7c4ced6145d9642cd15da5bb2ea4ad19e

- Log -
commit ea25a9b2cf73948b1e8c5675de027e0ad13277bd
Author: Zefram zef...@fysh.org
Date:   Wed Sep 8 09:51:29 2010 +0200

make qw(...) first-class syntax

This makes a qw(...) list literal a distinct token type for the
parser, where previously it was munged into a (,THING,) sequence.
The change means that qw(...) can't accidentally supply parens to parts
of the grammar that want real parens.  Due to many bits of code taking
advantage of that by foreach my $x qw(...) {}, this patch also includes
a hack to coerce qw(...) to the old-style parenthesised THING, emitting
a deprecation warning along the way.
---

Summary of changes:
 embed.fnc|2 +
 embed.h  |4 +
 lib/Tie/Scalar.t |2 +-
 lib/unicore/mktables |   28 +-
 perly.act|  612 ---
 perly.h  |  262 +-
 perly.tab| 1422 +-
 perly.y  |   59 ++-
 pod/perldiag.pod |   11 +
 proto.h  |5 +
 t/lib/warnings/perly |  235 +
 t/op/list.t  |   12 +-
 t/op/studytied.t |2 +-
 t/op/switch.t|4 +-
 toke.c   |   34 +-
 15 files changed, 1518 insertions(+), 1176 deletions(-)

diff --git a/embed.fnc b/embed.fnc
index 732a054..8d6758e 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -2398,6 +2398,8 @@ xpoM  |void|store_cop_label \
|NN COP *cop|NN const char *label|STRLEN len|U32 flags
 
 xpo|int|keyword_plugin_standard|NN char* keyword_ptr|STRLEN 
keyword_len|NN OP** op_ptr
+: Used in perly.y
+xp |void   |coerce_qwlist_to_paren_list|NN OP* qwlist
 
 #if defined(USE_ITHREADS)
 #  if defined(PERL_IN_SV_C)
diff --git a/embed.h b/embed.h
index 2e1fb69..2812c92 100644
--- a/embed.h
+++ b/embed.h
@@ -2081,6 +2081,9 @@
 #ifdef PERL_CORE
 #define boot_core_mro  Perl_boot_core_mro
 #endif
+#ifdef PERL_CORE
+#define coerce_qwlist_to_paren_listPerl_coerce_qwlist_to_paren_list
+#endif
 #if defined(USE_ITHREADS)
 #  if defined(PERL_IN_SV_C)
 #ifdef PERL_CORE
@@ -4556,6 +4559,7 @@
 #ifdef PERL_CORE
 #endif
 #ifdef PERL_CORE
+#define coerce_qwlist_to_paren_list(a) Perl_coerce_qwlist_to_paren_list(aTHX_ 
a)
 #endif
 #if defined(USE_ITHREADS)
 #  if defined(PERL_IN_SV_C)
diff --git a/lib/Tie/Scalar.t b/lib/Tie/Scalar.t
index a8e803d..9be536f 100644
--- a/lib/Tie/Scalar.t
+++ b/lib/Tie/Scalar.t
@@ -22,7 +22,7 @@ use Test::More tests = 16;
 use_ok( 'Tie::Scalar' );
 
 # these are abstract virtual parent methods
-for my $method qw( TIESCALAR FETCH STORE ) {
+for my $method (qw( TIESCALAR FETCH STORE )) {
eval { Tie::Scalar-$method() };
like( $@, qr/doesn't define a $method/, croaks on inherited $method() 
);
 }
diff --git a/lib/unicore/mktables b/lib/unicore/mktables
index 0c10453..505e2ab 100644
--- a/lib/unicore/mktables
+++ b/lib/unicore/mktables
@@ -792,7 +792,7 @@ if ($v_version gt v3.2.0) {
 # unless explicitly added.
 if ($v_version ge v5.2.0) {
 my $unihan = 'Unihan; remove from list if using Unihan';
-foreach my $table qw (
+foreach my $table (qw (
kAccountingNumeric
kOtherNumeric
kPrimaryNumeric
@@ -808,7 +808,7 @@ if ($v_version ge v5.2.0) {
kIRG_USource
kIRG_VSource
kRSUnicode
-)
+))
 {
 $why_suppress_if_empty_warn_if_not{$table} = $unihan;
 }
@@ -4314,10 +4314,10 @@ sub trace { return main::trace(@_); }
 
 # Here are the methods that are required to be defined by any derived
 # class
-for my $sub qw(
+for my $sub (qw(
 append_to_body
 pre_body
-)
+))
 # append_to_body and pre_body are called in the write() method
 # to add stuff after the main body of the table, but before
 # its close; and to prepend stuff before the beginning of the
@@ -4795,7 +4795,7 @@ sub trace { return main::trace(@_); }
 
 # Accessors for the range list stored in this table.  First for
 # unconditional
-for my $sub qw(
+for my $sub (qw(
 contains
 count
 each_range
@@ -4806,7 +4806,7 @@ sub trace { return main::trace(@_); }
 range_count
 reset_each_range
 value_of
-)
+))
 {
 no strict refs;
 *$sub = sub {
@@ -4818,9 +4818,9 @@ 

[perl.git] branch blead, updated. v5.13.4-162-g90d1f21

2010-09-07 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/90d1f214e03568148fd6495efac0f5614cfc0323?hp=134bbc579801d70bf58eb3e84c78e4c2c244899e

- Log -
commit 90d1f214e03568148fd6495efac0f5614cfc0323
Author: Ben Morrow b...@morrow.me.uk
Date:   Tue Aug 31 09:01:03 2010 +0100

Tests for caller_cx, cop_hints_*.

It seems that the runtime hinthash isn't returned correctly when running
under the debugger, so mark those tests TODO for now.

M   MANIFEST
M   ext/XS-APItest/APItest.xs
A   ext/XS-APItest/t/caller.t

commit 2fefa6c771e9cb7a1fee94df3ae2b9462b51d26a
Author: Ben Morrow b...@morrow.me.uk
Date:   Tue Aug 31 09:00:51 2010 +0100

make regen.

M   embed.h
M   global.sym
M   proto.h

commit 8dff4fc578385a16edd29a881d85a0aa5f09595a
Author: Ben Morrow b...@morrow.me.uk
Date:   Tue Aug 31 07:10:20 2010 +0100

API functions for accessing the runtime hinthash.

Add hinthash_fetch(sv|pv[ns]) as a replacement for refcounted_he_fetch,
which is not API (and should not be). Also add caller_cx, as the correct
XS equivalent to caller(). Lots of modules seem to have copies of this,
so a proper API function will be more maintainable in future.

M   embed.fnc
M   hv.c
M   hv.h
M   pp_ctl.c
---

Summary of changes:
 MANIFEST  |1 +
 embed.fnc |7 
 embed.h   |   10 ++
 ext/XS-APItest/APItest.xs |   33 ++-
 ext/XS-APItest/t/caller.t |   77 +
 global.sym|3 ++
 hv.c  |   51 +
 hv.h  |7 
 pp_ctl.c  |   68 +--
 proto.h   |   20 
 10 files changed, 259 insertions(+), 18 deletions(-)
 create mode 100644 ext/XS-APItest/t/caller.t

diff --git a/MANIFEST b/MANIFEST
index 4925ab3..7900589 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -3327,6 +3327,7 @@ ext/XS-APItest/t/BHK.pm   Helper for 
./blockhooks.t
 ext/XS-APItest/t/blockhooks-csc.t  XS::APItest: more tests for 
PL_blockhooks
 ext/XS-APItest/t/blockhooks.t  XS::APItest: tests for PL_blockhooks
 ext/XS-APItest/t/Block.pm  Helper for ./blockhooks.t
+ext/XS-APItest/t/caller.t  XS::APItest: tests for caller_cx
 ext/XS-APItest/t/call.tXS::APItest extension
 ext/XS-APItest/t/exception.t   XS::APItest extension
 ext/XS-APItest/t/hash.tXS::APItest: tests for hash related APIs
diff --git a/embed.fnc b/embed.fnc
index ecb6e71..cbb28a9 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -220,6 +220,8 @@ p   |void   |boot_core_UNIVERSAL
 : Used in perl.c
 p  |void   |boot_core_PerlIO
 Ap |void   |call_list  |I32 oldscope|NN AV *paramList
+Apd|const PERL_CONTEXT *   |caller_cx|I32 level \
+   |NULLOK const PERL_CONTEXT **dbcxp
 : Used in serveral source files
 pR |bool   |cando  |Mode_t mode|bool effective|NN const Stat_t* 
statbufp
 ApR|U32|cast_ulong |NV f
@@ -231,6 +233,11 @@ ApR|I32|my_chsize  |int fd|Off_t length
 #endif
 : Used in perly.y
 pR |OP*|convert|I32 optype|I32 flags|NULLOK OP* o
+Apd|HV*|cop_hints_2hv  |NN const COP *cop
+Apd|SV*|cop_hints_fetchpvn|NN const COP *cop|NN const char *key \
+   |STRLEN klen|int flags|U32 hash
+Amd|SV*|cop_hints_fetchpvs|NN const COP *cop|NN const char *const key
+Amd|SV*|cop_hints_fetchsv|NN const COP *cop|NN SV *keysv|U32 hash
 : Used in op.c and perl.c
 pM |PERL_CONTEXT*  |create_eval_scope|U32 flags
 Aprd   |void   |croak_sv   |NN SV *baseex
diff --git a/embed.h b/embed.h
index 8b50079..c883056 100644
--- a/embed.h
+++ b/embed.h
@@ -90,6 +90,7 @@
 #define boot_core_PerlIO   Perl_boot_core_PerlIO
 #endif
 #define call_list  Perl_call_list
+#define caller_cx  Perl_caller_cx
 #ifdef PERL_CORE
 #define cando  Perl_cando
 #endif
@@ -102,6 +103,10 @@
 #endif
 #ifdef PERL_CORE
 #define convertPerl_convert
+#endif
+#define cop_hints_2hv  Perl_cop_hints_2hv
+#define cop_hints_fetchpvn Perl_cop_hints_fetchpvn
+#ifdef PERL_CORE
 #define create_eval_scope  Perl_create_eval_scope
 #endif
 #define croak_sv   Perl_croak_sv
@@ -2552,6 +2557,7 @@
 #define boot_core_PerlIO() Perl_boot_core_PerlIO(aTHX)
 #endif
 #define call_list(a,b) Perl_call_list(aTHX_ a,b)
+#define caller_cx(a,b) Perl_caller_cx(aTHX_ a,b)
 #ifdef PERL_CORE
 #define cando(a,b,c)   Perl_cando(aTHX_ a,b,c)
 #endif
@@ -2564,6 +2570,10 @@
 #endif
 #ifdef PERL_CORE
 #define convert(a,b,c) Perl_convert(aTHX_ a,b,c)
+#endif

[perl.git] branch blead, updated. v5.13.4-164-g87f718f

2010-09-07 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/87f718f15c8a57e274b2507ba40e4bd0857529ea?hp=90d1f214e03568148fd6495efac0f5614cfc0323

- Log -
commit 87f718f15c8a57e274b2507ba40e4bd0857529ea
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Sep 7 16:18:14 2010 +0200

More tests for when(slice)

M   t/op/switch.t

commit 329a333e7a4ed898282bec7f485751efbea92e8f
Author: David Leadbeater d...@dgl.cx
Date:   Sat Aug 28 22:39:58 2010 +0100

Fix RT #77468: Smart matching on slices

ref_array_or_hash did not take aslice or hslice OPs into account; wrap
them in an anonlist so that smart matching has a reference as it
expects.

M   op.c
M   t/op/smartmatch.t
---

Summary of changes:
 op.c  |   12 
 t/op/smartmatch.t |   26 +-
 t/op/switch.t |   40 +++-
 3 files changed, 76 insertions(+), 2 deletions(-)

diff --git a/op.c b/op.c
index 5ca1823..f49ce82 100644
--- a/op.c
+++ b/op.c
@@ -5542,6 +5542,18 @@ S_ref_array_or_hash(pTHX_ OP *cond)
return newUNOP(OP_REFGEN,
0, mod(cond, OP_REFGEN));
 
+else if(cond
+ (cond-op_type == OP_ASLICE
+||  cond-op_type == OP_HSLICE)) {
+
+   /* anonlist now needs a list from this op, was previously used in
+* scalar context */
+   cond-op_flags |= ~(OPf_WANT_SCALAR | OPf_REF);
+   cond-op_flags |= OPf_WANT_LIST;
+
+   return newANONLIST(mod(cond, OP_ANONLIST));
+}
+
 else
return cond;
 }
diff --git a/t/op/smartmatch.t b/t/op/smartmatch.t
index f8a073b..f14e91c 100644
--- a/t/op/smartmatch.t
+++ b/t/op/smartmatch.t
@@ -73,7 +73,7 @@ my %keyandmore = map { $_ = 0 } @keyandmore;
 my %fooormore = map { $_ = 0 } @fooormore;
 
 # Load and run the tests
-plan tests = 335;
+plan tests = 351;
 
 while (DATA) {
   SKIP: {
@@ -484,6 +484,30 @@ __DATA__
@nums   {  1, '', 12, '' }
 !  @nums   { 11, '', 12, '' }
 
+# array slices
+   @nums[0..-1][]
+   @nums[0..0] [1]
+!  @nums[0..1] [0..2]
+   @nums[0..4] [1..5]
+
+!  undef   @nums[0..-1]
+   1   @nums[0..0]
+   2   @nums[0..1]
+!  @nums[0..1] 2
+
+   @nums[0..1] @nums[0..1]
+
+# hash slices
+   @keyandmore{qw(not)}[undef]
+   @keyandmore{qw(key)}[0]
+
+   undef   @keyandmore{qw(not)}
+   0   @keyandmore{qw(key and more)}
+!  2   @keyandmore{qw(key and)}
+
+   @fooormore{qw(foo)} @keyandmore{qw(key)}
+   @fooormore{qw(foo or more)} @keyandmore{qw(key and more)}
+
 # UNDEF
 !  3   undef
 !  1   undef
diff --git a/t/op/switch.t b/t/op/switch.t
index 1452b78..fa05918 100644
--- a/t/op/switch.t
+++ b/t/op/switch.t
@@ -9,7 +9,7 @@ BEGIN {
 use strict;
 use warnings;
 
-plan tests = 160;
+plan tests = 164;
 
 # The behaviour of the feature pragma should be tested by lib/switch.t
 # using the tests in t/lib/switch/*. This file tests the behaviour of
@@ -1162,6 +1162,44 @@ unreified_check(undef,);
 @list = $smart_hash-(999);
 is(@list, '',  rvalue given - list context propagation [999]);
 }
+{
+# Array slices
+my @list = 10 .. 15;
+my @in_list;
+my @in_slice;
+for (5, 10, 15) {
+given ($_) {
+when (@list) {
+push @in_list, $_;
+continue;
+}
+when (@list[0..2]) {
+push @in_slice, $_;
+}
+}
+}
+is(@in_list, 10 15, when(array));
+is(@in_slice, 10, when(array slice));
+}
+{
+# Hash slices
+my %list = map { $_ = $_ } a .. f;
+my @in_list;
+my @in_slice;
+for (a, e, i) {
+given ($_) {
+when (%list) {
+push @in_list, $_;
+continue;
+}
+when (@list{a..c}) {
+push @in_slice, $_;
+}
+}
+}
+is(@in_list, a e, when(hash));
+is(@in_slice, a, when(hash slice));
+}
 
 # Okay, that'll do for now. The intricacies of the smartmatch
 # semantics are tested in t/op/smartmatch.t

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.13.4-152-g28ac2b4

2010-09-06 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/28ac2b49dea6847c95a32afde577935fec51650f?hp=544cdeac5a054fa1c1b543769d0076fa6c3faf68

- Log -
commit 28ac2b49dea6847c95a32afde577935fec51650f
Author: Zefram zef...@fysh.org
Date:   Sat Aug 21 18:54:04 2010 +0100

function interface to parse Perl statement

yyparse() becomes reentrant.  The yacc stack and related resources
are allocated in yyparse(), rather than in lex_start(), and they are
localised to yyparse(), preserving their values from any outer parser.

yyparse() now takes a parameter which determines which production it
will parse at the top level.  New API function parse_fullstmt() uses this
facility to parse just a single statement.  The top-level single-statement
production that is used for this then messes with the parser's head so
that the parsing stops without seeing EOF, and any lookahead token seen
after the statement is pushed back to the lexer.
---

Summary of changes:
 MANIFEST   |1 +
 embed.fnc  |7 +-
 ext/XS-APItest-KeywordRPN/KeywordRPN.xs|   26 +
 ext/XS-APItest-KeywordRPN/t/swaptwostmts.t |  158 
 perl.c |2 +-
 perly.c|   32 +-
 perly.y|   33 +-
 pod/perldiag.pod   |5 +
 pp_ctl.c   |6 +-
 sv.c   |3 -
 toke.c |   72 ++---
 11 files changed, 312 insertions(+), 33 deletions(-)
 create mode 100644 ext/XS-APItest-KeywordRPN/t/swaptwostmts.t

diff --git a/MANIFEST b/MANIFEST
index 4e56f44..4925ab3 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -3318,6 +3318,7 @@ ext/XS-APItest-KeywordRPN/README  XS::APItest::KeywordRPN 
extension
 ext/XS-APItest-KeywordRPN/t/keyword_plugin.t   test keyword plugin mechanism
 ext/XS-APItest-KeywordRPN/t/multiline.ttest plugin parsing across lines
 ext/XS-APItest-KeywordRPN/t/stuff_svcur_bug.t  test for a bug in lex_stuff_pvn
+ext/XS-APItest-KeywordRPN/t/swaptwostmts.t test recursive descent 
statement parsing
 ext/XS-APItest/Makefile.PL XS::APItest extension
 ext/XS-APItest/MANIFESTXS::APItest extension
 ext/XS-APItest/notcore.c   Test API functions when PERL_CORE is not defined
diff --git a/embed.fnc b/embed.fnc
index 63269f0..ecb6e71 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -622,6 +622,8 @@ AMpd|bool   |lex_next_chunk |U32 flags
 AMpd   |I32|lex_peek_unichar|U32 flags
 AMpd   |I32|lex_read_unichar|U32 flags
 AMpd   |void   |lex_read_space |U32 flags
+: Public parser API
+AMpd   |OP*|parse_fullstmt |U32 flags
 : Used in various files
 Ap |void   |op_null|NN OP* o
 : FIXME. Used by Data::Alias
@@ -1326,8 +1328,9 @@ p |void   |write_to_stderr|NN SV* msv
 p  |int|yyerror|NN const char *const s
 : Used in perly.y, and by Data::Alias
 EXp|int|yylex
+p  |void   |yyunlex
 : Used in perl.c, pp_ctl.c
-p  |int|yyparse
+p  |int|yyparse|int gramtype
 : Only used in scope.c
 p  |void   |parser_free|NN const yy_parser *parser
 #if defined(PERL_IN_TOKE_C)
@@ -2341,7 +2344,7 @@ s |void   |start_force|int where
 s  |void   |curmad |char slot|NULLOK SV *sv
 #  endif
 Mp |int|madlex
-Mp |int|madparse
+Mp |int|madparse   |int gramtype
 #endif
 #if !defined(HAS_SIGNBIT)
 AMdnoP |int|Perl_signbit   |NV f
diff --git a/ext/XS-APItest-KeywordRPN/KeywordRPN.xs 
b/ext/XS-APItest-KeywordRPN/KeywordRPN.xs
index a5dfcd9..6c62256 100644
--- a/ext/XS-APItest-KeywordRPN/KeywordRPN.xs
+++ b/ext/XS-APItest-KeywordRPN/KeywordRPN.xs
@@ -9,6 +9,7 @@
 (SvFLAGS(sv)  (SVf_IOK|SVf_NOK|SVf_POK|SVp_IOK|SVp_NOK|SVp_POK)))
 
 static SV *hintkey_rpn_sv, *hintkey_calcrpn_sv, *hintkey_stufftest_sv;
+static SV *hintkey_swaptwostmts_sv;
 static int (*next_keyword_plugin)(pTHX_ char *, STRLEN, OP **);
 
 /* low-level parser helpers */
@@ -171,6 +172,18 @@ static OP *THX_parse_keyword_stufftest(pTHX)
 }
 #define parse_keyword_stufftest() THX_parse_keyword_stufftest(aTHX)
 
+static OP *THX_parse_keyword_swaptwostmts(pTHX)
+{
+   OP *a, *b;
+   a = parse_fullstmt(0);
+   b = parse_fullstmt(0);
+   if(a  b)
+   PL_hints |= HINT_BLOCK_SCOPE;
+   /* should use append_list(), but that's not part of the public API */
+   return !a ? b : !b ? a : newLISTOP(OP_LINESEQ, 0, b, a);
+}
+#define parse_keyword_swaptwostmts() THX_parse_keyword_swaptwostmts(aTHX)
+
 /* plugin glue */
 
 static int THX_keyword_active(pTHX_ SV *hintkey_sv)
@@ -225,6 +238,11 @@ static int 

  1   2   3   4   5   6   7   8   9   10   >