[perl.git] branch maint-votes updated. 8169539dd3feeb5477a5030e6cbba935919384bd

2018-03-17 Thread Father Chrysostomos
In perl.git, the branch maint-votes has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/8169539dd3feeb5477a5030e6cbba935919384bd?hp=9fe15f4cf4a532ea3e1432d9e44103867fa85c7c>

- Log -
commit 8169539dd3feeb5477a5030e6cbba935919384bd
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sat Mar 17 14:02:18 2018 -0700

Add backporting note

---

Summary of changes:
 votes-5.26.xml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/votes-5.26.xml b/votes-5.26.xml
index 4897f605c0..88b2271452 100644
--- a/votes-5.26.xml
+++ b/votes-5.26.xml
@@ -41,6 +41,9 @@ Move to public list?:
 
 
 If the parser structure layout is part of the ABI, this shouldn't be 
backported, or the new parser structure members need to be moved to the end.
+- Some struct members are part of the public API, and I’m almost certain
+there are many modules that access other members.  Please do move the
+struct members when backporting. --sprout
 
 
 This ought to have 02c84d7f0f97e083f5d8ea9856488f3ede09364f as well, though 
that makes this sound slightly controversial (so maybe it should be rejected 
for maint?):

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.9-137-g5d70f8f9a9

2018-03-11 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/5d70f8f9a94124c9e77138d92611f5765f8793ad?hp=b43c8b6097ab8a06b5e3f161de81ecdc3b88cffa>

- Log -
commit 5d70f8f9a94124c9e77138d92611f5765f8793ad
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Mar 11 15:28:27 2018 -0700

Carp: Use ${^LAST_FH} if available

Using ${^LAST_FH}, available in 5.18, in faster than using eval/die
to get the last file handle.

Also, the eval/die method is not going to produce anything if $. is 0
so skip that entire block if $. is false (by removing the defined check).

(Not significant enough for perldelta.  carp("zonk") gets faster by
only 5% or so.)

commit f8b8ba603b2ee25a74c91b3f9e292db14b2f4ab6
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Mar 11 14:25:14 2018 -0700

Let cmp_version be run from the top level

I’m used to typing ‘./perl -Ilib t/porting/cmp_version.t’; it’s annoy-
ing to have to add ‘-I.’.

(Obviously no perldelta entry necessary.)

commit 06afc688394f2ee3027d9ab81e7fa58256a91645
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Mar 11 14:23:42 2018 -0700

warnings.pm: sprintf is faster than concat

I benchmarked this line alone in a one-liner and found the sprintf
variant to be roughly 10% faster than the concat version.  It’s also
more readable (and maintainable).

(Not significant enough to warrant a perldelta entry.)

---

Summary of changes:
 dist/Carp/lib/Carp.pm   | 21 -
 lib/warnings.pm |  5 +++--
 regen/warnings.pl   |  5 +++--
 t/porting/cmp_version.t |  1 +
 4 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/dist/Carp/lib/Carp.pm b/dist/Carp/lib/Carp.pm
index 25ba942ad1..97f6604a17 100644
--- a/dist/Carp/lib/Carp.pm
+++ b/dist/Carp/lib/Carp.pm
@@ -571,6 +571,15 @@ sub longmess_heavy {
 return ret_backtrace( $i, @_ );
 }
 
+BEGIN {
+if("$]" >= 5.017004) {
+# The LAST_FH constant is a reference to the variable.
+$Carp::{LAST_FH} = \eval '\${^LAST_FH}';
+} else {
+eval '*LAST_FH = sub () { 0 }';
+}
+}
+
 # Returns a full stack backtrace starting from where it is
 # told.
 sub ret_backtrace {
@@ -587,7 +596,16 @@ sub ret_backtrace {
 
 my %i = caller_info($i);
 $mess = "$err at $i{file} line $i{line}$tid_msg";
-if( defined $. ) {
+if( $. ) {
+  # Use ${^LAST_FH} if available.
+  if (LAST_FH) {
+if (${+LAST_FH}) {
+$mess .= sprintf ", <%s> %s %d",
+  *${+LAST_FH}{NAME},
+  ($/ eq "\n" ? "line" : "chunk"), $.
+}
+  }
+  else {
 local $@ = '';
 local $SIG{__DIE__};
 eval {
@@ -596,6 +614,7 @@ sub ret_backtrace {
 if($@ =~ /^Died at .*(, <.*?> (?:line|chunk) \d+).$/ ) {
 $mess .= $1;
 }
+  }
 }
 $mess .= "\.\n";
 
diff --git a/lib/warnings.pm b/lib/warnings.pm
index afb7934ab5..43d3925936 100644
--- a/lib/warnings.pm
+++ b/lib/warnings.pm
@@ -452,8 +452,9 @@ sub __chk
 if ($has_level and @callers_bitmask) {
# logic copied from util.c:mess_sv
my $stuff = " at " . join " line ", (caller $i)[1,2];
-   $stuff .= ", <" . *${^LAST_FH}{NAME} . "> "
-. ($/ eq "\n" ? "line" : "chunk") . " $."
+   $stuff .= sprintf ", <%s> %s %d",
+  *${^LAST_FH}{NAME},
+  ($/ eq "\n" ? "line" : "chunk"), $.
if $. && ${^LAST_FH};
die "$message$stuff.\n" if $results[0];
return warn "$message$stuff.\n";
diff --git a/regen/warnings.pl b/regen/warnings.pl
index 9c10f69464..69084239f1 100644
--- a/regen/warnings.pl
+++ b/regen/warnings.pl
@@ -768,8 +768,9 @@ sub __chk
 if ($has_level and @callers_bitmask) {
# logic copied from util.c:mess_sv
my $stuff = " at " . join " line ", (caller $i)[1,2];
-   $stuff .= ", <" . *${^LAST_FH}{NAME} . "> "
-. ($/ eq "\n" ? "line" : "chunk") . " $."
+   $stuff .= sprintf ", <%s> %s %d",
+  *${^LAST_FH}{NAME},
+  ($/ eq "\n" ? "line" : "chunk"), $.
if $. && ${^LAST_FH};
die "$message$stuff.\n" if $results[0];
return warn "$message$stuff.\n";
diff --git a/t/porting/cmp_version.t b/t/porting/cmp_version.t
index 18b3e57510..0573e2f81d 100644
--- a/t/porting/cmp_version.t
+++ b/t/porting/cmp_version.t
@@ -19,6 +19,7 @@
 
 BEGIN {
 @INC = '..' if -f '../TestInit.pm';
+@INC = '.'  if -f  './TestInit.pm';
 }
 use TestInit qw(T A); # T is chdir to the top level, A makes paths absolute
 use strict;

-- 
Perl5 Master Repository


[perl.git] branch maint-votes updated. 5cf8939f5a6207ec1798c0b066a6b93e28572183

2018-03-10 Thread Father Chrysostomos
In perl.git, the branch maint-votes has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/5cf8939f5a6207ec1798c0b066a6b93e28572183?hp=3aababe00585f985c82b3970e894664318fe26f4>

- Log -
commit 5cf8939f5a6207ec1798c0b066a6b93e28572183
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sat Mar 10 10:25:26 2018 -0800

5.26 votes

I don’t know enough about compiler hints, configure, and the regexp
engine to feel confident voting on those

commit f7f128db5f88add2a41345b0778c862516e2e198
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sat Mar 10 09:47:52 2018 -0800

5.24: Propose regression/crash fix

Proposed by Sergey Aleynikov in

[perl.git] branch blead updated. v5.27.9-106-ga2d13ee089

2018-03-05 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/a2d13ee089a08f2c4ac0472a6d54e14e83a4eab4?hp=ab82787b570c2b70044e783462318c4c4c089ca6>

- Log -
commit a2d13ee089a08f2c4ac0472a6d54e14e83a4eab4
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Mar 5 09:55:34 2018 -0800

perldiag: Rewrap an entry for better splain output

The splain utility (aka diagnostics.pm) blindly strips out pod formatting
without rewrapping the text (I think rewrapping would be overkill).  This
means that formatting like ‘L’ turns into a simple ‘Note [5] in
perlrecharclass’, which can mess up the indentation.

Rewrap the entry to compensate, plus a few other tweaks to improve
the appearance of the right margin.

---

Summary of changes:
 pod/perldiag.pod | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 124f1fb248..891989c423 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -3384,8 +3384,8 @@ ambiguities and conflicts in following the Standard, and 
the locale has
 chosen an approach that differs from Perl's.
 
 One of these is because that, contrary to the claims, Unicode is not
-completely locale insensitive.  Turkish and some related languages have
-two types of C<"I"> characters.  One is dotted in both upper- and
+completely locale insensitive.  Turkish and some related languages
+have two types of C<"I"> characters.  One is dotted in both upper- and
 lowercase, and the other is dotless in both cases.  Unicode allows a
 locale to use either the Turkish rules, or the rules used in all other
 instances, where there is only one type of C<"I">, which is dotless in
@@ -3400,14 +3400,14 @@ The other common cause is for the characters
 
 These are probematic.  The C standard says that these should be
 considered punctuation in the C locale (and the POSIX standard defers to
-the C standard), and Unicode is generally considered a superset of the C
-locale.  But Unicode has added an extra category, "Symbol", and
+the C standard), and Unicode is generally considered a superset of
+the C locale.  But Unicode has added an extra category, "Symbol", and
 classifies these particular characters as being symbols.  Most UTF-8
 locales have them treated as punctuation, so that L<ispunct(2)> returns
-non-zero for them.  But a few locales have it return 0.   Perl takes the
-first approach, not using C<ispunct()> at all (see L), and this message is raised to
-notify you that you are getting Perl's approach, not the locale's.
+non-zero for them.  But a few locales have it return 0.   Perl takes
+the first approach, not using C<ispunct()> at all (see L), and this message is raised to notify 
you that you
+are getting Perl's approach, not the locale's.
 
 =item Locale '%s' may not work well.%s
 

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.9-105-gab82787b57

2018-03-05 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/ab82787b570c2b70044e783462318c4c4c089ca6?hp=d8671a9c8fe2955099261f1cedc0ae234dc86bfe>

- Log -
commit ab82787b570c2b70044e783462318c4c4c089ca6
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Mar 5 09:35:21 2018 -0800

More AUTHORS sorting

---

Summary of changes:
 AUTHORS | 48 
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index e31a468dec..433ed4e24d 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -18,18 +18,17 @@
 -- 
 A. C. Yardley  <yard...@tanet.net>
 A. Sinan Unur  <na...@cpan.org>
-Aaron Crane<a...@cpan.org>
 Aaron B. Dossett   <aa...@iglou.com>
+Aaron Crane<a...@cpan.org>
 Aaron J. Mackey<aj...@virginia.edu>
 Aaron Priven   <aa...@priven.com>
 Aaron Trevena  <aaaron.trev...@gmail.com>
-Achim Gratz<achim.gr...@stromeko.de>
-Augustina Blair<au...@cpan.org>
 Abe Timmerman  <a...@ztreet.demon.nl>
 Abhijit Menon-Sen  <a...@toroid.org>
 Abigail<abig...@abigail.be>
 Abir Viqar <abi...@hushmail.com>
 Achim Bohnet   <a...@mpe.mpg.de>
+Achim Gratz<achim.gr...@stromeko.de>
 Adam Flott <a...@npjh.com>
 Adam Kennedy   <a...@ali.as>
 Adam Krolnik   <ad...@gypsy.cyrix.com>
@@ -130,6 +129,7 @@ Arvan   <apritch...@zeus.com>
 Ash Berlin <a...@cpan.org>
 Ask Bjørn Hansen   <a...@develooper.com>
 Audrey Tang<c...@audreyt.org>
+Augustina Blair<au...@cpan.org>
 Axel Boldt
 Barrie Slaymaker   <barr...@slaysys.com>
 Barry Friedman
@@ -152,8 +152,6 @@ Bill Campbell   <b...@celestial.com>
 Bill Glicker   <bi...@burrelles.com>
 Billy Constantine  <wdcon...@cs.adelaide.edu.au>
 Blair Zajac<bl...@orcaware.com>
-Brandon Black  <blbl...@gmail.com>
-Brian Childs   <br...@rentec.com>
 Bo Borgerson   <gig...@gmail.com>
 Bo Johansson   <bo.johan...@lsn.se>
 Bo Lindbergh   <b...@stacken.kth.se>
@@ -170,14 +168,15 @@ Brad Hughes   <b...@tgsmc.com>
 Brad Lanam <b...@gentoo.com>
 Bradley Dean   <bjd...@bjdean.id.au>
 Bram   <perl...@wizbit.be>
+Brandon Black  <blbl...@gmail.com>
 Brendan Byrd   <bb...@cpan.org>
 Brendan O'Dea  <b...@debian.org>
 Breno G. de Oliveira   <g...@cpan.org>
 Brent B. Powers<pow...@ml.com>
 Brent Dax  <brent...@cpan.org>
-Brooks D Boyd
 Brian Callaghan<call...@itginc.com>
 Brian Carlson  <brian.carl...@cpanel.net>
+Brian Childs   <br...@rentec.com>
 Brian Clarke   <cla...@appliedmeta.com>
 brian d foy<brian.d@gmail.com>
 Brian Fraser   <frase...@gmail.com>
@@ -192,6 +191,7 @@ Brian Phillips  <bphill...@cpan.org>
 Brian Reichert <reich...@internet.com>
 Brian S. Cashman   <b...@umich.edu>
 Brian Strand   <bstr...@switchmanagement.com>
+Brooks D Boyd
 Bruce Barnett  <barn...@grymoire.crd.ge.com>
 Bruce J. Keeler<bkeel...@iwa.dp.intel.com>
 Bruce P. Schuck<br...@aps.org>
@@ -222,7 +222,6 @@ Chaskiel M Grundman
 Chia-liang Kao <cl...@clkao.org>
 Chip Salzenberg<c...@pobox.com>
 Chip Turner<ctur...@redhat.com>
-Chun Bing Ge   <g...@cn.ibm.com>
 chocolateboy   <chocolate...@chocolatey.com>
 Chris Ball <ch...@cpan.org>
 Chris 'BinGOs' Williams<ch...@bingosnet.co.uk>
@@ -251,6 +250,7 @@ Christopher Davis   <c...@loiosh.kei.com>
 Christopher J. Madsen  <p...@cjmweb.net>
 chromatic  <chroma...@wgz.org>
 Chuck Phillips   

[perl.git] branch blead updated. v5.27.9-104-gd8671a9c8f

2018-03-05 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/d8671a9c8fe2955099261f1cedc0ae234dc86bfe?hp=f68b759104a3343a4765dcab96e5e5b04e799f25>

- Log -
commit d8671a9c8fe2955099261f1cedc0ae234dc86bfe
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Mar 5 08:58:09 2018 -0800

AUTHORS: sorting; consistent indent

---

Summary of changes:
 AUTHORS | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index f97682f615..e31a468dec 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -328,7 +328,7 @@ David Gay   <d...@acm.org>
 David Glasser  <m...@davidglasser.net>
 David Golden   <dagol...@cpan.org>
 David H. Adler <d...@panix.com>
-David H. Gutteridge <dhgutteri...@sympatico.ca>
+David H. Gutteridge<dhgutteri...@sympatico.ca>
 David Hammen   <ham...@gothamcity.jsc.nasa.gov>
 David J. Fiander   <dav...@mks.com>
 David Kerry<dav...@tor.securecomputing.com>
@@ -402,8 +402,8 @@ Eric Promislow  <er...@activestate.com>
 Erich Rickheit
 Eryq   <e...@zeegee.com>
 Etienne Grossman   <etie...@isr.isr.ist.utl.pt>
-Eugene Alterman<eugene.alter...@bremer-inc.com>
 Eugen Konkov   <kes-...@yandex.ru>
+Eugene Alterman<eugene.alter...@bremer-inc.com>
 Evan Miller<e...@frap.net>
 Evan Zacks <zac...@cpan.org>
 Fabien Tassin  <tas...@eerie.fr>
@@ -698,7 +698,7 @@ Keedi Kim   <ke...@cpan.org>
 Keith Neufeld  <neuf...@fast.pvi.org>
 Keith Thompson <keith.s.thomp...@gmail.com>
 Ken Brown  <kbr...@cornell.edu>
-Ken Cotterill   <kencotter...@netspace.net.au>
+Ken Cotterill  <kencotter...@netspace.net.au>
 Ken Estes  <es...@ms.com>
 Ken Fox<k...@ford.com>
 Ken Hirsch <kenhir...@ftml.net>
@@ -939,7 +939,7 @@ Ollivier Robert 
<robe...@keltia.freenix.fr>
 Osvaldo Villalon   <ovilla...@dextratech.com>
 Owain G. Ainsworth <o...@nicotinebsd.org>
 Owen Taylor<o...@cornell.edu>
-Pali   <p...@cpan.org>
+Pali   <p...@cpan.org>
 Papp Zoltan<pa...@elte.hu>
 parv   <p...@pair.com>
 Pascal Rigaux  <pi...@mandriva.com>
@@ -973,8 +973,8 @@ Pedro Felipe Horrillo Guerra<pan...@pancho.name>
 Per Einar Ellefsen <per.ei...@skynet.be>
 Perlover   <perlo...@perlover.com>
 Pete Peterson  <peters...@genrad.com>
+Peter Avalos   <pe...@theshell.com>
 Peter BARABAS
-Peter Avalos<pe...@theshell.com>
 Peter Chines   <pchi...@nhgri.nih.gov>
 Peter Dintelmann   <peter.dintelm...@dresdner-bank.com>
 Peter E. Yee   <y...@trident.arc.nasa.gov>
@@ -1196,7 +1196,6 @@ Thomas Bowditch   <bowdi...@inmet.com>
 Thomas Conté   <t...@fr.uu.net>
 Thomas Dorner  <thomas.dor...@start.de>
 Thomas Kofler
-Tomasz Konojacki<m...@xenu.pl>
 Thomas König
 Thomas Pfau<p...@nbpfaus.net>
 Thomas Sibley  <tsib...@cpan.org>
@@ -1231,6 +1230,7 @@ Tom Hukins<t...@eborcom.com>
 Tom Phoenix<rootb...@teleport.com>
 Tom Spindler   <dog...@isi.net>
 Tom Wyant  <wy...@cpan.org>
+Tomasz Konojacki   <m...@xenu.pl>
 Tomoyuki Sadahiro  <bqw10...@nifty.com>
 Ton Hospel <c...@ton.iguana.be>
 Tony Bowden<t...@kasei.com>

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.9-103-gf68b759104

2018-03-05 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/f68b759104a3343a4765dcab96e5e5b04e799f25?hp=8e4ae0ffc862568e59935c22e552488892eabe59>

- Log -
commit f68b759104a3343a4765dcab96e5e5b04e799f25
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Mar 5 08:46:41 2018 -0800

Increase ExtUtils::ParseXS(::*) version to 3.39

commit 559c9ec2c0df2ca09de621378c4f8a7d49258f02
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Mar 5 08:39:36 2018 -0800

Add Shoichi Kaji to AUTHORS

commit 8a891375b36abae2efae1301601032d4f062b903
Author: Shoichi Kaji <sk...@cpan.org>
Date:   Mon Mar 5 23:25:49 2018 +0900

RT #132935: correctly check VERSIONs in ExtUtils::ParseXS

The following version check does not work correctly:

BEGIN { $VERSION = '3.38' }
use ExtUtils::ParseXS::Constants $VERSION;

The reason is that we must use version "literals",
not "variables" in `use Module VERSION`.
For the sake of ease of maintenance,
we use "require" and "->VERSION", instead of "use" here.

commit 0c5a5b273a4ce037b635202dcefda1522fb4bb9f
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Mar 4 22:05:46 2018 -0800

perldiag typo

---

Summary of changes:
 AUTHORS  |  1 +
 dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm| 10 +-
 dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Constants.pm  |  2 +-
 dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/CountLines.pm |  2 +-
 dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Eval.pm   |  2 +-
 dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm  |  2 +-
 pod/perldiag.pod |  2 +-
 7 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 3fc48c7c30..f97682f615 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1127,6 +1127,7 @@ Shinya Hayakawa   <hayak...@livedoor.jp>
 Shirakata Kentaro  <argr...@ub32.org>
 Shishir Gundavaram <shis...@ruby.ora.com>
 Shlomi Fish<shlo...@cpan.org>
+Shoichi Kaji   <sk...@cpan.org>
 Simon Cozens   <si...@netthink.co.uk>
 Simon Glover   <s...@roe.ac.uk>
 Simon Leinen
diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm 
b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
index 16359ccbce..e1f0940745 100644
--- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
+++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
@@ -11,12 +11,12 @@ use Symbol;
 
 our $VERSION;
 BEGIN {
-  $VERSION = '3.38';
+  $VERSION = '3.39';
+  require ExtUtils::ParseXS::Constants; 
ExtUtils::ParseXS::Constants->VERSION($VERSION);
+  require ExtUtils::ParseXS::CountLines; 
ExtUtils::ParseXS::CountLines->VERSION($VERSION);
+  require ExtUtils::ParseXS::Utilities; 
ExtUtils::ParseXS::Utilities->VERSION($VERSION);
+  require ExtUtils::ParseXS::Eval; ExtUtils::ParseXS::Eval->VERSION($VERSION);
 }
-use ExtUtils::ParseXS::Constants $VERSION;
-use ExtUtils::ParseXS::CountLines $VERSION;
-use ExtUtils::ParseXS::Utilities $VERSION;
-use ExtUtils::ParseXS::Eval $VERSION;
 $VERSION = eval $VERSION if $VERSION =~ /_/;
 
 use ExtUtils::ParseXS::Utilities qw(
diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Constants.pm 
b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Constants.pm
index 57d1eca28b..45b567404d 100644
--- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Constants.pm
+++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Constants.pm
@@ -3,7 +3,7 @@ use strict;
 use warnings;
 use Symbol;
 
-our $VERSION = '3.38';
+our $VERSION = '3.39';
 
 =head1 NAME
 
diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/CountLines.pm 
b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/CountLines.pm
index fe214702b8..5b48449dbb 100644
--- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/CountLines.pm
+++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/CountLines.pm
@@ -1,7 +1,7 @@
 package ExtUtils::ParseXS::CountLines;
 use strict;
 
-our $VERSION = '3.38';
+our $VERSION = '3.39';
 
 our $SECTION_END_MARKER;
 
diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Eval.pm 
b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Eval.pm
index 2e5e97bd05..9eba5e5058 100644
--- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Eval.pm
+++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Eval.pm
@@ -2,7 +2,7 @@ package ExtUtils::ParseXS::Eval;
 use strict;
 use warnings;
 
-our $VERSION = '3.38';
+our $VERSION = '3.39';
 
 =head1 NAME
 
diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm 
b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm
index 947abd2ff4..ae25b33b47 100644
--- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseX

[perl.git] branch blead updated. v5.27.9-84-g90fe04894e

2018-03-02 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/90fe04894e1509f4c8efa9a2ba4f01d295d9634c?hp=30938b9caf6a0422748692c853345cfd94bf43e5>

- Log -
commit 90fe04894e1509f4c8efa9a2ba4f01d295d9634c
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Fri Mar 2 10:52:45 2018 -0800

perldelta typo

---

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

diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 462e264954..fb56b110e9 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -123,7 +123,7 @@ L has been upgraded from version 1.46 to 1.4x.
 XXX Please update the version number.
 
 L, when generating stack traces, now attempts to work around
-longstanding bugs resulting from Perl's non-referenced-counted stack.
+longstanding bugs resulting from Perl's non-reference-counted stack.
 [perl #52610]
 
 Carp has been modified to avoid assuming that objects cannot be

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.9-83-g30938b9caf

2018-03-02 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/30938b9caf6a0422748692c853345cfd94bf43e5?hp=03079deeca756afb866140c9386116a4034fb863>

- Log -
commit 30938b9caf6a0422748692c853345cfd94bf43e5
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Fri Mar 2 10:50:55 2018 -0800

perldelta for Carp changes since 5.27.9

Most of the commits that modified Carp.pm were either minor fix-ups
for previous commits or fixes for bugs introduced by previous commits.
Hence, there are validly only three entries, even though it seems
a small number for such a flurry of activity.

All significant Carp changes prior to this commit are accounted for.

---

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

diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index bada4f36a9..462e264954 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -118,9 +118,22 @@ XXX Remove this section if not applicable.
 
 =item *
 
-L has been upgraded from version A.xx to B.yy.
+L has been upgraded from version 1.46 to 1.4x.
 
-If there was something important to note about this change, include that here.
+XXX Please update the version number.
+
+L, when generating stack traces, now attempts to work around
+longstanding bugs resulting from Perl's non-referenced-counted stack.
+[perl #52610]
+
+Carp has been modified to avoid assuming that objects cannot be
+overloaded without the L module loaded (this can happen with
+objects created by XS modules).  Previously, infinite recursion would
+result if an XS-defined overload method itself called Carp.  [perl #132828]
+
+Carp now avoids using C, partly because older versions
+of L (included with perl 5.14 and earlier) load L
+at run time, which will fail if Carp has been invoked after a syntax error.
 
 =back
 

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.9-82-g03079deeca

2018-03-02 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/03079deeca756afb866140c9386116a4034fb863?hp=8e9b3e15d4aa3202b72e5c045633ad3a94406ccb>

- Log -
commit 03079deeca756afb866140c9386116a4034fb863
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Fri Mar 2 10:30:51 2018 -0800

Remove 5.27.9 entries from 5.27.10’s delta

---

Summary of changes:
 pod/perldelta.pod | 227 --
 1 file changed, 15 insertions(+), 212 deletions(-)

diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 22e5722b75..bada4f36a9 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -21,59 +21,9 @@ XXX Any important notices here
 
 =head1 Core Enhancements
 
-=head2 New read-only predefined variable C<${^SAFE_LOCALES}>
+=head2 XXX
 
-This variable is 1 if the Perl interpreter is operating in an
-environment where it is safe to use and change locales (see
-L.)  This variable is true when the perl is
-unthreaded, or compiled in a platform that supports thread-safe locale
-operation (see next item).
-
-=head2 Locales are now thread-safe on systems that support them
-
-These systems include Windows starting with Visual Studio 2005, and in
-POSIX 2008 systems.
-
-The implication is that you are now free to use locales and changes them
-in a threaded environment.  Your changes affect only your thread.
-See L
-
-=head2 Script runs now are specified with a different syntax
-
-This isn't really an enhancement, but is being put in this category
-because it changes an enhancement from 5.27.8, and there is a new
-abbreviated form for it.  The syntax is now either of:
-
- (*script_run:...)
- (*sr:...)
-
-Previously a C<"+"> was used instead of the C<"*">.
-
-=head2 There is a new form for script runs which combines with
-C<(?E...)> (or C<*atomic:...)>)
-
-C<(*asr:...> is an easier way to write C<(*sr:(?E...))>,
-which is expected to be a commonly used idiom.
-C<(*atomic_script_run:...> is also available.  See
-L.
-
-=head2 Experimentally, there are now alphabetic synonyms for some
-regular expression assertions
-
-If you find it difficult to remember how to write certain of the pattern
-assertions, there are now alphabetic synonyms.
-
- CURRENTNEW SYNONYMS
- -- 
- (?=...)(*pla:...) or (*positive_lookahead:...)
- (?!...)(*nla:...) or (*negative_lookahead:...)
- (?<=...)   (*plb:...) or (*positive_lookbehind:...)
- (?...)(*atomic:...)
-
-These are considered experimental, so using any of these will raise
-(unless turned off) a warning in the C
-category.
+XXX
 
 =head1 Security
 
@@ -132,15 +82,7 @@ as an updated module in the L 
section.
 
 =item *
 
-Various optimizations have been applied to matching regular expression
-patterns, so under the right circumstances, significant performance
-gains may be noticed.  But in an application with many varied patterns,
-little overall improvement likely will be seen.
-
-=item *
-
-Other optimizations have been applied to UTF-8 handling, but these are
-not typically a major factor in most applications.
+XXX
 
 =back
 
@@ -176,103 +118,10 @@ XXX Remove this section if not applicable.
 
 =item *
 
-L has been upgraded from version 0.47 to 0.49.
-
-=item *
-
-L has been upgraded from version 1.45 to 1.46.
-
-=item *
-
-L has been upgraded from version 3.38 to 3.39.
-
-=item *
-
-L has been upgraded from version 2.94 to 2.96.
-
-=item *
-
-L has been upgraded from version 2.21 to 2.22.
-
-=item *
-
-L has been upgraded from version 1.28 to 1.29.
-
-=item *
-
-L has been upgraded from version 7.30 to 7.32.
-
-=item *
-
-L has been upgraded from version 3.36 to 3.38.
-
-=item *
-
-L has been upgraded from version 3.37 to 3.38.
-
-=item *
-
-L has been upgraded from version 3.72 to 3.74.
-
-=item *
-
-L has been upgraded from version 0.0607 to 0.0608.
-
-=item *
-
-L has been upgraded from version 0.98 to 1.00.
-
-=item *
-
-L has been upgraded from version 5.20180120 to 5.20180220.
-
-=item *
-
-L has been upgraded from version 1.21 to 1.22.
-
-=item *
-
-L has been upgraded from version 0.25 to 0.26.
-
-=item *
-
-L has been upgraded from version 1.81 to 1.82.
-
-=item *
-
-L has been upgraded from version 2.65 to 3.06.
-
-=item *
-
-L has been upgraded from version 1.302120 to 1.302122.
-
-=item *
-
-L has been upgraded from version 2.21 to 2.22.
-
-=item *
-
-L has been upgraded from version 1.9752 to 1.9753.
-
-=item *
-
-L has been upgraded from version 1.40 to 1.41.
-
-=item *
-
 L has been upgraded from version A.xx to B.yy.
 
 If there was something important to note about this change, include that here.
 
-=item *
-
-The new (as of 5.27.8) restriction forbidding use of C to enter the
-argument of a binary 

[perl.git] branch post-5.28 created. v5.27.8-415-g8e70bb2745

2018-02-28 Thread Father Chrysostomos
In perl.git, the branch post-5.28 has been created

<https://perl5.git.perl.org/perl.git/commitdiff/8e70bb274578a4a422f9d7217e2be4b1cc978b1d?hp=>

at  8e70bb274578a4a422f9d7217e2be4b1cc978b1d (commit)

- Log -
commit 8e70bb274578a4a422f9d7217e2be4b1cc978b1d
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Wed Feb 28 18:55:14 2018 -0800

Increase $overloading::VERSION to 0.03

commit 7f93f0a02bc3646568448fc64578bf6f57276eb3
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Wed Feb 28 18:53:01 2018 -0800

Fold overload::numbers into overloading

overload::numbers has always been undocumented and used only by
overloading.pm.  Combining them into one at least theoretically
reduces load time (one file to parse) and saves memory (one
less stash).

commit 35ed5aa642b1d2583ba1ce604812e34237b5662e
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Wed Feb 28 18:43:08 2018 -0800

Remove @overload::numbers::enum

This has never been documented and is unused.

---

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.8-412-g7276ff5bb3

2018-02-27 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/7276ff5bb307b4639027305f3db927826089f646?hp=52c17dc66edf9b267b592425fbd10e39c5606e26>

- Log -
commit 7276ff5bb307b4639027305f3db927826089f646
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Tue Feb 27 11:24:09 2018 -0800

Carp: Speed up longmess some more

Commit 915a6810d added a UNIVERSAL::isa check to format_arg (used by
longmess, which generates stack traces) to see whether an argument is
blessed before trying CARP_TRACE, to speed things up when the argu-
ment is not blessed.

Because this would cause infinite recursion when the UNIVERSAL::isa
module is loaded, a check was put in place to avoid this problem.  But
the check was a run-time check, and so the speed-up was minimal.

If we move the check to compile time (and save the original
::isa in case the module gets loaded later), then the speed-
up is signifant.  That is what this patch does.

Before this patch, the following one-liner runs on my machine in 6
seconds on average:

$ ./perl -MCarp -Ilib -e 'sub f { my $c = shift; if ($c == 100) { 
Carp::longmess() } else { f($c+1,{}) } } f(0,{}) for 1..500'

If I disable the isa check (just to see how much it was speeding
things up), it averages 6.5 seconds, not much of a difference.

If I move the $UNIVERSAL::isa::VERSION safety check to compile time
instead of run time, I can reduce the time to 4.9 seconds.

---

Summary of changes:
 dist/Carp/lib/Carp.pm | 33 -
 1 file changed, 20 insertions(+), 13 deletions(-)

diff --git a/dist/Carp/lib/Carp.pm b/dist/Carp/lib/Carp.pm
index 10509d4339..25ba942ad1 100644
--- a/dist/Carp/lib/Carp.pm
+++ b/dist/Carp/lib/Carp.pm
@@ -130,6 +130,22 @@ sub _univ_mod_loaded {
 }
 }
 
+# _maybe_isa() is usually the UNIVERSAL::isa function.  We have to avoid
+# the latter if the UNIVERSAL::isa module has been loaded, to avoid infi-
+# nite recursion; in that case _maybe_isa simply returns true.
+my $isa;
+BEGIN {
+if (_univ_mod_loaded('isa')) {
+*_maybe_isa = sub { 1 }
+}
+else {
+# Since we have already done the check, record $isa for use below
+# when defining _StrVal.
+*_maybe_isa = $isa = _fetch_sub(UNIVERSAL => "isa");
+}
+}
+
+
 # We need an overload::StrVal or equivalent function, but we must avoid
 # loading any modules on demand, as Carp is used from __DIE__ handlers and
 # may be invoked after a syntax error.
@@ -165,18 +181,15 @@ BEGIN {
 
 # _blessed is either UNIVERAL::isa(...), or, in the presence of an
 # override, a hideous, but fairly reliable, workaround.
-*_blessed = _univ_mod_loaded('isa')
-? sub {
+*_blessed = $isa
+? sub { &$isa($_[0], "UNIVERSAL") }
+: sub {
 my $probe = "UNIVERSAL::Carp_probe_" . rand;
 no strict 'refs';
 local *$probe = sub { "unlikely string" };
 local $@;
 local $SIG{__DIE__} = sub{};
 (eval { $_[0]->$probe } || '') eq 'unlikely string'
-  }
-: do {
-my $isa = _fetch_sub(qw/UNIVERSAL isa/);
-sub { &$isa($_[0], "UNIVERSAL") }
   };
 
 *_StrVal = sub {
@@ -387,14 +400,8 @@ sub format_arg {
 
 if ( my $pack= ref($arg) ) {
 
-# lazy check if the CPAN module UNIVERSAL::isa is used or not
-#   if we use a rogue version of UNIVERSAL this would lead to infinite 
loop
-my $isa = _univ_mod_loaded('isa')
-? sub { 1 }
-: _fetch_sub(UNIVERSAL => "isa");
-
  # legitimate, let's not leak it.
-if (!$in_recurse && $isa->( $arg, 'UNIVERSAL' ) &&
+if (!$in_recurse && _maybe_isa( $arg, 'UNIVERSAL' ) &&
do {
 local $@;
local $in_recurse = 1;

-- 
Perl5 Master Repository


[perl.git] branch sprout/carp-strval deleted. v5.27.8-399-gce79635448

2018-02-27 Thread Father Chrysostomos
In perl.git, the branch sprout/carp-strval has been deleted



   was  ce796354483847023b2bf19c360d1d5e4aeff094

- Log -
ce796354483847023b2bf19c360d1d5e4aeff094 Carp: Avoid run-time mods; StrVal 
workarounds
---

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.8-408-ga0da1e165c

2018-02-27 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/a0da1e165c011c775b9f39a37ab6d3dd6a1c0969?hp=f88ca576baabd4517ec5766efa11b1e1fc8109af>

- Log -
commit a0da1e165c011c775b9f39a37ab6d3dd6a1c0969
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Feb 26 09:23:28 2018 -0800

warnings.pm: _at_level functions and chunky handles

The _at_level functions, which have to bypass Carp, were not
reporting non-line-based filehandles correctly.  The perl core
does:

...,  chunk 7.

if $/ is not "\n".  warnings.pm should do the same.  It was using
‘line’.

commit 5c8d1071aaf72214e66b1a224890384ab6ca5153
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Feb 26 01:23:53 2018 -0800

Carp: Avoid run-time mods; StrVal workarounds

Carp needs to avoid loading modules while reporting errors, because
it may be invoked via $SIG{__DIE__} after a syntax error, when BEGIN
blocks are forbidden.

Before this commit (as of v5.27.8-360-gc99363a) it was doing just that
for reference arguments within stack traces.

That means we either need to load overload.pm at start-up so that
overload::StrVal is already available, or avoid overload::StrVal
altogether.

It turns out that various versions of overload::StrVal have
their own problems that prevent Carp from using them (out-
lined in the comments added to Carp.pm and also described at
<https://rt.perl.org/Ticket/Display.html?id=132902#txn-1535564>).

So we now follow two approaches:  If overloading.pm is available, use
that; otherwise, use a hideous workaround inspired by ancient imple-
entations of overload::StrVal and Scalar::Util::blessed, while avoid-
ing the bugs in those old versions.

---

Summary of changes:
 MANIFEST  |  1 +
 dist/Carp/lib/Carp.pm | 91 ---
 dist/Carp/t/stack_after_err.t | 73 ++
 dist/Carp/t/vivify_stash.t| 12 +++---
 lib/warnings.pm   |  5 ++-
 regen/warnings.pl |  5 ++-
 t/lib/warnings/9enabled   | 19 +
 7 files changed, 175 insertions(+), 31 deletions(-)
 create mode 100644 dist/Carp/t/stack_after_err.t

diff --git a/MANIFEST b/MANIFEST
index acc1bcba7f..b054110b65 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2975,6 +2975,7 @@ dist/Carp/t/errno.t   See if Carp preserves 
$! and $^E
 dist/Carp/t/heavy.tSee if Carp::Heavy works
 dist/Carp/t/heavy_mismatch.t   See if Carp::Heavy catches version 
mismatch
 dist/Carp/t/rt52610_crash.tTest that we can gracefully handle 
serializing the stack with stack-refcounting bugs
+dist/Carp/t/stack_after_err.t  Test stack traces after syntax errors
 dist/Carp/t/stash_deletion.t   See if Carp handles stash deletion
 dist/Carp/t/swash.tSee if Carp avoids breaking swash loading
 dist/Carp/t/vivify_gv.tSee if Carp leaves utf8:: stuff alone
diff --git a/dist/Carp/lib/Carp.pm b/dist/Carp/lib/Carp.pm
index d5443ba676..10509d4339 100644
--- a/dist/Carp/lib/Carp.pm
+++ b/dist/Carp/lib/Carp.pm
@@ -130,12 +130,71 @@ sub _univ_mod_loaded {
 }
 }
 
-# _mycan is either UNIVERSAL::can, or, in the presence of an override,
-# overload::mycan.
+# We need an overload::StrVal or equivalent function, but we must avoid
+# loading any modules on demand, as Carp is used from __DIE__ handlers and
+# may be invoked after a syntax error.
+# We can copy recent implementations of overload::StrVal and use
+# overloading.pm, which is the fastest implementation, so long as
+# overloading is available.  If it is not available, we use our own pure-
+# Perl StrVal.  We never actually use overload::StrVal, for various rea-
+# sons described below.
+# overload versions are as follows:
+# undef-1.00 (up to perl 5.8.0)   uses bless (avoid!)
+# 1.01-1.17  (perl 5.8.1 to 5.14) uses Scalar::Util
+# 1.18+  (perl 5.16+) uses overloading
+# The ancient 'bless' implementation (that inspires our pure-Perl version)
+# blesses unblessed references and must be avoided.  Those using
+# Scalar::Util use refaddr, possibly the pure-Perl implementation, which
+# has the same blessing bug, and must be avoided.  Also, Scalar::Util is
+# loaded on demand.  Since we avoid the Scalar::Util implementations, we
+# end up having to implement our own overloading.pm-based version for perl
+# 5.10.1 to 5.14.  Since it also works just as well in more recent ver-
+# sions, we use it there, too.
 BEGIN {
-*_mycan = _univ_mod_loaded('can')
-? do { require "overload.pm"; _fetch_sub overload => 'mycan' }
-: \::can
+if (eval { require "overloading.pm" }

[perl.git] branch sprout/carp-strval updated. v5.27.8-399-gce79635448

2018-02-26 Thread Father Chrysostomos
In perl.git, the branch sprout/carp-strval has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/ce796354483847023b2bf19c360d1d5e4aeff094?hp=1c8877803b068ad3fba7f7cae55fd6dac8f20a25>

  discards  1c8877803b068ad3fba7f7cae55fd6dac8f20a25 (commit)
- Log -
commit ce796354483847023b2bf19c360d1d5e4aeff094
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Feb 26 01:23:53 2018 -0800

Carp: Avoid run-time mods; StrVal workarounds

Carp needs to avoid loading modules while reporting errors, because
it may be invoked via $SIG{__DIE__} after a syntax error, when BEGIN
blocks are forbidden.

Before this commit (as of v5.27.8-360-gc99363a) it was doing just that
for reference arguments within stack traces.

That means we either need to load overload.pm at start-up so that
overload::StrVal is already available, or avoid overload::StrVal
altogether.

It turns out that various versions of overload::StrVal have
their own problems that prevent Carp from using them (out-
lined in the comments added to Carp.pm and also described at
<https://rt.perl.org/Ticket/Display.html?id=132902#txn-1535564>).

So we now follow two approaches:  If overloading.pm is available, use
that; otherwise, use a hideous workaround inspired by ancient imple-
entations of overload::StrVal and Scalar::Util::blessed, while avoid-
ing the bugs in those old versions.

---

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

diff --git a/dist/Carp/lib/Carp.pm b/dist/Carp/lib/Carp.pm
index 5c741e9d72..6bd8fe6822 100644
--- a/dist/Carp/lib/Carp.pm
+++ b/dist/Carp/lib/Carp.pm
@@ -186,8 +186,8 @@ BEGIN {
 # This test seeks to see if it has been set up.  "((" post-
 # dates overloading.pm, so we can skip it.
 return "$_[0]" unless _mycan($pack, "()");
-# Even at this point, the invocant may not be blessed, so check
-# for that.
+# Even at this point, the invocant may not be blessed, so
+# check for that.
 return "$_[0]" if not _blessed($_[0]);
 bless $_[0], "Carp";
 my $str = "$_[0]";

-- 
Perl5 Master Repository


[perl.git] branch sprout/carp-strval updated. v5.27.8-399-g1c8877803b

2018-02-26 Thread Father Chrysostomos
In perl.git, the branch sprout/carp-strval has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/1c8877803b068ad3fba7f7cae55fd6dac8f20a25?hp=4dd27c818de7e7816be57b28d52738bc661a504c>

  discards  4dd27c818de7e7816be57b28d52738bc661a504c (commit)
- Log -
commit 1c8877803b068ad3fba7f7cae55fd6dac8f20a25
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Feb 26 01:23:53 2018 -0800

Carp: Avoid run-time mods; StrVal workarounds

Carp needs to avoid loading modules while reporting errors, because
it may be invoked via $SIG{__DIE__} after a syntax error, when BEGIN
blocks are forbidden.

Before this commit (as of v5.27.8-360-gc99363a) it was doing just that
for reference arguments within stack traces.

That means we either need to load overload.pm at start-up so that
overload::StrVal is already available, or avoid overload::StrVal
altogether.

It turns out that various versions of overload::StrVal have
their own problems that prevent Carp from using them (out-
lined in the comments added to Carp.pm and also described at
<https://rt.perl.org/Ticket/Display.html?id=132902#txn-1535564>).

So we now follow two approaches:  If overloading.pm is available, use
that; otherwise, use a hideous workaround inspired by ancient imple-
entations of overload::StrVal and Scalar::Util::blessed, while avoid-
ing the bugs in those old versions.

---

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

diff --git a/dist/Carp/lib/Carp.pm b/dist/Carp/lib/Carp.pm
index d403021fc2..5c741e9d72 100644
--- a/dist/Carp/lib/Carp.pm
+++ b/dist/Carp/lib/Carp.pm
@@ -172,7 +172,7 @@ BEGIN {
 local *$probe = sub { "unlikely string" };
 local $@;
 local $SIG{__DIE__} = sub{};
-eval { $_[0]->$probe } eq 'unlikely string'
+(eval { $_[0]->$probe } || '') eq 'unlikely string'
   }
 : do {
 my $isa = _fetch_sub(qw 'UNIVERSAL isa');

-- 
Perl5 Master Repository


[perl.git] branch sprout/carp-strval updated. v5.27.8-399-g4dd27c818d

2018-02-26 Thread Father Chrysostomos
In perl.git, the branch sprout/carp-strval has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/4dd27c818de7e7816be57b28d52738bc661a504c?hp=c6edd2e99cc4d0329c61165ff9fa4b453622d6b4>

  discards  c6edd2e99cc4d0329c61165ff9fa4b453622d6b4 (commit)
- Log -
commit 4dd27c818de7e7816be57b28d52738bc661a504c
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Feb 26 01:23:53 2018 -0800

Carp: Avoid run-time mods; StrVal workarounds

Carp needs to avoid loading modules while reporting errors, because
it may be invoked via $SIG{__DIE__} after a syntax error, when BEGIN
blocks are forbidden.

Before this commit (as of v5.27.8-360-gc99363a) it was doing just that
for reference arguments within stack traces.

That means we either need to load overload.pm at start-up so that
overload::StrVal is already available, or avoid overload::StrVal
altogether.

It turns out that various versions of overload::StrVal have
their own problems that prevent Carp from using them (out-
lined in the comments added to Carp.pm and also described at
<https://rt.perl.org/Ticket/Display.html?id=132902#txn-1535564>).

So we now follow two approaches:  If overloading.pm is available, use
that; otherwise, use a hideous workaround inspired by ancient imple-
entations of overload::StrVal and Scalar::Util::blessed, while avoid-
ing the bugs in those old versions.

---

Summary of changes:
 dist/Carp/lib/Carp.pm | 4 ++--
 dist/Carp/t/stack_after_err.t | 8 ++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/dist/Carp/lib/Carp.pm b/dist/Carp/lib/Carp.pm
index 632fd6abae..d403021fc2 100644
--- a/dist/Carp/lib/Carp.pm
+++ b/dist/Carp/lib/Carp.pm
@@ -172,7 +172,7 @@ BEGIN {
 local *$probe = sub { "unlikely string" };
 local $@;
 local $SIG{__DIE__} = sub{};
-eval { $_[0]->$probe } eq 'unilkely string'
+eval { $_[0]->$probe } eq 'unlikely string'
   }
 : do {
 my $isa = _fetch_sub(qw 'UNIVERSAL isa');
@@ -182,7 +182,7 @@ BEGIN {
 *_StrVal = sub {
 my $pack = ref $_[0];
 # Perl's overload mechanism uses the presence of a special
-# "method" named "((" or "()" to signal it it is effect.
+# "method" named "((" or "()" to signal it is in effect.
 # This test seeks to see if it has been set up.  "((" post-
 # dates overloading.pm, so we can skip it.
 return "$_[0]" unless _mycan($pack, "()");
diff --git a/dist/Carp/t/stack_after_err.t b/dist/Carp/t/stack_after_err.t
index 8f4e539b3c..8bf5be965a 100644
--- a/dist/Carp/t/stack_after_err.t
+++ b/dist/Carp/t/stack_after_err.t
@@ -28,13 +28,15 @@ like(
   }
   BEGIN {
   *{"o::()"} = sub {};
+  *{'o::(""'} = sub {"hay"};
+  $o::OVERLOAD{dummy}++; # perls before 5.18 need this
   *{"CODE::()"} = sub {};
   $SIG{__DIE__} = sub { foom (@_, bless([], o), sub {}) }
   }
 $a +
 >,
 ),
-qr 'Looks lark.*o=ARRAY's,
+qr 'Looks lark.*o=ARRAY.* CODE's,
'Carp does not try to load modules on demand for overloaded args',
 );
 
@@ -50,6 +52,8 @@ my $prog = q<
   }
   BEGIN {
   *{"o::()"} = sub {};
+  *{'o::(""'} = sub {"hay"};
+  $o::OVERLOAD{dummy}++; # perls before 5.18 need this
   *{"CODE::()"} = sub {};
   $SIG{__DIE__} = sub { foom (@_, bless([], o), sub{}) }
   }
@@ -63,7 +67,7 @@ for (
 ) {
 my ($tn, $preamble) = @$_;
 like(runperl( prog => "$preamble$prog" ),
- qr 'Looks lark.*o=ARRAY's,
+ qr 'Looks lark.*o=ARRAY.* CODE's,
 "StrVal fallback in the presence of $tn",
 )
 }

-- 
Perl5 Master Repository


[perl.git] branch sprout/carp-strval updated. v5.27.8-399-gc6edd2e99c

2018-02-26 Thread Father Chrysostomos
In perl.git, the branch sprout/carp-strval has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/c6edd2e99cc4d0329c61165ff9fa4b453622d6b4?hp=16ee47fe0e6db78371331e9f1f5f13f7965cc631>

  discards  16ee47fe0e6db78371331e9f1f5f13f7965cc631 (commit)
- Log -
commit c6edd2e99cc4d0329c61165ff9fa4b453622d6b4
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Feb 26 01:23:53 2018 -0800

Carp: Avoid run-time mods; StrVal workarounds

Carp needs to avoid loading modules while reporting errors, because
it may be invoked via $SIG{__DIE__} after a syntax error, when BEGIN
blocks are forbidden.

Before this commit (as of v5.27.8-360-gc99363a) it was doing just that
for reference arguments within stack traces.

That means we either need to load overload.pm at start-up so that
overload::StrVal is already available, or avoid overload::StrVal
altogether.

It turns out that various versions of overload::StrVal have
their own problems that prevent Carp from using them (out-
lined in the comments added to Carp.pm and also described at
<https://rt.perl.org/Ticket/Display.html?id=132902#txn-1535564>).

So we now follow two approaches:  If overloading.pm is available, use
that; otherwise, use a hideous workaround inspired by ancient imple-
entations of overload::StrVal and Scalar::Util::blessed, while avoid-
ing the bugs in those old versions.

---

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

diff --git a/MANIFEST b/MANIFEST
index 2b8859ca66..b054110b65 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2974,8 +2974,8 @@ dist/Carp/t/Carp_overloadless.t   See if Carp 
handles overloads that dont use ove
 dist/Carp/t/errno.tSee if Carp preserves $! and $^E
 dist/Carp/t/heavy.tSee if Carp::Heavy works
 dist/Carp/t/heavy_mismatch.t   See if Carp::Heavy catches version 
mismatch
-dist/Carp/t/stack_after_err.t  Test stack traces after syntax errors
 dist/Carp/t/rt52610_crash.tTest that we can gracefully handle 
serializing the stack with stack-refcounting bugs
+dist/Carp/t/stack_after_err.t  Test stack traces after syntax errors
 dist/Carp/t/stash_deletion.t   See if Carp handles stash deletion
 dist/Carp/t/swash.tSee if Carp avoids breaking swash loading
 dist/Carp/t/vivify_gv.tSee if Carp leaves utf8:: stuff alone

-- 
Perl5 Master Repository


[perl.git] branch sprout/carp-strval created. v5.27.8-399-g16ee47fe0e

2018-02-26 Thread Father Chrysostomos
In perl.git, the branch sprout/carp-strval has been created

<https://perl5.git.perl.org/perl.git/commitdiff/16ee47fe0e6db78371331e9f1f5f13f7965cc631?hp=>

at  16ee47fe0e6db78371331e9f1f5f13f7965cc631 (commit)

- Log -
commit 16ee47fe0e6db78371331e9f1f5f13f7965cc631
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Feb 26 01:23:53 2018 -0800

Carp: Avoid run-time mods; StrVal workarounds

Carp needs to avoid loading modules while reporting errors, because
it may be invoked via $SIG{__DIE__} after a syntax error, when BEGIN
blocks are forbidden.

Before this commit (as of v5.27.8-360-gc99363a) it was doing just that
for reference arguments within stack traces.

That means we either need to load overload.pm at start-up so that
overload::StrVal is already available, or avoid overload::StrVal
altogether.

It turns out that various versions of overload::StrVal have
their own problems that prevent Carp from using them (out-
lined in the comments added to Carp.pm and also described at
<https://rt.perl.org/Ticket/Display.html?id=132902#txn-1535564>).

So we now follow two approaches:  If overloading.pm is available, use
that; otherwise, use a hideous workaround inspired by ancient imple-
entations of overload::StrVal and Scalar::Util::blessed, while avoid-
ing the bugs in those old versions.

---

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.8-395-g4373105b7a

2018-02-25 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/4373105b7a4848164ced49de0e164ad0042cc2ca?hp=d1b150d9136b2bfacd23a52dfd12315b0896e8f7>

- Log -
commit 4373105b7a4848164ced49de0e164ad0042cc2ca
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Feb 25 13:31:34 2018 -0800

Upgrade ExtUtils::MakeMaker to 7.33_03

commit 847097976ffcb1acb37db23236cf321e8584bc31
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Feb 25 13:29:36 2018 -0800

sync-with-cpan: Allow relative dir for tarball

---

Summary of changes:
 Porting/Maintainers.pl  | 2 +-
 Porting/sync-with-cpan  | 5 -
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command.pm | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm | 5 +++--
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm  | 5 +++--
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm   | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm   | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm| 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm| 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm| 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm   | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm| 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Locale.pm| 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version.pm   | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/regex.pm | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm  | 2 +-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm | 2 +-
 cpan/ExtUtils-MakeMaker/t/03-xsstatic.t | 2 +-
 35 files changed, 42 insertions(+), 37 deletions(-)

diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 3624020f0f..c80ae6b23b 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -473,7 +473,7 @@ use File::Glob qw(:case);
 },
 
 'ExtUtils::MakeMaker' => {
-'DISTRIBUTION' => 'BINGOS/ExtUtils-MakeMaker-7.32.tar.gz',
+'DISTRIBUTION' => 'BINGOS/ExtUtils-MakeMaker-7.33_03.tar.gz',
 'FILES'=> q[cpan/ExtUtils-MakeMaker],
 'EXCLUDED' => [
 qr{^t/lib/Test/},
diff --git a/Porting/sync-with-cpan b/Porting/sync-with-cpan
index db42fc4afa..f81e14abae 100755
--- a/Porting/sync-with-cpan
+++ b/Porting/sync-with-cpan
@@ -137,7 +137,7 @@ use Archive::Tar;
 use File::Basename qw( basename );
 use File::Path qw( remove_tree );
 use File::Find;
-use File::Spec::Functions qw( tmpdir );
+use File::Spec::Functions qw( tmpdir rel2abs );
 use Config qw( %Config );
 
 $| = 1;
@@ -282,6 +282,8 @@ if (!-d $files [0] || grep { $_ eq $module } @problematic) {
 say "--force is in effect, so we'll soldier on. Wish me luck!";
 }
 
+use Cwd 'cwd';
+my $orig_pwd = cwd();
 
 chdir "cpan";
 
@@ -317,6 +319,7 @@ sub wget {
 my $new_file;
 my $new_version;
 if (defined $tarball) {
+$tarball = rel2abs( $tarball, $orig_pwd ) ;
 die "Tarball $tarball does not exist\n" if !-e $tarball;
 die "Tarball $tarball is not a plain file\n" if !-f _;
 $new_file = $tarball;
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command.pm 
b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command.pm
index 3eaa30a0e5..e03f9cb508 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command.pm
+++ b/cpan/Ex

[perl.git] branch blead updated. v5.27.8-385-gc1cc29fd0c

2018-02-24 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/c1cc29fd0c75ba66cac01113aa5a22009dcea306?hp=7c93a4714664dfc1aed62ada328290af9eba350a>

- Log -
commit c1cc29fd0c75ba66cac01113aa5a22009dcea306
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sat Feb 24 17:47:25 2018 -0800

Allow goto into glob’s arg

$ ./perl -Ilib  -Xe 'goto foo; glob do { foo:  $1}'
Can't "goto" into a binary or list expression at -e line 1.

What binary or list expression?  True, glob has the *precedence* of a list 
operator, but so does not:

$ ./perl -Ilib  -Xe 'goto foo; not do { foo:  $1}; prt "ok\n"'
ok

Glob seems to be the only exception, due to its ‘special’ op tree.

commit 525265aa28069ae999f24e172ba9fd1f9f4dad55
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sat Feb 24 17:43:26 2018 -0800

perlfunc:goto: Correct and clarify

---

Summary of changes:
 pod/perlfunc.pod | 5 +++--
 pp_ctl.c | 1 +
 t/op/goto.t  | 4 +++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 6b04a0cd07..990f7e815a 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -3459,8 +3459,9 @@ go into any construct that requires initialization, such 
as a
 subroutine, a C loop, or a C
 block.  In general, it may not be used to jump into the parameter
 of a binary or list operator, but it may be used to jump into the
-I parameter of a binary operator or other operator that takes
-a fixed number of arguments.  It also can't be used to go into a
+I parameter of a binary operator.  (The C<=>
+assignment operator's "first" operand is its right-hand
+operand.)  It also can't be used to go into a
 construct that is optimized away.
 
 The C form is quite different from the other forms of
diff --git a/pp_ctl.c b/pp_ctl.c
index ddcbf7c0e3..c046eda267 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2676,6 +2676,7 @@ S_dofindlabel(pTHX_ OP *o, const char *label, STRLEN len, 
U32 flags, OP **opstac
  && o->op_type != OP_LINESEQ
  && o->op_type != OP_SREFGEN
  && o->op_type != OP_ENTEREVAL
+ && o->op_type != OP_GLOB
  && o->op_type != OP_RV2CV) {
OP * const kid = cUNOPo->op_first;
if (OP_GIMME(kid, 0) != G_SCALAR || OpHAS_SIBLING(kid))
diff --git a/t/op/goto.t b/t/op/goto.t
index 7f03bc00e4..88715c39de 100644
--- a/t/op/goto.t
+++ b/t/op/goto.t
@@ -10,7 +10,7 @@ BEGIN {
 
 use warnings;
 use strict;
-plan tests => 123;
+plan tests => 124;
 our $TODO;
 
 my $deprecated = 0;
@@ -858,6 +858,8 @@ is sub { goto z; exit do { z: return "foo" } }->(), 'foo',
'goto into exit';
 is sub { goto z; eval do { z: "'foo'" } }->(), 'foo',
'goto into eval';
+is join(",",sub { goto z; glob do { z: "foo bar" } }->()), 'foo,bar',
+   'goto into glob';
 
 # [perl #132799]
 # Erroneous inward goto warning, followed by crash.

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.8-373-g6be4176c4f

2018-02-24 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/6be4176c4fe0401e3bf0025896796a0f0408089d?hp=e5a551284a63f7f984d48babddbc0b25cf95058a>

- Log -
commit 6be4176c4fe0401e3bf0025896796a0f0408089d
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sat Feb 24 10:14:45 2018 -0800

PathTools/Changes: Retroactively mention CPAN RT #114236

So that new releases will have a more complete and helpful
change log.

---

Summary of changes:
 dist/PathTools/Changes | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dist/PathTools/Changes b/dist/PathTools/Changes
index b256d98878..722655285e 100644
--- a/dist/PathTools/Changes
+++ b/dist/PathTools/Changes
@@ -8,6 +8,7 @@ Revision history for Perl distribution PathTools.
 - [perl #132853] Add metadata (ABSTRACT, LICENSE, AUTHOR)
 - [perl #132733] Skip cwd_enoent test on Cygwin
 - [perl #132651] Avoid infinite recursion in _perl_abs_path()
+- [rt.cpan.org #114236] Compatibility with File::Path 2.06_04
 
 3.72
 - [perl #132648] Correct error returns from fast_abs_path()

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.8-367-g7bb6e12450

2018-02-23 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/7bb6e12450c58b7094ccdfa7025fa495d3996bcf?hp=b4dcd72d7c1fd970030db81f13b3824d51aeb9b6>

- Log -
commit 7bb6e12450c58b7094ccdfa7025fa495d3996bcf
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Fri Feb 23 19:32:51 2018 -0800

Carp: Avoid string eval

Carp’s particular use of string eval is unnecessary in this case, and
slower than the alternative.  Carp’s reason for using string eval is
to avoid the effect of bareword require vivifying a package.  But that
only applies to bareword require, and not other forms of require:

$ perl -le 'print $::{"overload::"}||"nothing"; require overload'
*main::overload::
$ perl -le 'print $::{"overload::"}||"nothing"; require "overload.pm"'
nothing

Since string eval has to set up a parser and a new scope, it is much
slower that require, and quite unnecessary here.

---

Summary of changes:
 dist/Carp/lib/Carp.pm | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dist/Carp/lib/Carp.pm b/dist/Carp/lib/Carp.pm
index 610e07fe1a..3de78d9f6f 100644
--- a/dist/Carp/lib/Carp.pm
+++ b/dist/Carp/lib/Carp.pm
@@ -343,10 +343,10 @@ sub format_arg {
# so we need to use overload::StrVal() below.  But it's
# possible that the overload module hasn't been loaded:
# overload methods can be installed without it.  So load
-   # the module here.  The eval layer here avoids the
-   # compile-time effect of require vivifying the target
-   # module's stash.
-eval "require overload; 1"
+   # the module here.  The bareword form of require is here
+   # eschewed to avoid iths compile-time effect of vivifying
+   # vivifying the target module's stash.
+require "overload.pm"
 or return "use overload failed";
 }
 my $sub = _fetch_sub(overload => 'StrVal');

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.8-366-gb4dcd72d7c

2018-02-23 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/b4dcd72d7c1fd970030db81f13b3824d51aeb9b6?hp=d594884e1d755afc27a0fee39c2025cc581a3dc4>

- Log -
commit b4dcd72d7c1fd970030db81f13b3824d51aeb9b6
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Fri Feb 23 17:59:09 2018 -0800

[perl #132854] Allow goto into first arg of bin op

This particular case does not risk any stack corruption, and there is
a CPAN module depending on it working (PerlX::AsyncAwait).

---

Summary of changes:
 pod/perldelta.pod |  7 ++-
 pod/perlfunc.pod  |  4 +++-
 pp_ctl.c  |  8 
 t/op/goto.t   | 12 +++-
 4 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index e7260c7036..922c2a649f 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -284,7 +284,12 @@ XXX Changes (i.e. rewording) of diagnostic messages go here
 
 =item *
 
-XXX Describe change here
+The new (as of 5.27.8) restriction forbidding use of C to enter the
+argument of a binary or list expression (see LgotoE into a binary or list expression">) has been relaxed to
+allow entering the I argument of an operator that takes a fixed
+number of arguments, since this is a case that will not cause stack
+corruption.  [perl #132854]
 
 =back
 
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 53a19af531..ce989b0a0c 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -3458,7 +3458,9 @@ deprecated and will issue a warning.  Even then, it may 
not be used to
 go into any construct that requires initialization, such as a
 subroutine, a C loop, or a C
 block.  In general, it may not be used to jump into the parameter
-of a binary or list operator.  It also can't be used to go into a
+of a binary or list operator, but it may be used to jump into the
+I parameter of a binary operator or other operator that takes
+a fixed number of arguments.  It also can't be used to go into a
 construct that is optimized away.
 
 The C form is quite different from the other forms of
diff --git a/pp_ctl.c b/pp_ctl.c
index 89eca4b92a..ddcbf7c0e3 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2687,6 +2687,7 @@ S_dofindlabel(pTHX_ OP *o, const char *label, STRLEN len, 
U32 flags, OP **opstac
 *ops = 0;
 if (o->op_flags & OPf_KIDS) {
OP *kid;
+   OP * const kid1 = cUNOPo->op_first;
/* First try all the kids at this level, since that's likeliest. */
for (kid = cUNOPo->op_first; kid; kid = OpSIBLING(kid)) {
if (kid->op_type == OP_NEXTSTATE || kid->op_type == OP_DBSTATE) {
@@ -2709,6 +2710,7 @@ S_dofindlabel(pTHX_ OP *o, const char *label, STRLEN len, 
U32 flags, OP **opstac
}
}
for (kid = cUNOPo->op_first; kid; kid = OpSIBLING(kid)) {
+   bool first_kid_of_binary = FALSE;
if (kid == PL_lastgotoprobe)
continue;
if (kid->op_type == OP_NEXTSTATE || kid->op_type == OP_DBSTATE) {
@@ -2721,8 +2723,14 @@ S_dofindlabel(pTHX_ OP *o, const char *label, STRLEN 
len, U32 flags, OP **opstac
else
*ops++ = kid;
}
+   if (kid == kid1 && ops != opstack && ops[-1] == UNENTERABLE) {
+   first_kid_of_binary = TRUE;
+   ops--;
+   }
if ((o = dofindlabel(kid, label, len, flags, ops, oplimit)))
return o;
+   if (first_kid_of_binary)
+   *ops++ = UNENTERABLE;
}
 }
 *ops = 0;
diff --git a/t/op/goto.t b/t/op/goto.t
index 2bd7972945..7f03bc00e4 100644
--- a/t/op/goto.t
+++ b/t/op/goto.t
@@ -10,7 +10,7 @@ BEGIN {
 
 use warnings;
 use strict;
-plan tests => 122;
+plan tests => 123;
 our $TODO;
 
 my $deprecated = 0;
@@ -870,3 +870,13 @@ sub _routine {
 }
 _routine();
 pass("bug 132799");
+
+# [perl #132854]
+# Goto the *first* parameter of a binary expression, which is harmless.
+eval {
+goto __GEN_2;
+my $sent = do {
+__GEN_2:
+};
+};
+is $@,'', 'goto the first parameter of a binary expression [perl #132854]';

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.8-317-g2a05854a1a

2018-02-18 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/2a05854a1ad5472d00de22f8fcc284cdc8fd1503?hp=6de18f4499a45f0d6876f2aca180b8a9f06e9240>

- Log -
commit 2a05854a1ad5472d00de22f8fcc284cdc8fd1503
Merge: 6de18f4499 957ac2541b
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Feb 18 16:41:09 2018 -0800

[Merge] ‘Nonelem’ scalars

commit 957ac2541beb14cbb7de197c83c0f7132c06a9ed
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Feb 18 16:41:02 2018 -0800

perldelta for non-elems

I don’t think the bug involving defelems, which this branch partially
fixes is significant enough to be mentioned in the bugs section.

Likewise, the memory leaks fixed (some of them introduced in the
same dev cycle) are so rare that it would add unnecessary verbiage
to perldelta.

commit 9ef753fe465d865deeba96157242bc98c0afe412
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Feb 18 16:12:11 2018 -0800

Fix ary shifting when sparse ary is passed to sub

This commit fixes #132729 in the specific case where a nonexistent
element within a sparse array is passed to a subroutine.

Prior to this commit,

some_sub($sparse_array[$n])

where $n <= $#sparse_array and the element does not exist, would exhi-
bit erroneous behaviour if some_sub shifted or unshifted the original
@sparse_array.  Any ‘holes’ (nonexistent elements) in the array would
show up in @_ as deferred element (defelem) scalars, magic scalars
that remember their index in the array.  This index is not updated and
gets out of synch when the array is shifted.

This commit fixes the bug for elements within the array by using the
new ‘nonelem’ magic introduced a few commits ago.  It stores within
the array a magic scalar that is marked as being nonexistent.

It also reduced the number of scalars that need to be created if such
a sub call happens repeatedly.

commit 7406cffe8ec122fcc2500115f8ed1742385893e1
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Tue Feb 13 13:36:22 2018 -0800

Fix two bugs when calling  when @_ has holes

This fixes #132729 in the particular instance where an XSUB is
called via ampersand syntax when @_ has ‘holes’, or nonexistent ele-
ments, as in:

@_ = ();
$_[1] = 1;


This means that if the XSUB or something it calls unshifts @_, the
first argument passed to the XSUB will now refer to $_[1], not $_[0];
i.e., as of this commit it is correctly shifted over.  Previously, a
‘defelem’ was used, which is a magical scalar that remembers its index
in the array, independent of whether the array was shifted.

In addition, the old code failed to mortalize the defelem, so this
commit fixes a memory leak with the new ‘non-elem’ mechanism (a spe-
cially-marked element stored in the array itself).

commit c46431c409d5cdb3c1c17c039a19e0e03356c7a6
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Feb 11 17:14:20 2018 -0800

Test #132729 with array flattening

Other instances of this bug have not yet been fixed.  This commit’s
grandparent fixed the case where an array with holes in it is flat-
tened in lvalue context, and then gets shifted/unshifted before
an element is vivified.

commit eb2991224f3c7972426fe6ab6b3fe5c08699e502
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Feb 11 17:01:26 2018 -0800

svleak.t: Test for leak fixed by prev. commit

commit 1f1dcfb516e063c29a4b9823ad97b1fc58ffc930
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Jan 21 21:55:00 2018 -0800

‘Nonelems’ for pushing sparse array on the stack

To avoid having to create deferred elements every time a sparse array
is pushed on to the stack, store a magic scalar in the array itself,
which av_exists and refto recognise as not existing.

This means there is only a one-time cost for putting such arrays on
the stack.

It also means that deferred elements that live long enough don’t
start pointing to the wrong array entry if the array gets shifted (or
unshifted/spliced) in the mean time.  Instead, the scalar is already
in the array, so it cannot lose its place.  This fix only applies
when the array as a whole is pushed on to the stack, but it could be
extended in future commits to apply to other places where we currently
use deferred elements.

---

Summary of changes:
 av.c  | 13 +
 embed.fnc |  2 ++
 embed.h   |  2 ++
 ext/XS-APItest/APItest.xs |  7 +++
 mg.c  |  9 +
 mg_names.inc  |  1 +
 mg_raw.h 

[perl.git] branch blead updated. v5.27.8-247-ga7caeb5ea5

2018-02-11 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/a7caeb5ea5f808dade098c97e87d3354b994f68f?hp=5b95d1b1b5e7cb1ddfe987a377507d21b7d91587>

- Log -
commit a7caeb5ea5f808dade098c97e87d3354b994f68f
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Feb 11 12:40:09 2018 -0800

Test for _at_level functions with fh

commit 25ebbc22701a587d60124611ae3b072d2d47883a
Author: Slaven Rezić <sla...@rezic.de>
Date:   Sun Feb 11 12:36:07 2018 -0800

warnings: Omit handle when $. is 0

otherwise the new _at_level functions end up including
‘at  line 0’.

[Commit message by the committer.]

---

Summary of changes:
 lib/warnings.pm |  2 +-
 regen/warnings.pl   |  2 +-
 t/lib/warnings/9enabled | 18 ++
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/lib/warnings.pm b/lib/warnings.pm
index ea88daf891..911c5aad5a 100644
--- a/lib/warnings.pm
+++ b/lib/warnings.pm
@@ -448,7 +448,7 @@ sub __chk
 # If we have an explicit level, bypass Carp.
 if ($has_level and @callers_bitmask) {
my $stuff = " at " . join " line ", (caller $i)[1,2];
-   $stuff .= ", <" . *${^LAST_FH}{NAME} . "> line $." if ${^LAST_FH};
+   $stuff .= ", <" . *${^LAST_FH}{NAME} . "> line $." if $. && ${^LAST_FH};
die "$message$stuff.\n" if $results[0];
return warn "$message$stuff.\n";
 }
diff --git a/regen/warnings.pl b/regen/warnings.pl
index a94a7522e8..ef2d16999b 100644
--- a/regen/warnings.pl
+++ b/regen/warnings.pl
@@ -765,7 +765,7 @@ sub __chk
 # If we have an explicit level, bypass Carp.
 if ($has_level and @callers_bitmask) {
my $stuff = " at " . join " line ", (caller $i)[1,2];
-   $stuff .= ", <" . *${^LAST_FH}{NAME} . "> line $." if ${^LAST_FH};
+   $stuff .= ", <" . *${^LAST_FH}{NAME} . "> line $." if $. && ${^LAST_FH};
die "$message$stuff.\n" if $results[0];
return warn "$message$stuff.\n";
 }
diff --git a/t/lib/warnings/9enabled b/t/lib/warnings/9enabled
index bbef5e8d41..7a9acd4bb8 100644
--- a/t/lib/warnings/9enabled
+++ b/t/lib/warnings/9enabled
@@ -1436,3 +1436,21 @@ Died: A fatal syntax warning at - line 25.
 A syntax warning at - line 23.
 A utf8 warning at - line 25.
 Died: A fatal utf8 warning at - line 23.
+
+# NAME _at_level with filehandle
+use warnings;
+# Create temp file for testing handles.
+open oUt, ">tmp" or die $!;
+print oUt "foo\nbar\n";
+close oUt;
+sub bimp {
+ open FH, "tmp";
+ ; ;
+ warnings::warn_at_level("syntax", 0, "Foo warning");
+ close FH;
+ warnings::warn_at_level("syntax", 0, "Bar warning");
+};
+bimp;
+EXPECT
+Foo warning at - line 13,  line 2.
+Bar warning at - line 13.

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.8-154-g4bfb5532d3

2018-02-04 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/4bfb5532d393d56b18d13bc19f70f6f7a64ae781?hp=ae315a0a3c51e68887704d4907bb6a502a6d4e3f>

- Log -
commit 4bfb5532d393d56b18d13bc19f70f6f7a64ae781
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Feb 4 22:50:15 2018 -0800

[perl #132799] Fix goto within block within expr

When goto looks for a label, it builds up a list of ops to enter.  But
it begins its search a little too far out relative to the ‘goto’.
Hence, the first op gets skipped.

In 6d90e983841, I forbade same cases of inward goto-into-expression to
avoid stack corruption and crashes.  I did this by pushing a marker
on to the list of ops to enter, indicating that an error should be
thrown instead.

Because goto starts the search too far up the context stack, it would
sometimes end up looking inside an expression, which would cause the
first op on the entry list to be such a marker, meaning that the next
item, which should have been skipped, would not be.

That could really screw up the context stack for cases like:

my $e = eval { goto label; label: }

because the entry list would be:

 entertry

instead of the previous:

entertry

Hence, entertry (which enters eval{}) would be executed from *within*
the eval, causing the exit of the eval to leave an eval on the context
stack.  Crashes ensued.

This commit fixes it by checking whether we have moved past the begin-
ning of the list of entry ops before pushing a croak-marker on to it.

Goto’s implementation is really complex, and always has been.  It
could be greatly simplified now thot ops have parent pointers.  But
that should wait for another developement cycle.

---

Summary of changes:
 pp_ctl.c| 10 ++
 t/op/goto.t | 14 +-
 2 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/pp_ctl.c b/pp_ctl.c
index 4da40e39b3..89eca4b92a 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2645,6 +2645,7 @@ PP(pp_redo)
 }
 
 #define UNENTERABLE (OP *)1
+#define GOTO_DEPTH 64
 
 STATIC OP *
 S_dofindlabel(pTHX_ OP *o, const char *label, STRLEN len, U32 flags, OP 
**opstack, OP **oplimit)
@@ -2665,11 +2666,12 @@ S_dofindlabel(pTHX_ OP *o, const char *label, STRLEN 
len, U32 flags, OP **opstac
 {
*ops++ = cUNOPo->op_first;
 }
-else if (o->op_flags & OPf_KIDS
+else if (oplimit - opstack < GOTO_DEPTH) {
+  if (o->op_flags & OPf_KIDS
  && cUNOPo->op_first->op_type == OP_PUSHMARK) {
*ops++ = UNENTERABLE;
-}
-else if (o->op_flags & OPf_KIDS && PL_opargs[o->op_type]
+  }
+  else if (o->op_flags & OPf_KIDS && PL_opargs[o->op_type]
  && OP_CLASS(o) != OA_LOGOP
  && o->op_type != OP_LINESEQ
  && o->op_type != OP_SREFGEN
@@ -2678,6 +2680,7 @@ S_dofindlabel(pTHX_ OP *o, const char *label, STRLEN len, 
U32 flags, OP **opstac
OP * const kid = cUNOPo->op_first;
if (OP_GIMME(kid, 0) != G_SCALAR || OpHAS_SIBLING(kid))
*ops++ = UNENTERABLE;
+  }
 }
 if (ops >= oplimit)
Perl_croak(aTHX_ "%s", too_deep);
@@ -2752,7 +2755,6 @@ PP(pp_goto)
 OP *retop = NULL;
 I32 ix;
 PERL_CONTEXT *cx;
-#define GOTO_DEPTH 64
 OP *enterops[GOTO_DEPTH];
 const char *label = NULL;
 STRLEN label_len = 0;
diff --git a/t/op/goto.t b/t/op/goto.t
index 9b7e5ec2f7..2bd7972945 100644
--- a/t/op/goto.t
+++ b/t/op/goto.t
@@ -10,7 +10,7 @@ BEGIN {
 
 use warnings;
 use strict;
-plan tests => 121;
+plan tests => 122;
 our $TODO;
 
 my $deprecated = 0;
@@ -858,3 +858,15 @@ is sub { goto z; exit do { z: return "foo" } }->(), 'foo',
'goto into exit';
 is sub { goto z; eval do { z: "'foo'" } }->(), 'foo',
'goto into eval';
+
+# [perl #132799]
+# Erroneous inward goto warning, followed by crash.
+# The eval must be in an assignment.
+sub _routine {
+my $e = eval {
+goto L2;
+  L2:
+}
+}
+_routine();
+pass("bug 132799");

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.8-149-g1e2cfe157c

2018-02-04 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/1e2cfe157cae98578de3c274bc64b8ea032b91e0?hp=2ea7b253ec46e8acd1ff2b09220c60eed34cd337>

- Log -
commit 1e2cfe157cae98578de3c274bc64b8ea032b91e0
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Feb 4 11:13:56 2018 -0800

Disable CV-in-stash optimization

outside of the main package.

Instead of actually reverting to the previous logic that excluded
packages other that main as a side effect of the logic being
faulty, this time I am checking for the main package explicitly.

---

Summary of changes:
 op.c   | 3 +++
 t/op/sub.t | 1 +
 2 files changed, 4 insertions(+)

diff --git a/op.c b/op.c
index 373822a349..c6f228b2e0 100644
--- a/op.c
+++ b/op.c
@@ -9847,9 +9847,12 @@ Perl_newATTRSUB_x(pTHX_ I32 floor, OP *o, OP *proto, OP 
*attrs,
   Also, we may be called from load_module at run time, so
   PL_curstash (which sets CvSTASH) may not point to the stash the
   sub is stored in.  */
+   /* XXX This optimization is currently disabled for packages other
+  than main, since there was too much CPAN breakage.  */
const I32 flags =
   ec ? GV_NOADD_NOINIT
  :   (IN_PERL_RUNTIME && PL_curstash != CopSTASH(PL_curcop))
+  || PL_curstash != PL_defstash
   || memchr(name, ':', namlen) || memchr(name, '\'', namlen)
? gv_fetch_flags
: GV_ADDMULTI | GV_NOINIT | GV_NOTQUAL;
diff --git a/t/op/sub.t b/t/op/sub.t
index 5de358ebf3..c8bf72d680 100644
--- a/t/op/sub.t
+++ b/t/op/sub.t
@@ -399,6 +399,7 @@ is ref($main::{rt_129916}), 'CODE', 'simple sub stored as 
CV in stash (main::)';
 sub foo { 42 }
 }
 {
+local $::TODO = "disabled for now";
 is ref($RT129916::{foo}), 'CODE', 'simple sub stored as CV in stash 
(non-main::)';
 }
 

-- 
Perl5 Master Repository


[perl.git] branch sprout/nonelem created. v5.27.8-12-g480bf6d3f3

2018-01-21 Thread Father Chrysostomos
In perl.git, the branch sprout/nonelem has been created

<https://perl5.git.perl.org/perl.git/commitdiff/480bf6d3f34da50d2e908a36e7ba574a2857b20e?hp=>

at  480bf6d3f34da50d2e908a36e7ba574a2857b20e (commit)

- Log -
commit 480bf6d3f34da50d2e908a36e7ba574a2857b20e
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Jan 21 21:55:00 2018 -0800

‘Nonelems’ for pushing sparse array on the stack

To avoid having to create deferred elements every time a sparse array
is pushed on to the stack, store a magic scalar in the array itself,
which av_exists and refto recognise as not existing.

This means there is only a one-time cost for putting such arrays on
the stack.

It also means that deferred elements that live long enough don’t
start pointing to the wrong array entry if the array gets shifted (or
unshifted/spliced) in the mean time.  Instead, the scalar is already
in the array, so it cannot lose its place.  This fix only applies
when the array as a whole is pushed on to the stack, but it could be
extended in future commits to apply to other places where we currently
use deferred elements.

---

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.8-11-g0f3591f944

2018-01-21 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/0f3591f94499f7771d7a8e07afb6776a93fc5f9f?hp=ef7498d2b69936a5c6476ecf1950066f638b2dac>

- Log -
commit 0f3591f94499f7771d7a8e07afb6776a93fc5f9f
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Jan 21 16:19:56 2018 -0800

Follow-up to fd77b29b3be4

As Zefram pointed out, I left in a piece of code that caused one
branch to continue to behave as before.  The change was ineffective
and the tests happened to be written in such a way as to take the
other branch.

---

Summary of changes:
 pp_hot.c |  2 --
 t/op/array.t | 18 +-
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/pp_hot.c b/pp_hot.c
index 1bc453a457..1b9fb9427a 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1175,8 +1175,6 @@ S_pushav(pTHX_ AV* const av)
 PADOFFSET i;
 for (i=0; i < (PADOFFSET)maxarg; i++) {
 SV *sv = AvARRAY(av)[i];
-   if (!LIKELY(sv))
-   AvARRAY(av)[i] = sv = newSV(0);
SP[i+1] = LIKELY(sv)
? sv
: UNLIKELY(PL_op->op_flags & OPf_MOD)
diff --git a/t/op/array.t b/t/op/array.t
index 9d0bfad4ef..aa595327bc 100644
--- a/t/op/array.t
+++ b/t/op/array.t
@@ -6,7 +6,7 @@ BEGIN {
 set_up_inc('.', '../lib');
 }
 
-plan (185);
+plan (188);
 
 #
 # @foo, @bar, and @ary are also used from tie-stdarray after tie-ing them
@@ -623,6 +623,22 @@ $#a = -1; $#a++;
'map {} @a does not vivify elements';
 $#a = -1;
 {local $a[3] = 12; my @foo=@a};
+is @a, 0,'unwinding localization of elem past end of array shrinks it';
+}
+{
+# Again, but with a non-magical array ($#a makes it magical)
+my @a = 1;
+delete $a[0];
+my @b = @a;
+ok !exists $a[0], 'copying an array via = does not vivify elements';
+delete $a[0];
+@a[1..5] = 1..5;
+my $count;
+my @existing_elements = map { exists $a[$count++] ? $_ : () } @a;
+is join(",", @existing_elements), "1,2,3,4,5",
+   'map {} @a does not vivify elements';
+@a = ();
+{local $a[3] = 12; my @foo=@a};
 is @a, 0, 'unwinding localization of elem past end of array shrinks it'
 }
 

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.7-215-gfd77b29b3b

2018-01-19 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/fd77b29b3be4108adb4a74b9c274599eaf228cb3?hp=a8e51187c21fee8697b9299b5303d90883b1eba9>

- Log -
commit fd77b29b3be4108adb4a74b9c274599eaf228cb3
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Fri Jan 19 13:47:53 2018 -0800

Don’t vivify elems when putting array on stack

6661956a2 was a little too powerful, and, in addition to fixing the
bug that @_ did not properly alias nonexistent elements, also broke
other uses of nonexistent array elements.  (See the tests added.)

This commit changes it so that putting @a on the stack does not vivify
all ‘holes’ in @a, but creates defelem (deferred element) scalars, but
only in lvalue context.

commit bcfce88b64155612fcd6af40e88805fe32c25b7f
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Fri Jan 19 12:41:15 2018 -0800

Apply the mod flag to @a in \(@a)

The next commit will depend on it.

---

Summary of changes:
 op.c | 12 ++--
 pp_hot.c | 14 +++---
 t/op/array.t | 33 -
 3 files changed, 53 insertions(+), 6 deletions(-)

diff --git a/op.c b/op.c
index 2b87f9c781..373822a349 100644
--- a/op.c
+++ b/op.c
@@ -4081,7 +4081,10 @@ Perl_op_lvalue_flags(pTHX_ OP *o, I32 type, U32 flags)
 case OP_RV2HV:
if (type == OP_REFGEN && o->op_flags & OPf_PARENS) {
PL_modcount = RETURN_UNLIMITED_NUMBER;
-   return o;   /* Treat \(@foo) like ordinary list. */
+   /* Treat \(@foo) like ordinary list, but still mark it as modi-
+  fiable since some contexts need to know.  */
+   o->op_flags |= OPf_MOD;
+   return o;
}
/* FALLTHROUGH */
 case OP_RV2GV:
@@ -4146,7 +4149,12 @@ Perl_op_lvalue_flags(pTHX_ OP *o, I32 type, U32 flags)
 case OP_PADHV:
PL_modcount = RETURN_UNLIMITED_NUMBER;
if (type == OP_REFGEN && o->op_flags & OPf_PARENS)
-   return o;   /* Treat \(@foo) like ordinary list. */
+   {
+   /* Treat \(@foo) like ordinary list, but still mark it as modi-
+  fiable since some contexts need to know.  */
+   o->op_flags |= OPf_MOD;
+   return o;
+   }
if (scalar_mod_type(o, type))
goto nomod;
if ((o->op_flags & OPf_WANT) != OPf_WANT_SCALAR
diff --git a/pp_hot.c b/pp_hot.c
index d479ecf218..1bc453a457 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1163,8 +1163,12 @@ S_pushav(pTHX_ AV* const av)
 if (UNLIKELY(SvRMAGICAL(av))) {
 PADOFFSET i;
 for (i=0; i < (PADOFFSET)maxarg; i++) {
-SV ** const svp = av_fetch(av, i, TRUE);
-SP[i+1] = svp ? *svp : _sv_undef;
+SV ** const svp = av_fetch(av, i, FALSE);
+SP[i+1] = LIKELY(svp)
+   ? *svp
+   : UNLIKELY(PL_op->op_flags & OPf_MOD)
+  ? newSVavdefelem(av,i,1)
+  : _sv_undef;
 }
 }
 else {
@@ -1173,7 +1177,11 @@ S_pushav(pTHX_ AV* const av)
 SV *sv = AvARRAY(av)[i];
if (!LIKELY(sv))
AvARRAY(av)[i] = sv = newSV(0);
-   SP[i+1] = sv;
+   SP[i+1] = LIKELY(sv)
+   ? sv
+   : UNLIKELY(PL_op->op_flags & OPf_MOD)
+  ? newSVavdefelem(av,i,1)
+  : _sv_undef;
 }
 }
 SP += maxarg;
diff --git a/t/op/array.t b/t/op/array.t
index 3d9b9d7900..9d0bfad4ef 100644
--- a/t/op/array.t
+++ b/t/op/array.t
@@ -6,7 +6,7 @@ BEGIN {
 set_up_inc('.', '../lib');
 }
 
-plan (179);
+plan (185);
 
 #
 # @foo, @bar, and @ary are also used from tie-stdarray after tie-ing them
@@ -595,4 +595,35 @@ $#a = -1; $#a++;
 is join("", @r), "55", "lazy element creation with foreach";
 }
 
+{ # Some things broken by the initial fix for #8910
+(\my @a)->$#*++;
+my @b = @a;
+ok !exists $a[0], 'copying an array via = does not vivify elements';
+delete $a[0];
+@a[1..5] = 1..5;
+$#a++;
+my $count;
+my @existing_elements = map { exists $a[$count++] ? $_ : () } @a;
+is join(",", @existing_elements), "1,2,3,4,5",
+   'map {} @a does not vivify elements';
+$#a = -1;
+{local $a[3] = 12; my @foo=@a};
+is @a, 0,'unwinding localization of elem past end of array shrinks it';
+
+# Again, but with a package array
+package tmp; (\our @a)->$#*++; package main;
+my @b = @a;
+ok !exists $a[0], 'copying an array via = does not vivify elements';
+delete $a[0];
+@a[1..5] = 1..5;
+$#a++;
+my $count;
+my @existing_eleme

[perl.git] branch blead updated. v5.27.7-173-gefa4252e63

2018-01-18 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/efa4252e63d0152e40ea6d9d8fc345fcea59c5f2?hp=847fe5626cf3eeafbd2b7b31f7b89607d29451c2>

- Log -
commit efa4252e63d0152e40ea6d9d8fc345fcea59c5f2
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Thu Jan 18 12:26:54 2018 -0800

Correct pad.c pod: PadARRAY, not PAD_ARRAY

---

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

diff --git a/pad.c b/pad.c
index ae43dcc35e..f73fc550f9 100644
--- a/pad.c
+++ b/pad.c
@@ -137,7 +137,7 @@ values for the pad for the currently-executing code.
 =for apidoc AmxU|SV **|PL_curpad
 
 Points directly to the body of the L array.
-(I.e., this is C<PAD_ARRAY(PL_comppad)>.)
+(I.e., this is C<PadARRAY(PL_comppad)>.)
 
 =cut
 */

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.7-137-g27169d3827

2018-01-15 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/27169d3827c027798ac2b8fbce9fe92773829bd4?hp=669d6ad81497efd33243c692e6f057f97c6c1567>

- Log -
commit 27169d3827c027798ac2b8fbce9fe92773829bd4
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Jan 15 12:59:27 2018 -0800

perldiag: miscapitalization

commit edf23316d26dd48a8dd55fac25ffc40f507fdc99
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Jan 15 12:57:41 2018 -0800

Sort perldiag

---

Summary of changes:
 pod/perldiag.pod | 31 +--
 1 file changed, 17 insertions(+), 14 deletions(-)

diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 0b52fe3853..889375d0a6 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -3009,6 +3009,13 @@ expression pattern should be an indivisible token, with 
nothing
 intervening between the C<"("> and the C<"?">, but you separated them
 with whitespace.
 
+=item In '(+...)', the '(' and '+' must be adjacent in regex;
+marked by S<<-- HERE> in m/%s/
+
+(F) The two-character sequence C<"(+"> in this context in a regular
+expression pattern should be an indivisible token, with nothing
+intervening between the C<"("> and the C<"+">, but you separated them.
+
 =item Invalid %s attribute: %s
 
 (F) The indicated attribute for a subroutine or variable was not recognized
@@ -3166,13 +3173,9 @@ an arbitrary reference was blessed into the "version" 
class.
 =item In '(*VERB...)', the '(' and '*' must be adjacent in regex;
 marked by S<<-- HERE> in m/%s/
 
-=item In '(+...)', the '(' and '+' must be adjacent in regex;
-marked by S<<-- HERE> in m/%s/
-
-(F) The two-character sequences C<"(+"> and C<"(*"> in
-this context in a regular expression pattern should be
-indivisible tokens, with nothing intervening between the C<"(">
-and the C<"*"> or C<"+">, but you separated them.
+(F) The two-character sequence C<"(*"> in this context in a regular
+expression pattern should be an indivisible token, with nothing
+intervening between the C<"("> and the C<"*">, but you separated them.
 
 =item ioctl is not implemented
 
@@ -6093,13 +6096,19 @@ according to the probings of Configure.
 (S experimental::regex_sets) This warning is emitted if you
 use the syntax S<C<(?[   ])>> in a regular expression.
 The details of this feature are subject to change.
-if you want to use it, but know that in doing so you
+If you want to use it, but know that in doing so you
 are taking the risk of using an experimental feature which may
 change in a future Perl version, you can do this to silence the
 warning:
 
 no warnings "experimental::regex_sets";
 
+=item The script_run feature is experimental
+
+(S experimental::script_run) This feature is experimental
+and its behavior may in any future release of perl.  See
+L.
+
 =item The signatures feature is experimental
 
 (S experimental::signatures) This warning is emitted if you unwrap a
@@ -6112,12 +6121,6 @@ in a future Perl version:
 use feature "signatures";
 sub foo ($left, $right) { ... }
 
-=item The script_run feature is experimental
-
-(S experimental::script_run) This feature is experimental and its
-behavior may in any future release of perl.
-See L.
-
 =item The stat preceding %s wasn't an lstat
 
 (F) It makes no sense to test the current stat buffer for symbolic

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.7-130-g4d7e83bba2

2018-01-12 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/4d7e83bba2968618bd9026ce17ae87f5529e5f38?hp=5149e17891a64b8b39440a943d065e188e327008>

- Log -
commit 4d7e83bba2968618bd9026ce17ae87f5529e5f38
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Fri Jan 12 08:37:18 2018 -0800

Fix goto-into-string-eval under PERL_UNICODE

More precisely, goto-to-jump-into-the-parameter-of-a-string-eval,
which is tested in goto.t as of 6d90e98384, but fails as of that
commit under PERL_UNICODE, because entereval gets a second kid
op (a hintseval op) and ‘looks like’ a list operator, which
6d90e98384 generally forbad.

The easiest way to fix this is simply to add another exception.

---

Summary of changes:
 pp_ctl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pp_ctl.c b/pp_ctl.c
index 6e5f34dbd5..4da40e39b3 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2673,6 +2673,7 @@ S_dofindlabel(pTHX_ OP *o, const char *label, STRLEN len, 
U32 flags, OP **opstac
  && OP_CLASS(o) != OA_LOGOP
  && o->op_type != OP_LINESEQ
  && o->op_type != OP_SREFGEN
+ && o->op_type != OP_ENTEREVAL
  && o->op_type != OP_RV2CV) {
OP * const kid = cUNOPo->op_first;
if (OP_GIMME(kid, 0) != G_SCALAR || OpHAS_SIBLING(kid))

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.7-125-g90a59ee553

2018-01-09 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/90a59ee553fbce0cfcef9ae57ed0705fe279de0a?hp=824e6cc6e3be8a1a8732f7813ae75bfa4094e8f9>

- Log -
commit 90a59ee553fbce0cfcef9ae57ed0705fe279de0a
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Jan 8 08:29:26 2018 -0800

Use ck_null for ~.

It no longer needs ck_bitop, which it only used before for the
experimental warning that has been removed.

---

Summary of changes:
 opcode.h  | 2 +-
 regen/opcodes | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/opcode.h b/opcode.h
index 2556a01e1e..ba3bd9e668 100644
--- a/opcode.h
+++ b/opcode.h
@@ -1487,7 +1487,7 @@ EXT Perl_check_t PL_check[] /* or perlvars.h */
Perl_ck_null,   /* not */
Perl_ck_bitop,  /* complement */
Perl_ck_bitop,  /* ncomplement */
-   Perl_ck_bitop,  /* scomplement */
+   Perl_ck_null,   /* scomplement */
Perl_ck_smartmatch, /* smartmatch */
Perl_ck_fun,/* atan2 */
Perl_ck_fun,/* sin */
diff --git a/regen/opcodes b/regen/opcodes
index 5aa8a94fa5..b4bf904fdc 100644
--- a/regen/opcodes
+++ b/regen/opcodes
@@ -175,9 +175,7 @@ i_negateinteger negation (-)ck_null ifst1   
S
 notnot ck_null ifs1S
 complement 1's complement (~)  ck_bitopfst1S
 ncomplementnumeric 1's complement (~)  ck_bitopfsT1S
-# scomplement uses ck_bitop only for the experimental warning.  Once the
-# warning is gone, this can change to ck_null.
-scomplementstring 1's complement (~)   ck_bitopfsT1S
+scomplementstring 1's complement (~)   ck_null fsT1S
 
 smartmatch smart match ck_smartmatch   s2
 

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.7-118-g807d97fa92

2018-01-08 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/807d97fa921ab01e56e08aa52dc8bbdc14f85ce6?hp=291c057a714c4bb419e91e8b00039d61390c42f9>

- Log -
commit 807d97fa921ab01e56e08aa52dc8bbdc14f85ce6
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Jan 8 08:18:21 2018 -0800

perldelta for #130936

commit 6d90e98384148a470db6f66439a13e5955418298
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Jan 7 22:23:03 2018 -0800

[perl #130936] Forbid some cases of inward goto

This commit in general forbids entry into the parameter of a binary or
list operator, to avoid crashes and stack corruption.

In cases like

goto f;
push @array, do { f: }

and

goto f;
$a + do { f: };

it’s not possible to fix this in general.  Cases like

goto f;
do { f: } + $a;

(jumping into the first parameter) have never caused problems, but I
went ahead and forbad that usage too, since it would be too compli-
cated to figure out exactly which parameter is being jumped into.
(It’s not impossible; it would just double the amount of code used to
find labels.)

List operators taking just a simple list, such as die(), have never
worked properly, because goto() bypasses the pushmark.  They could be
made to work, but that would require extra work to distinguish cases
like push and print that have a first operand (sometimes implicit for
print) of a specific type.  I figured it was easier just to forbid
jumping into any list operator.  It’s also much easier to document.

commit 88490382efb37ca723204b6b6a540d37b76bdc19
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Jan 7 21:13:01 2018 -0800

state.t: Allow to run under miniperl

Useful for debugging.

commit d2d357297a6222ca30cb33902f66bbb2ea76ed91
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Jan 7 20:46:54 2018 -0800

Stop alloc_LOGOP from always setting OPf_KIDS

Commit v5.21.1-125-g3253bf8, which added the function, caused entertry
to get a kid op.  Before:

$ perl5.20.1 -MO=Concise -eeval{}
5  <@> leave[1 ref] vKP/REFC ->(end)
1 <0> enter ->2
2 <;> nextstate(main 2 -e:1) v:{ ->3
4 <@> leavetry vK ->5
3<|> entertry(other->4) v ->6
6<0> stub v ->4
-e syntax OK

Notice entertry has no K.  After:

$ perl5.22.0 -MO=Concise -eeval{}
5  <@> leave[1 ref] vKP/REFC ->(end)
1 <0> enter ->2
2 <;> nextstate(main 1 -e:1) v:{ ->3
4 <@> leavetry vK ->5
3<|> entertry(other->4) vK ->6
6<0> stub v ->4
-e syntax OK

This time it has a K, but it has no kid ops.

This causes problems for a patch I am working on, because one
can no longer depend on cUNOPo->op_first being non-null when
o->op_flags & OPf_KIDS.

alloc_LOGOP should only set the KIDS flag if it actually has kids.

---

Summary of changes:
 op.c   |  3 ++-
 pod/perldelta.pod  |  5 -
 pod/perldiag.pod   | 14 ++
 pod/perlfunc.pod   |  3 ++-
 pp_ctl.c   | 37 +++--
 t/lib/croak/pp_ctl | 12 
 t/op/goto.t| 50 +-
 t/op/state.t   | 14 --
 8 files changed, 126 insertions(+), 12 deletions(-)

diff --git a/op.c b/op.c
index 8b91f60234..ace79ad14c 100644
--- a/op.c
+++ b/op.c
@@ -1545,7 +1545,8 @@ Perl_alloc_LOGOP(pTHX_ I32 type, OP *first, OP* other)
 OpTYPE_set(logop, type);
 logop->op_first = first;
 logop->op_other = other;
-logop->op_flags = OPf_KIDS;
+if (first)
+logop->op_flags = OPf_KIDS;
 while (kid && OpHAS_SIBLING(kid))
 kid = OpSIBLING(kid);
 if (kid)
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 3df2835290..da5fe0b745 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -276,7 +276,10 @@ and New Warnings
 
 =item *
 
-XXX L<message|perldiag/"message">
+L<Can't "goto" into a binary or list expression|perldiag/"Can't 
EgotoE into a binary or list expression">
+
+Use of C to jump into the parameter of a binary or list operator has
+been prohibited, to prevent crashes and stack corruption.  [perl #130936]
 
 =back
 
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 7867871998..0b52fe3853 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -1031,6 +1031,20 @@ pipe, Perl can't retrieve its name for later use.
 (P) An error peculiar to VMS.  Perl asked $GETSYI how big you

[perl.git] branch blead updated. v5.27.7-93-gb566b29e5c

2017-12-31 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/b566b29e5c88fece94ab58e0f1af8522b9b90c6f?hp=9a84a9ba7a7ba718aa90dba54a5bdfedd507aac1>

- Log -
commit b566b29e5c88fece94ab58e0f1af8522b9b90c6f
Merge: 9a84a9ba7a 219ba69c91
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Dec 31 17:03:36 2017 -0800

[Merge] Make bitwise feature no longer experimental

commit 219ba69c91fc97b0ac4ae9224049d4116af7651e
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Dec 31 17:02:13 2017 -0800

perldelta for bitwise ops

commit 193789ac15b87b3f3a23dc38e9e19500c69dbf28
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Dec 31 12:54:44 2017 -0800

Update docs wrt bitwise ops

commit 401d2aaa50f74cc9e0d089bb6236d5960689c76c
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Dec 31 12:24:01 2017 -0800

Enable bitwise feature with ‘use v5.28’

commit e4232c8a5f384f4b3948d62f8a5233654cd14f4d
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Dec 31 11:24:57 2017 -0800

Remove experimental bitwise warning

---

Summary of changes:
 feature.h  | 28 +---
 lib/feature.pm | 20 
 lib/overload.pm|  4 ++--
 op.c   |  6 --
 pod/perldelta.pod  | 32 
 pod/perldiag.pod   | 12 
 pod/perlexperiment.pod | 18 ++
 pod/perlop.pod | 38 +++---
 regen/feature.pl   | 14 +-
 t/lib/croak/op |  6 --
 t/lib/warnings/op  | 30 --
 t/op/bop.t | 34 +-
 12 files changed, 122 insertions(+), 120 deletions(-)

diff --git a/feature.h b/feature.h
index 838d64883b..0e15fb5ffb 100644
--- a/feature.h
+++ b/feature.h
@@ -14,6 +14,7 @@
 #define FEATURE_BUNDLE_511 2
 #define FEATURE_BUNDLE_515 3
 #define FEATURE_BUNDLE_523 4
+#define FEATURE_BUNDLE_527 5
 #define FEATURE_BUNDLE_CUSTOM  (HINT_FEATURE_MASK >> HINT_FEATURE_SHIFT)
 
 #define CURRENT_HINTS \
@@ -33,7 +34,7 @@
 #define FEATURE_FC_IS_ENABLED \
 ( \
(CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_515 && \
-CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_523) \
+CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_527) \
  || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
 FEATURE_IS_ENABLED("fc")) \
 )
@@ -41,7 +42,7 @@
 #define FEATURE_SAY_IS_ENABLED \
 ( \
(CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_510 && \
-CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_523) \
+CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_527) \
  || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
 FEATURE_IS_ENABLED("say")) \
 )
@@ -49,7 +50,7 @@
 #define FEATURE_STATE_IS_ENABLED \
 ( \
(CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_510 && \
-CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_523) \
+CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_527) \
  || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
 FEATURE_IS_ENABLED("state")) \
 )
@@ -57,21 +58,22 @@
 #define FEATURE_SWITCH_IS_ENABLED \
 ( \
(CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_510 && \
-CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_523) \
+CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_527) \
  || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
 FEATURE_IS_ENABLED("switch")) \
 )
 
 #define FEATURE_BITWISE_IS_ENABLED \
 ( \
-   CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
-FEATURE_IS_ENABLED("bitwise") \
+   CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_527 \
+ || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
+FEATURE_IS_ENABLED("bitwise")) \
 )
 
 #define FEATURE_EVALBYTES_IS_ENABLED \
 ( \
(CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_515 && \
-CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_523) \
+CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_527) \
  || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
 FEATURE_IS_ENABLED("evalbytes")) \
 )
@@ -92,7 +94,7 @@
 #define FEATURE___SUB___IS_ENABLED \
 ( \
(CURRENT_FEATURE_BUNDLE >= FEATURE_BUNDLE_515 && \
-CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_523) \
+CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_527) \
  || (CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \
 FEATURE_IS_ENABLED("__SUB__")) \
 )
@@ -105,7 +107,8 @@
 
 #define FEATURE_POSTDERE

[perl.git] branch blead updated. v5.27.6-330-gdaf3bcffae

2017-12-18 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/daf3bcffaec08075beb6b20fa7aea2dbfeab9af6?hp=a85aec40e61a21ebd6e61fb1b82b3910e9f951db>

- Log -
commit daf3bcffaec08075beb6b20fa7aea2dbfeab9af6
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Dec 18 09:37:08 2017 -0800

perlxs: Document bitwise calling conventions

---

Summary of changes:
 dist/ExtUtils-ParseXS/lib/perlxs.pod | 15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/dist/ExtUtils-ParseXS/lib/perlxs.pod 
b/dist/ExtUtils-ParseXS/lib/perlxs.pod
index 6b21d966a9..b72e6f6e20 100644
--- a/dist/ExtUtils-ParseXS/lib/perlxs.pod
+++ b/dist/ExtUtils-ParseXS/lib/perlxs.pod
@@ -1332,8 +1332,13 @@ C<BAR::getit()> for this function.
 Instead of writing an overloaded interface using pure Perl, you
 can also use the OVERLOAD keyword to define additional Perl names
 for your functions (like the ALIAS: keyword above).  However, the
-overloaded functions must be defined with three parameters (except
-for the nomethod() function which needs four parameters).  If any
+overloaded functions must be defined in such a way as to accept the number
+of parameters supplied by perl's overload system.  For most overload
+methods, it will be three parameters; for the C function it will
+be four.  However, the bitwise operators C<&>, C<|>, C<^>, and C<~> may be
+called with three I five arguments (see L).
+
+If any
 function has the OVERLOAD: keyword, several additional lines
 will be defined in the c file generated by xsubpp in order to
 register with the overload magic.
@@ -1344,7 +1349,7 @@ the actual SV stored within the blessed RV.  See the 
sample for
 T_PTROBJ_SPECIAL below.
 
 To use the OVERLOAD: keyword, create an XS function which takes
-three input parameters ( or use the c style '...' definition) like
+three input parameters (or use the C-style '...' definition) like
 this:
 
 SV *
@@ -1361,6 +1366,10 @@ characters, you must type the parameter without quoting, 
separating
 multiple overloads with whitespace.  Note that "" (the stringify
 overload) should be entered as \"\" (i.e. escaped).
 
+Since, as mentioned above, bitwise operators may take extra arguments, you
+may want to use something like C<(lobj, robj, swap, ...)> (with
+literal C<...>) as your parameter list.
+
 =head2 The FALLBACK: Keyword
 
 In addition to the OVERLOAD keyword, if you need to control how

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.6-322-g228483d4f7

2017-12-17 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/228483d4f7b5356f504d0ad059432594a4f2b153?hp=c933e4bbba56ec1e52ac51b4617a45d50336021d>

- Log -
commit 228483d4f7b5356f504d0ad059432594a4f2b153
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Dec 17 18:43:55 2017 -0800

perldelta: Avoid ‘deprecated’ for non-deprecated module

Saying the module is deprecated (in core) can easily be misunder-
stood.  The module itself is certainly not deprecated.

---

Summary of changes:
 pod/perldelta.pod | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 0613390377..31c8174b12 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -225,8 +225,7 @@ in C blocks.  [perl #96538]
 
 L has been upgraded from version 3.54 to 3.55
 
-B: L is deprecated in core and will be removed
-from Perl 5.30.
+B: L scheduled to be removed from core in Perl 5.30.
 
 =item *
 

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.6-321-gc933e4bbba

2017-12-17 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/c933e4bbba56ec1e52ac51b4617a45d50336021d?hp=da4e040f42421764ef069371d77c008e6b801f45>

- Log -
commit c933e4bbba56ec1e52ac51b4617a45d50336021d
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Dec 17 18:00:33 2017 -0800

perldelta for #132468 warnings functions

commit 8841d380660134eefd9d2d5a7cac9909db42af4a
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Dec 17 17:59:33 2017 -0800

perldelta: Alphabetise modules

commit c4583f59133164b3f392c31e9b9573276ec17e74
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Dec 17 17:56:52 2017 -0800

[perl #132468] At _at_level warnings functions

commit e57923a2c4fa758db6d61eb407b8ffb8ac38f5b2
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Dec 11 13:38:24 2017 -0800

pp_ctl.c: Add -D output for inward goto

---

Summary of changes:
 lib/warnings.pm | 73 ++---
 pod/perldelta.pod   | 42 
 pp_ctl.c|  2 ++
 regen/warnings.pl   | 73 ++---
 t/lib/warnings/9enabled | 69 ++
 5 files changed, 233 insertions(+), 26 deletions(-)

diff --git a/lib/warnings.pm b/lib/warnings.pm
index c6bbe8c95d..a9a43af959 100644
--- a/lib/warnings.pm
+++ b/lib/warnings.pm
@@ -352,6 +352,7 @@ sub unimport
 
 my %builtin_type; @builtin_type{qw(SCALAR ARRAY HASH CODE REF GLOB LVALUE 
Regexp)} = ();
 
+sub LEVEL () { 8 };
 sub MESSAGE () { 4 };
 sub FATAL () { 2 };
 sub NORMAL () { 1 };
@@ -363,8 +364,18 @@ sub __chk
 my $isobj = 0 ;
 my $wanted = shift;
 my $has_message = $wanted & MESSAGE;
-
-unless (@_ == 1 || @_ == ($has_message ? 2 : 0)) {
+my $has_level   = $wanted & LEVEL  ;
+
+if ($has_level) {
+   if (@_ != ($has_message ? 3 : 2)) {
+   my $sub = (caller 1)[3];
+   my $syntax = $has_message
+   ? "category, level, 'message'"
+   : 'category, level';
+   Croaker("Usage: $sub($syntax)");
+}
+}
+elsif (not @_ == 1 || @_ == ($has_message ? 2 : 0)) {
my $sub = (caller 1)[3];
my $syntax = $has_message ? "[category,] 'message'" : '[category]';
Croaker("Usage: $sub($syntax)");
@@ -402,6 +413,9 @@ sub __chk
}
$i -= 2 ;
 }
+elsif ($has_level) {
+   $i = 2 + shift;
+}
 else {
$i = _error_loc(); # see where Carp will allocate the error
 }
@@ -424,9 +438,18 @@ sub __chk
 return $results[0] unless $has_message;
 
 # , and the category is neither enabled as warning nor as fatal
-return if $wanted == (NORMAL | FATAL | MESSAGE)
+return if ($wanted & (NORMAL | FATAL | MESSAGE))
+ == (NORMAL | FATAL | MESSAGE)
&& !($results[0] || $results[1]);
 
+# If we have an explicit level, bypass Carp.
+if ($has_level and @callers_bitmask) {
+   my $stuff = " at " . join " line ", (caller $i)[1,2];
+   $stuff .= ", <" . *${^LAST_FH}{NAME} . "> line $." if ${^LAST_FH};
+   die "$message$stuff.\n" if $results[0];
+   return warn "$message$stuff.\n";
+}
+
 require Carp;
 Carp::croak($message) if $results[0];
 # will always get here for  will only get here for  if the
@@ -485,9 +508,29 @@ sub warnif
 return __chk(NORMAL | FATAL | MESSAGE, @_);
 }
 
+sub enabled_at_level
+{
+return __chk(NORMAL | LEVEL, @_);
+}
+
+sub fatal_enabled_at_level
+{
+return __chk(FATAL | LEVEL, @_);
+}
+
+sub warn_at_level
+{
+return __chk(FATAL | MESSAGE | LEVEL, @_);
+}
+
+sub warnif_at_level
+{
+return __chk(NORMAL | FATAL | MESSAGE | LEVEL, @_);
+}
+
 # These are not part of any public interface, so we can delete them to save
 # space.
-delete @warnings::{qw(NORMAL FATAL MESSAGE)};
+delete @warnings::{qw(NORMAL FATAL MESSAGE LEVEL)};
 
 1;
 __END__
@@ -1156,6 +1199,9 @@ warnings::register like this:
 
 =over 4
 
+Note: The functions with names ending in C<_at_level> were added in Perl
+5.28.
+
 =item use warnings::register
 
 Creates a new warnings category with the same name as the package where
@@ -1183,6 +1229,11 @@ Return TRUE if that warnings category is enabled in the 
first scope
 where the object is used.
 Otherwise returns FALSE.
 
+=item warnings::enabled_at_level($category, $level)
+
+Like C, but $level specifies the exact call frame, 0
+being the immediate caller.
+
 =item warnings::fatal_enabled()
 
 Return TRUE if the warnings category with the same name as the current
@@ -1204,6 +1255,11 @@ Return TRUE if that warnings category has been set to

[perl.git] branch blead updated. v5.27.6-194-g2ae26641a3

2017-12-11 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/2ae26641a3d7283c7b9df71fd2a4bb202a1bcb36?hp=765da30014382043124f566a8643a249ff4f3522>

- Log -
commit 2ae26641a3d7283c7b9df71fd2a4bb202a1bcb36
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Dec 11 10:01:35 2017 -0800

fakesdio.h: Typo

---

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

diff --git a/fakesdio.h b/fakesdio.h
index 928d37b90a..b8f972a0a9 100644
--- a/fakesdio.h
+++ b/fakesdio.h
@@ -1,4 +1,4 @@
-/*fakestdio.h
+/*fakesdio.h
  *
  *Copyright (C) 2000, by Larry Wall and others
  *

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.6-193-g765da30014

2017-12-11 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/765da30014382043124f566a8643a249ff4f3522?hp=ff79a4074dc27785a21291eb35036e3c0eb121f8>

- Log -
commit 765da30014382043124f566a8643a249ff4f3522
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Dec 11 09:59:47 2017 -0800

APItest.xs: shenanigans to avoid warnings

We have an unresolved issue that #include "fakesdio.h" causes one
of the typemaps to make assignments between different pointer types,
something we can’t fix straightforwardly with casts, since adding
casts to the default typemap (which we are trying to test) may
suppress real problems in production.  This is a temporary plaster
till we figure out what to do.

commit d85bc99c9c9a958c5899375414439c680be5e5ac
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Dec 11 09:56:29 2017 -0800

svleak.t: Disable crashing test

till we get to the bottom of it

---

Summary of changes:
 ext/XS-APItest/APItest.xs | 6 ++
 t/op/svleak.t | 5 -
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs
index 5dec99eb6b..a2d5d697b6 100644
--- a/ext/XS-APItest/APItest.xs
+++ b/ext/XS-APItest/APItest.xs
@@ -9,6 +9,9 @@
 #include "EXTERN.h"
 #include "perl.h"
 #include "XSUB.h"
+
+typedef FILE NativeFile;
+
 #include "fakesdio.h"   /* Causes us to use PerlIO below */
 
 typedef SV *SVREF;
@@ -4313,6 +4316,9 @@ PerlIO_stdout()
 InputStream
 PerlIO_stdin()
 
+#undef FILE
+#define FILE NativeFile
+
 FILE *
 PerlIO_exportFILE(PerlIO *f, const char *mode)
 
diff --git a/t/op/svleak.t b/t/op/svleak.t
index b07e3f8e99..5d99fddcbe 100644
--- a/t/op/svleak.t
+++ b/t/op/svleak.t
@@ -602,5 +602,8 @@ EOF
 leak 2,0,\::APItest::PerlIO_stderr,'T_INOUT in default typemap';
 leak 2,0,\::APItest::PerlIO_stdin, 'T_IN in default typemap';
 leak 2,0,\::APItest::PerlIO_stdout,'T_OUT in default typemap';
-leak 2,1,sub{XS::APItest::PerlIO_exportFILE(*STDIN,"");0},
+SKIP: {
+ skip "for now; crashes";
+ leak 2,1,sub{XS::APItest::PerlIO_exportFILE(*STDIN,"");0},
   'T_STDIO in default typemap';
+}

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.6-189-gd269f586dd

2017-12-10 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/d269f586dd6705f80163f642c0aa81f0e7a72bca?hp=244d26825825c6a1d5bc181e6da699d48bcb51a4>

- Log -
commit d269f586dd6705f80163f642c0aa81f0e7a72bca
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Dec 10 20:25:59 2017 -0800

Declaration after statement in typemap

A follow-up to 6da090e6cb and 732d3893ab.

---

Summary of changes:
 dist/Time-HiRes/typemap | 2 +-
 lib/ExtUtils/typemap| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dist/Time-HiRes/typemap b/dist/Time-HiRes/typemap
index 768e56a4f5..ffe60e3694 100644
--- a/dist/Time-HiRes/typemap
+++ b/dist/Time-HiRes/typemap
@@ -283,8 +283,8 @@ T_ARRAY
 T_STDIO
{
GV *gv = (GV *)sv_newmortal();
-   gv_init(gv, gv_stashpv("$Package",1),"__ANONIO__",10,0);
PerlIO *fp = PerlIO_importFILE($var,0);
+   gv_init(gv, gv_stashpv("$Package",1),"__ANONIO__",10,0);
if ( fp && do_open(gv, "+<&", 3, FALSE, 0, 0, fp) )
sv_setsv($arg, sv_bless(newRV((SV*)gv), 
gv_stashpv("$Package",1)));
else
diff --git a/lib/ExtUtils/typemap b/lib/ExtUtils/typemap
index ca923cf67b..db700b75bf 100644
--- a/lib/ExtUtils/typemap
+++ b/lib/ExtUtils/typemap
@@ -399,8 +399,8 @@ T_ARRAY
 T_STDIO
{
GV *gv = (GV *)sv_newmortal();
-   gv_init_pvn(gv, gv_stashpvs("$Package",1),"__ANONIO__",10,0);
PerlIO *fp = PerlIO_importFILE($var,0);
+   gv_init_pvn(gv, gv_stashpvs("$Package",1),"__ANONIO__",10,0);
if ( fp && do_open(gv, "+<&", 3, FALSE, 0, 0, fp) ) {
SV *rv = newRV_inc((SV*)gv);
rv = sv_bless(rv, GvSTASH(gv));

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.6-188-g244d268258

2017-12-10 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/244d26825825c6a1d5bc181e6da699d48bcb51a4?hp=b5145c7d479fcfcb104fc6d3d89b4d757ca3cd15>

- Log -
commit 244d26825825c6a1d5bc181e6da699d48bcb51a4
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Dec 10 17:13:17 2017 -0800

perldelta for #115814

db9848c8d3fb and 6da090e6cb.

commit 76eb84800b51f32ecd4ab68d15ca549f2f67721b
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Dec 10 16:54:44 2017 -0800

Increase $ExtUtils::Typemaps::VERSION to 3.37

commit 732d3893ab63739910640c98c1cc83ab7bb1332c
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Dec 10 16:53:45 2017 -0800

Avoid newGVgen in blead-upstream modules

ExtUtils::ParseXS::Typemaps:
Just in documentation, but it’s good to change it, in case peo-
ple copy it.

Time::HiRes:
It doesn’t even use these typemap entries, but I changed it in case
they get used in the future.  (The changes are not identical to the
default typemap, because Time::HiRes is 5.6-compatible, at least
nominally.)

os2/os2.c:
No, this is not a module, but I changed it, too.

Some other instances of newGVgen are already handled properly, or are
just in tests, so I left them alone.

commit 6da090e6cb9d18c5db3bb70c8c4d0c7e58183273
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Dec 10 16:37:11 2017 -0800

Avoid newGVgen in default typemap

newGVgen leaks memory, because it puts it vivifies a typeglob in the
symbol table, without arranging for it to be deleted.  A typemap is not
an appropriate place to use it, since callers of newGVgen are responsible
for seeing that the GV is freed, if they care.

This came up in #115814.

commit 463029d782557372dfee8afb1aa234047cc01247
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Dec 10 16:33:22 2017 -0800

perlapio: wrong param type

---

Summary of changes:
 dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps.pm |  6 --
 dist/Time-HiRes/typemap| 12 
 ext/XS-APItest/APItest.xs  | 14 ++
 lib/ExtUtils/typemap   | 12 
 os2/os2.c  |  3 ++-
 pod/perlapio.pod   |  2 +-
 pod/perldelta.pod  | 10 ++
 t/op/svleak.t  |  8 +++-
 8 files changed, 54 insertions(+), 13 deletions(-)

diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps.pm 
b/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps.pm
index d7a219e7fd..eae1190d1f 100644
--- a/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps.pm
+++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps.pm
@@ -2,7 +2,7 @@ package ExtUtils::Typemaps;
 use 5.006001;
 use strict;
 use warnings;
-our $VERSION = '3.36';
+our $VERSION = '3.37';
 
 require ExtUtils::ParseXS;
 require ExtUtils::ParseXS::Constants;
@@ -781,7 +781,9 @@ corresponding OUTPUT code:
 $var.context.value().size());
   ',
 'T_OUT' => '{
-GV *gv = newGVgen("$Package");
+GV *gv = (GV *)sv_newmortal();
+gv_init_pvn(gv, gv_stashpvs("$Package",1),
+   "__ANONIO__",10,0);
 if ( do_open(gv, "+>&", 3, FALSE, 0, 0, $var) )
 sv_setsv(
   $arg,
diff --git a/dist/Time-HiRes/typemap b/dist/Time-HiRes/typemap
index 3fa91f3a0b..768e56a4f5 100644
--- a/dist/Time-HiRes/typemap
+++ b/dist/Time-HiRes/typemap
@@ -282,7 +282,8 @@ T_ARRAY
 }
 T_STDIO
{
-   GV *gv = newGVgen("$Package");
+   GV *gv = (GV *)sv_newmortal();
+   gv_init(gv, gv_stashpv("$Package",1),"__ANONIO__",10,0);
PerlIO *fp = PerlIO_importFILE($var,0);
if ( fp && do_open(gv, "+<&", 3, FALSE, 0, 0, fp) )
sv_setsv($arg, sv_bless(newRV((SV*)gv), 
gv_stashpv("$Package",1)));
@@ -291,7 +292,8 @@ T_STDIO
}
 T_IN
{
-   GV *gv = newGVgen("$Package");
+   GV *gv = (GV *)sv_newmortal();
+   gv_init(gv, gv_stashpv("$Package",1),"__ANONIO__",10,0);
if ( do_open(gv, "<&", 2, FALSE, 0, 0, $var) )
sv_setsv($arg, sv_bless(newRV((SV*)gv), 
gv_stashpv("$Package",1)));
else
@@ -299,7 +301,8 @@ T_IN
}
 T_INOUT
{
-   GV *gv = newGVgen("$Package");
+   GV *gv = (GV *)sv_newmortal();
+   gv_init(gv, gv_stashpv("$Package",1),"__ANONIO__",10,0);
if ( do_open(gv, "+<

[perl.git] branch blead updated. v5.27.6-179-gc9ffefcc81

2017-12-10 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/c9ffefcc81905ed7e70f5e766cd1a0f2f7d90d51?hp=a01f4640266aacbed7ecc9df01890abb555c69b2>

- Log -
commit c9ffefcc81905ed7e70f5e766cd1a0f2f7d90d51
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Dec 10 12:11:13 2017 -0800

sort perldiag

---

Summary of changes:
 pod/perldiag.pod | 53 -
 1 file changed, 28 insertions(+), 25 deletions(-)

diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index d18baa8a39..cfc8528be0 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -2276,6 +2276,26 @@ to denote a capturing group of the form
 L<C<(?I)>|perlre/(?PARNO) (?-PARNO) (?+PARNO) (?R) (?0)>,
 but omitted the C<")">.
 
+=item Expecting close paren for nested extended charclass in regex; marked
+by <-- HERE in m/%s/
+
+(F) While parsing a nested extended character class like:
+
+(?[ ... (?flags:(?[ ... ])) ... ])
+ ^
+
+we expected to see a close paren ')' (marked by ^) but did not.
+
+=item Expecting close paren for wrapper for nested extended charclass in
+regex; marked by <-- HERE in m/%s/
+
+(F) While parsing a nested extended character class like:
+
+(?[ ... (?flags:(?[ ... ])) ... ])
+  ^
+
+we expected to see a close paren ')' (marked by ^) but did not.
+
 =item Expecting '(?flags:(?[...' in regex; marked by S<<-- HERE> in m/%s/
 
 (F) The C<(?[...])> extended character class regular expression construct
@@ -6446,31 +6466,6 @@ to find out why that isn't happening.
 (F) The unexec() routine failed for some reason.  See your local FSF
 representative, who probably put it there in the first place.
 
-=item Unexpected ']' with no following ')' in (?[... in regex; marked by <-- 
HERE in m/%s/
-
-(F) While parsing an extended character class a ']' character was encountered
-at a point in the definition where the only legal use of ']' is to close the
-character class definition as part of a '])', you may have forgotten the close
-paren, or otherwise confused the parser.
-
-=item Expecting close paren for nested extended charclass in regex; marked by 
<-- HERE in m/%s/
-
-(F) While parsing a nested extended character class like:
-
-(?[ ... (?flags:(?[ ... ])) ... ])
- ^
-
-we expected to see a close paren ')' (marked by ^) but did not.
-
-=item Expecting close paren for wrapper for nested extended charclass in 
regex; marked by <-- HERE in m/%s/
-
-(F) While parsing a nested extended character class like:
-
-(?[ ... (?flags:(?[ ... ])) ... ])
-  ^
-
-we expected to see a close paren ')' (marked by ^) but did not.
-
 =item Unexpected binary operator '%c' with no preceding operand in regex;
 marked by S<<-- HERE> in m/%s/
 
@@ -6520,6 +6515,14 @@ The C<")"> is out-of-place.  Something apparently was 
supposed to
 be combined with the digits, or the C<"+"> shouldn't be there, or
 something like that.  Perl can't figure out what was intended.
 
+=item Unexpected ']' with no following ')' in (?[... in regex; marked by
+<-- HERE in m/%s/
+
+(F) While parsing an extended character class a ']' character was
+encountered at a point in the definition where the only legal use of
+']' is to close the character class definition as part of a '])', you
+may have forgotten the close paren, or otherwise confused the parser.
+
 =item Unexpected '(' with no preceding operator in regex; marked by
 S<<-- HERE> in m/%s/
 

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.6-178-ga01f464026

2017-12-10 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/a01f4640266aacbed7ecc9df01890abb555c69b2?hp=436908e565f0e613465123e7cb08fa54487c3b8f>

- Log -
commit a01f4640266aacbed7ecc9df01890abb555c69b2
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Dec 10 07:07:07 2017 -0800

[perl #74764] Forbid ‘goto’ jumping into ‘given’

It does not make sense to jump into a ‘given’ any more than it makes
sense to jump into ‘foreach’, which has long been forbidden, since
there is no value to turn into a topic.  Up till now this construct
has always crashed.

commit e7afb05e35570e271ae017d47b64dd5aad3e2009
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Wed Dec 6 13:55:26 2017 -0800

Explicitly test goto-into-foreach

It is already tested in t/op/goto.t, but only as part of an existing
test to see which of multiple identical labels gets chosen.

commit b537774295099f6b543a9e2b7375f72593328389
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Wed Dec 6 13:44:32 2017 -0800

pp_ctl.c: Move goto-into-foreach error

Put it in a static function, instead of repeating the code.  This way I
can add more conditions to that code in subsequent commits.

---

Summary of changes:
 pod/perldelta.pod  |  5 -
 pod/perldiag.pod   |  5 +
 pod/perlfunc.pod   |  3 ++-
 pp_ctl.c   | 25 ++---
 t/lib/croak/pp_ctl | 22 ++
 5 files changed, 51 insertions(+), 9 deletions(-)

diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 21c855a0c8..5cf9d5e3fc 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -212,7 +212,10 @@ and New Warnings
 
 =item *
 
-XXX L<message|perldiag/"message">
+L<Can't "goto" into a "given" block|perldiag/"Can't EgotoE into a 
EgivenE block">
+
+(F) A "goto" statement was executed to jump into the middle of a C
+block.  You can't get there from here.  See L.
 
 =back
 
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 77726f54a1..d18baa8a39 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -1031,6 +1031,11 @@ pipe, Perl can't retrieve its name for later use.
 (P) An error peculiar to VMS.  Perl asked $GETSYI how big you want your
 mailbox buffers to be, and didn't get an answer.
 
+=item Can't "goto" into a "given" block
+
+(F) A "goto" statement was executed to jump into the middle of a C
+block.  You can't get there from here.  See L.
+
 =item Can't "goto" into the middle of a foreach loop
 
 (F) A "goto" statement was executed to jump into the middle of a foreach
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 32f0e64f2c..8e3a9079b5 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -3400,7 +3400,8 @@ assignment.
 Use of C or C to jump into a construct is
 deprecated and will issue a warning.  Even then, it may not be used to
 go into any construct that requires initialization, such as a
-subroutine or a C loop.  It also can't be used to go into a
+subroutine, a C loop, or a C
+block.  It also can't be used to go into a
 construct that is optimized away.
 
 The C form is quite different from the other forms of
diff --git a/pp_ctl.c b/pp_ctl.c
index 4026d4d579..9ff2abecd3 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2658,7 +2658,8 @@ S_dofindlabel(pTHX_ OP *o, const char *label, STRLEN len, 
U32 flags, OP **opstac
o->op_type == OP_SCOPE ||
o->op_type == OP_LEAVELOOP ||
o->op_type == OP_LEAVESUB ||
-   o->op_type == OP_LEAVETRY)
+   o->op_type == OP_LEAVETRY ||
+   o->op_type == OP_LEAVEGIVEN)
 {
*ops++ = cUNOPo->op_first;
if (ops >= oplimit)
@@ -2709,6 +2710,20 @@ S_dofindlabel(pTHX_ OP *o, const char *label, STRLEN 
len, U32 flags, OP **opstac
 }
 
 
+static void
+S_check_op_type(pTHX_ OP * const o)
+{
+/* Eventually we may want to stack the needed arguments
+ * for each op.  For now, we punt on the hard ones. */
+/* XXX This comment seems to me like wishful thinking.  --sprout */
+if (o->op_type == OP_ENTERITER)
+Perl_croak(aTHX_
+  "Can't \"goto\" into the middle of a foreach loop");
+if (o->op_type == OP_ENTERGIVEN)
+Perl_croak(aTHX_
+  "Can't \"goto\" into a \"given\" block");
+}
+
 /* also used for: pp_dump() */
 
 PP(pp_goto)
@@ -3050,8 +3065,7 @@ PP(pp_goto)
if (leaving_eval && *enterops && enterops[1]) {
I32 i;
 for (i = 1; enterops[i]; i++)
-if (enterops[i]->op_type == OP_ENTERITER)
-DIE(aTHX_ "Can't \"goto\" into the middle of a foreach 
loop

[perl.git] branch blead updated. v5.27.6-122-g76b35304cf

2017-12-04 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/76b35304cf4800e9e0f7b370b9f1f40bc6cfb7e0?hp=304cc305d1f9c22eaa9ccfed1d472022f8bb82b8>

- Log -
commit 76b35304cf4800e9e0f7b370b9f1f40bc6cfb7e0
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Dec 4 15:29:45 2017 -0800

Make Bad name error less unhelpful

This was brought up in perl #132485.

Because ‘Bad name after...’ is a croak, it suppresses the more helpful
hints like ‘Might be a runaway multi-line string’, in such cases as:

use Moose;

has erdef => (
isa => 'Int',
is => 'ro,
default => sub { 1 }
);

has cxxc => (
isa => 'Int',
is => 'ro',
default => sub { 1 }
);

We can allay this infelicity by emitting the ‘Missing operator before
bareword’ before the Bad name croak, so in the example above we
end up with:

Bareword found where operator expected at - line 10, near "isa => 'Int"
  (Might be a runaway multi-line '' string starting on line 5)
(Do you need to predeclare isa?)
Bad name after Int' at - line 10.

rather than just:

Bad name after Int' at - line 10.

---

Summary of changes:
 t/lib/croak/toke | 38 ++
 toke.c   | 26 ++
 2 files changed, 56 insertions(+), 8 deletions(-)

diff --git a/t/lib/croak/toke b/t/lib/croak/toke
index aadb447dc4..082761eec4 100644
--- a/t/lib/croak/toke
+++ b/t/lib/croak/toke
@@ -289,6 +289,44 @@ Too many arguments for undef operator at - line 11, near 
"2)"
 Constant(q) unknown at - line 12, near ""a""
 - has too many errors.
 
+# NAME Bad name after ' (with other helpful messages)
+sub has{}
+has erdef => (
+isa => 'Int',
+is => 'ro,
+default => sub { 1 }
+);
+
+has cxxc => (
+isa => 'Int',
+is => 'ro',
+default => sub { 1 }
+);
+EXPECT
+Bareword found where operator expected at - line 9, near "isa => 'Int"
+  (Might be a runaway multi-line '' string starting on line 4)
+   (Do you need to predeclare isa?)
+Bad name after Int' at - line 9.
+
+# NAME Bad name after :: (with other helpful messages)
+sub has{}
+has erdef => (
+isa => 'Int',
+is => "ro,
+default => sub { 1 }
+);
+
+has cxxc => (
+isa => "Foo::$subpackage",
+is => 'ro',
+default => sub { 1 }
+);
+EXPECT
+Bareword found where operator expected at - line 9, near "isa => "Foo"
+  (Might be a runaway multi-line "" string starting on line 4)
+   (Do you need to predeclare isa?)
+Bad name after Foo:: at - line 9.
+
 # NAME Unterminated delimiter for here document
 <<"foo
 EXPECT
diff --git a/toke.c b/toke.c
index 1074e7aed6..70e7de01de 100644
--- a/toke.c
+++ b/toke.c
@@ -7266,7 +7266,20 @@ Perl_yylex(pTHX)
int pkgname = 0;
const char lastchar = (PL_bufptr == PL_oldoldbufptr ? 0 : 
PL_bufptr[-1]);
bool safebw;
+   bool no_op_error = FALSE;
 
+   if (PL_expect == XOPERATOR) {
+   if (PL_bufptr == PL_linestart) {
+   CopLINE_dec(PL_curcop);
+   Perl_warner(aTHX_ packWARN(WARN_SEMICOLON), "%s", 
PL_warn_nosemi);
+   CopLINE_inc(PL_curcop);
+   }
+   else
+   /* We want to call no_op with s pointing after the
+  bareword, so defer it.  But we want it to come
+  before the Bad name croak.  */
+   no_op_error = TRUE;
+   }
 
/* Get the rest if it looks like a package qualifier */
 
@@ -7274,6 +7287,10 @@ Perl_yylex(pTHX)
STRLEN morelen;
s = scan_word(s, PL_tokenbuf + len, sizeof PL_tokenbuf - 
len,
  TRUE, );
+   if (no_op_error) {
+   no_op("Bareword",s);
+   no_op_error = FALSE;
+   }
if (!morelen)
Perl_croak(aTHX_ "Bad name after %" UTF8f "%s",
UTF8fARG(UTF, len, PL_tokenbuf),
@@ -7282,15 +7299,8 @@ Perl_yylex(pTHX)
pkgname = 1;
}
 
-   if (PL_expect == XOPERATOR) {
-   if (PL_bufptr == PL_linestart) {
-   CopLINE_dec(PL_curcop);
-   Perl_warner(aTHX_ packWARN(WARN_SEMICOLON), "%s", 
PL_warn_nosemi);
-   CopL

[perl.git] branch blead updated. v5.27.6-115-g0649b6e4b9

2017-12-02 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/0649b6e4b934675951c7e1419db9284578a54496?hp=833d07d41793fe678f93433fca9520ec1a22f750>

- Log -
commit 0649b6e4b934675951c7e1419db9284578a54496
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sat Dec 2 07:37:15 2017 -0800

substr.t: typo

---

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

diff --git a/t/op/substr.t b/t/op/substr.t
index 9becaf77d1..c951fe27d6 100644
--- a/t/op/substr.t
+++ b/t/op/substr.t
@@ -912,7 +912,7 @@ fresh_perl_is('$0 = "/usr/bin/perl"; substr($0, 0, 0, $0)', 
'', {}, "(perl #1293
 { # [perl #132527]
 use feature 'refaliasing';
 no warnings 'experimental::refaliasing';
-my $h;
+my %h;
 \$h{foo} = \(my $bar = "baz");
 substr delete $h{foo}, 1, 1, o=>;
 is $bar, boz => 'first arg to 4-arg substr is loose lvalue context';

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.6-114-g833d07d417

2017-12-01 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/833d07d41793fe678f93433fca9520ec1a22f750?hp=8779d80ae74c415b57b9d139bb415e167292cd2a>

- Log -
commit 833d07d41793fe678f93433fca9520ec1a22f750
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Fri Dec 1 18:47:58 2017 -0800

[perl #132527] Allow 4-arg substr(delete ...)

Commit 19a8de4862 broke 4-arg substr with ‘delete’ (and various other
ops) for its first argument.  Since historically these have been
allowed, use a ‘loose’ lvalue context such as entersub when lvaluify-
ing the first argument.

commit 44626bc98dce9dce5689298504e30ed86a7e0a0a
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Nov 26 18:46:56 2017 -0800

t/lib/warnings/9enabled: update comment

This new description of the file better reflecst what it is actually
used for now.

---

Summary of changes:
 op.c|  5 -
 t/lib/warnings/9enabled |  3 ++-
 t/op/substr.t   | 11 ++-
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/op.c b/op.c
index 7e7727a674..7030af0778 100644
--- a/op.c
+++ b/op.c
@@ -13388,7 +13388,10 @@ Perl_ck_substr(pTHX_ OP *o)
if (kid->op_type == OP_NULL)
kid = OpSIBLING(kid);
if (kid)
-   op_lvalue(kid, o->op_type);
+   /* Historically, substr(delete $foo{bar},...) has been allowed
+  with 4-arg substr.  Keep it working by applying entersub
+  lvalue context.  */
+   op_lvalue(kid, OP_ENTERSUB);
 
 }
 return o;
diff --git a/t/lib/warnings/9enabled b/t/lib/warnings/9enabled
index 7cf2c5d58d..6d8bd64acf 100644
--- a/t/lib/warnings/9enabled
+++ b/t/lib/warnings/9enabled
@@ -1,4 +1,5 @@
-Check warnings::enabled & warnings::warn
+Check warnings::enabled, warnings::warn and other functionality of
+warnings.pm.
 
 __END__
 
diff --git a/t/op/substr.t b/t/op/substr.t
index dade46d99f..9becaf77d1 100644
--- a/t/op/substr.t
+++ b/t/op/substr.t
@@ -22,7 +22,7 @@ $SIG{__WARN__} = sub {
  }
 };
 
-plan(399);
+plan(400);
 
 run_tests() unless caller;
 
@@ -909,4 +909,13 @@ fresh_perl_is('$0 = "/usr/bin/perl"; substr($0, 0, 0, 
$0)', '', {}, "(perl #1293
 is $#ta, 23;
 }
 
+{ # [perl #132527]
+use feature 'refaliasing';
+no warnings 'experimental::refaliasing';
+my $h;
+\$h{foo} = \(my $bar = "baz");
+substr delete $h{foo}, 1, 1, o=>;
+is $bar, boz => 'first arg to 4-arg substr is loose lvalue context';
+}
+
 1;

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.6-61-g8276e33395

2017-11-26 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/8276e333951d35e9f1f651314089b54c9a3762c4?hp=0b4678bf303b7fe204f4cf0bd124b1f9db5b13f0>

- Log -
commit 8276e333951d35e9f1f651314089b54c9a3762c4
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Nov 26 16:33:09 2017 -0800

toke.c: Don’t leak memory

---

Summary of changes:
 toke.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/toke.c b/toke.c
index ececc94314..a3d911b1c4 100644
--- a/toke.c
+++ b/toke.c
@@ -9331,6 +9331,7 @@ S_parse_ident(pTHX_ char **s, char **d, char * const e, 
int allow_package,
char *d2;
 Newx(d, *s - olds + saw_tick + 2, char); /* +2 for $# */
 d2 = d;
+SAVEFREEPV(d);
 Perl_warner(aTHX_ packWARN(WARN_SYNTAX),
  "Old package separator used in string");
 if (olds[-1] == '#')

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.6-60-g0b4678bf30

2017-11-26 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/0b4678bf303b7fe204f4cf0bd124b1f9db5b13f0?hp=ecc6274e6eec8c6aee516823e7614f27a001a2bf>

- Log -
commit 0b4678bf303b7fe204f4cf0bd124b1f9db5b13f0
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Nov 26 16:28:51 2017 -0800

perldelta for 2cb35ee01 / #132485

---

Summary of changes:
 pod/perldelta.pod | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 97d1113a2b..ec7137da68 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -207,7 +207,12 @@ XXX L<message|perldiag/"message">
 
 =item *
 
-XXX L<message|perldiag/"message">
+L
+
+(W syntax) You used the old package separator, "'", in a variable
+named inside a double-quoted string; e.g., C<"In $name's house">.  This
+is equivalent to C<"In $name::s house">.  If you meant the former, put
+a backslash before the apostrophe (C<"In $name\'s house">).
 
 =back
 

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.6-59-gecc6274e6e

2017-11-26 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/ecc6274e6eec8c6aee516823e7614f27a001a2bf?hp=2cb35ee012cfe486aa75a422e7bb3cb18ff51336>

- Log -
commit ecc6274e6eec8c6aee516823e7614f27a001a2bf
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Nov 26 13:50:30 2017 -0800

sort perldiag

---

Summary of changes:
 pod/perldiag.pod | 42 +-
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 16b473f82b..7e6d87eee9 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -1316,16 +1316,16 @@ loops once.  See L.
 file.  Perl was unable to remove the original file to replace it with
 the modified file.  The file was left unmodified.
 
-=item Can't rename %s to %s: %s, skipping file
-
-(F) The rename done by the B<-i> switch failed for some reason,
-probably because you don't have write permission to the directory.
-
 =item Can't rename in-place work file '%s' to '%s': %s
 
 (F) When closed implicitly, the temporary file for in-place editing
 couldn't be renamed to the original filename.
 
+=item Can't rename %s to %s: %s, skipping file
+
+(F) The rename done by the B<-i> switch failed for some reason,
+probably because you don't have write permission to the directory.
+
 =item Can't reopen input pipe (name: %s) in binary mode
 
 (P) An error peculiar to VMS.  Perl thought stdin was a pipe, and tried
@@ -1394,6 +1394,11 @@ with Perl, though, if you really want to do that.
 however, redefine it while it's running, and you can even undef the
 redefined subroutine while the old routine is running.  Go figure.
 
+=item Can't unweaken a nonreference
+
+(F) You attempted to unweaken something that was not a reference.  Only
+references can be unweakened.
+
 =item Can't upgrade %s (%d) to %d
 
 (P) The internal sv_upgrade routine adds "members" to an SV, making it
@@ -1536,11 +1541,6 @@ expression pattern.  Trying to do this in ordinary Perl 
code produces a
 value that prints out looking like SCALAR(0xdecaf).  Use the $1 form
 instead.
 
-=item Can't unweaken a nonreference
-
-(F) You attempted to unweaken something that was not a reference.  Only
-references can be unweakened.
-
 =item Can't weaken a nonreference
 
 (F) You attempted to weaken something that was not a reference.  Only
@@ -2652,17 +2652,6 @@ this error when Perl was built using standard options.  
For some
 reason, your version of Perl appears to have been built without
 this support.  Talk to your Perl administrator.
 
-=item Illegal operator following parameter in a subroutine signature
-
-(F) A parameter in a subroutine signature, was followed by something
-other than C<=> introducing a default, C<,> or C<)>.
-
-use feature 'signatures';
-sub foo ($=1) {}   # legal
-sub foo ($a = 1) {}# legal
-sub foo ($a += 1) {}   # illegal
-sub foo ($a == 1) {}   # illegal
-
 =item Illegal character following sigil in a subroutine signature
 
 (F) A parameter in a subroutine signature contained an unexpected character
@@ -2727,6 +2716,17 @@ two from 1 to 32 (or 64, if your platform supports that).
 (W digit) You may have tried to use an 8 or 9 in an octal number.
 Interpretation of the octal number stopped before the 8 or 9.
 
+=item Illegal operator following parameter in a subroutine signature
+
+(F) A parameter in a subroutine signature, was followed by something
+other than C<=> introducing a default, C<,> or C<)>.
+
+use feature 'signatures';
+sub foo ($=1) {}   # legal
+sub foo ($a = 1) {}# legal
+sub foo ($a += 1) {}   # illegal
+sub foo ($a == 1) {}   # illegal
+
 =item Illegal pattern in regex; marked by S<<-- HERE> in m/%s/
 
 (F) You wrote something like

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.6-58-g2cb35ee012

2017-11-26 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/2cb35ee012cfe486aa75a422e7bb3cb18ff51336?hp=bb02b572f9a36976b622aca31b9f0f2bb2929e48>

- Log -
commit 2cb35ee012cfe486aa75a422e7bb3cb18ff51336
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Nov 26 13:41:27 2017 -0800

[perl #132485] Warn about "$foo'bar"

commit b3f7b7ad843501b532887233663813d51839174d
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sat Nov 25 10:07:28 2017 -0800

toke.c: Comment typo

---

Summary of changes:
 embed.fnc   |  3 ++-
 embed.h |  2 +-
 pod/perldiag.pod|  7 +++
 proto.h |  2 +-
 t/lib/warnings/toke | 39 +++
 toke.c  | 38 --
 6 files changed, 82 insertions(+), 9 deletions(-)

diff --git a/embed.fnc b/embed.fnc
index eeaf050766..6f10fa8c78 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -2708,7 +2708,8 @@ so|SV*|new_constant   |NULLOK const char 
*s|STRLEN len \
 s  |int|ao |int toketype
 s  |void|parse_ident|NN char **s|NN char **d \
  |NN char * const e|int allow_package \
-   |bool is_utf8|bool check_dollar
+   |bool is_utf8|bool check_dollar \
+   |bool tick_warn
 #  if defined(PERL_CR_FILTER)
 s  |I32|cr_textfilter  |int idx|NULLOK SV *sv|int maxlen
 s  |void   |strip_return   |NN SV *sv
diff --git a/embed.h b/embed.h
index 21c8328e35..06002a1b9a 100644
--- a/embed.h
+++ b/embed.h
@@ -1830,7 +1830,7 @@
 #define lop(a,b,c) S_lop(aTHX_ a,b,c)
 #define missingterm(a,b)   S_missingterm(aTHX_ a,b)
 #define no_op(a,b) S_no_op(aTHX_ a,b)
-#define parse_ident(a,b,c,d,e,f)   S_parse_ident(aTHX_ a,b,c,d,e,f)
+#define parse_ident(a,b,c,d,e,f,g) S_parse_ident(aTHX_ a,b,c,d,e,f,g)
 #define pending_ident()S_pending_ident(aTHX)
 #define scan_const(a)  S_scan_const(aTHX_ a)
 #define scan_formline(a)   S_scan_formline(aTHX_ a)
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index b069fb165c..16b473f82b 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -4315,6 +4315,13 @@ C<sysread()>ing a file, or when seeking past the end of 
a scalar opened
 for I/O (in anticipation of future reads and to imitate the behavior
 with real files).
 
+=item Old package separator used in string
+
+(W syntax) You used the old package separator, "'", in a variable
+named inside a double-quoted string; e.g., C<"In $name's house">.  This
+is equivalent to C<"In $name::s house">.  If you meant the former, put
+a backslash before the apostrophe (C<"In $name\'s house">).
+
 =item %s() on unopened %s
 
 (W unopened) An I/O operation was attempted on a filehandle that was
diff --git a/proto.h b/proto.h
index 39276fa223..d1fcc6279c 100644
--- a/proto.h
+++ b/proto.h
@@ -5754,7 +5754,7 @@ STATIC SV*S_new_constant(pTHX_ const char *s, 
STRLEN len, const char *key, STRL
 STATIC voidS_no_op(pTHX_ const char *const what, char *s);
 #define PERL_ARGS_ASSERT_NO_OP \
assert(what)
-STATIC voidS_parse_ident(pTHX_ char **s, char **d, char * const e, int 
allow_package, bool is_utf8, bool check_dollar);
+STATIC voidS_parse_ident(pTHX_ char **s, char **d, char * const e, int 
allow_package, bool is_utf8, bool check_dollar, bool tick_warn);
 #define PERL_ARGS_ASSERT_PARSE_IDENT   \
assert(s); assert(d); assert(e)
 STATIC int S_pending_ident(pTHX);
diff --git a/t/lib/warnings/toke b/t/lib/warnings/toke
index 0179bc49a7..ffa6307c61 100644
--- a/t/lib/warnings/toke
+++ b/t/lib/warnings/toke
@@ -54,6 +54,11 @@ toke.c   AOK
printf ("")
sort ("")
 
+ Old package separator used in string
+   "$foo'bar"
+   "@foo'bar"
+   "$#foo'bar"
+
  Ambiguous use of %c{%s%s} resolved to %c%s%s 
$a = ${time[2]}
$a = ${time{2}}
@@ -411,6 +416,40 @@ no warnings 'syntax' ;
 sort ("")
 EXPECT
 
+
+use warnings 'syntax';
+@foo::bar = 1..3;
+() = "$foo'bar";
+() = "@foo'bar";
+() = "$#foo'bar";
+no warnings 'syntax' ;
+() = "$foo'bar";
+() = "@foo'bar";
+() = "$#foo'bar";
+EXPECT
+Old package separator used in string at - line 3.
+   (Did you mean "$foo\'bar" instead?)
+Old package separator used in string at - line 4.
+   (Did you mean "@foo\'bar" instead?)
+Old package separator used in string at - line 5.
+   (Did you mean "$#foo\'bar" instead?)
+
+use warnings 'syntax'; use utf8;
+@fooл::barл = 1..3;
+() = "$

[perl.git] branch blead updated. v5.27.6-27-g14ff76602d

2017-11-22 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/14ff76602d3e7226409b169cf8072cf37c7c2d47?hp=c39276c156ff67dad494311eae94bd52e7d9570d>

- Log -
commit 14ff76602d3e7226409b169cf8072cf37c7c2d47
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Wed Nov 22 18:41:52 2017 -0800

bisect-runner: Add --test-module option

See the POD documentation in the diff for details.

---

Summary of changes:
 Porting/bisect-runner.pl | 47 +++
 1 file changed, 39 insertions(+), 8 deletions(-)

diff --git a/Porting/bisect-runner.pl b/Porting/bisect-runner.pl
index b127540b2b..6f9fd9d653 100755
--- a/Porting/bisect-runner.pl
+++ b/Porting/bisect-runner.pl
@@ -67,7 +67,7 @@ unless(GetOptions(\%options,
   'all-fixups', 'early-fixup=s@', 'late-fixup=s@', 'valgrind',
   'check-args', 'check-shebang!', 'usage|help|?', 'gold=s',
   'module=s', 'with-module=s', 'cpan-config-dir=s',
-  'no-module-tests',
+  'test-module=s', 'no-module-tests',
   'A=s@',
   'D=s@' => sub {
   my (undef, $val) = @_;
@@ -128,13 +128,23 @@ if (defined $target && $target =~ /\.t\z/) {
 }
 
 pod2usage(exitval => 255, verbose => 1)
-unless @ARGV || $match || $options{'test-build'} || defined 
$options{'one-liner'} || defined $options{module};
+unless @ARGV || $match || $options{'test-build'}
+|| defined $options{'one-liner'} || defined $options{module}
+|| defined $options{'test-module'};
 pod2usage(exitval => 255, verbose => 1)
 if !$options{'one-liner'} && ($options{l} || $options{w});
 if ($options{'no-module-tests'} && $options{module}) {
 print STDERR "--module and --no-module-tests are exclusive.\n\n";
 pod2usage(exitval => 255, verbose => 1)
 }
+if ($options{'no-module-tests'} && $options{'test-module'}) {
+print STDERR "--test-module and --no-module-tests are exclusive.\n\n";
+pod2usage(exitval => 255, verbose => 1)
+}
+if ($options{module} && $options{'test-module'}) {
+print STDERR "--module and --test-module are exclusive.\n\n";
+pod2usage(exitval => 255, verbose => 1)
+}
 
 check_shebang($ARGV[0])
 if $options{'check-shebang'} && @ARGV && !$options{match};
@@ -615,6 +625,21 @@ For example:
 
 =item *
 
+--test-module
+
+This is like I<--module>, but just runs the module's tests, instead of
+installing it.
+
+WARNING: This is a somewhat experimental option, known to work on recent
+CPAN shell versions.  If you use this option and strange things happen,
+please report them.
+
+Usually, you can just use I<--module>, but if you are getting inconsistent
+installation failures and you just want to see when the tests started
+failing, you might find this option useful.
+
+=item *
+
 --cpan-config-dir /home/blah/custom
 
 If defined, this will cause L to look for F inside of
@@ -1398,7 +1423,8 @@ push @ARGS, map {"-A$_"} @{$options{A}};
 my $prefix;
 
 # Testing a module? We need to install perl/cpan modules to a temp dir
-if ($options{module} || $options{'with-module'}) {
+if ($options{module} || $options{'with-module'} || $options{'test-module'})
+{
   $prefix = tempdir(CLEANUP => 1);
 
   push @ARGS, "-Dprefix=$prefix";
@@ -1489,11 +1515,13 @@ if ($target ne 'miniperl') {
 }
 
 # Testing a cpan module? See if it will install
-if ($options{module} || $options{'with-module'}) {
+my $just_testing;
+if (my $mod_opt = $options{module} || $options{'with-module'}
+   || ($just_testing++, $options{'test-module'})) {
   # First we need to install this perl somewhere
   system_or_die('./installperl');
 
-  my @m = split(',', $options{module} || $options{'with-module'});
+  my @m = split(',', $mod_opt);
 
   my $bdir = File::Temp::tempdir(
 CLEANUP => 1,
@@ -1526,15 +1554,18 @@ if ($options{module} || $options{'with-module'}) {
 s/-/::/g if /-/ and !m|/|;
   }
   my $install = join ",", map { "'$_'" } @m;
-  if ($options{'no-module-tests'}) {
+  if ($just_testing) {
+$install = "test($install)";
+  } elsif ($options{'no-module-tests'}) {
 $install = "notest('install',$install)";
   } else {
 $install = "install($install)";
   }
   my $last = $m[-1];
-  my $shellcmd = "$install; die unless CPAN::Shell->expand(Module => 
'$last')->uptodate;";
+  my $status_method = $just_testing ? 'test' : 'uptodate';
+  my $shellcmd = "$install; die unless CPAN::Shell->expand(Module => 
'$last')->$status_method;";
 
-  if ($options{module}) {
+  if ($options{module} || $options{'test-module'}) {
 run_report_and_exit(@cpanshell, $shellcmd);
   } else {
 my $ret = run_with_options({setprgp => $options{setpgrp},

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.5-407-geb611d083d

2017-11-16 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/eb611d083dade65d1aa071a4587336669efc5ebf?hp=a6c31837e629c46be2f7496149b36a4b79f93484>

- Log -
commit eb611d083dade65d1aa071a4587336669efc5ebf
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Thu Nov 16 20:07:27 2017 -0800

Suppress warning in XS-APItest’s sniscow.t

---

Summary of changes:
 ext/XS-APItest/t/sviscow.t | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/XS-APItest/t/sviscow.t b/ext/XS-APItest/t/sviscow.t
index bcc9da8ebd..d0f3062f5d 100644
--- a/ext/XS-APItest/t/sviscow.t
+++ b/ext/XS-APItest/t/sviscow.t
@@ -1,10 +1,10 @@
 use strict;
-use warnings; no warnings 'once';
 
 use Test::More tests => 1;
 
 use XS::APItest;
 use Hash::Util 'lock_value';
+use warnings; no warnings 'once', 'Hash::Util';
 
 my %h;
 $h{g} = *foo;

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.5-322-g7d65f652cb

2017-11-11 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/7d65f652cb34981f4cb53a56496f5712f740d496?hp=445198b9b50e1018da1c98005a88bdf15c964f23>

- Log -
commit 7d65f652cb34981f4cb53a56496f5712f740d496
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Fri Nov 10 13:57:33 2017 -0800

perldelta for reënabling of CV optimization

commit d96402565ccd7459d3a8bc4074f177d00bbefeeb
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Oct 29 11:21:45 2017 -0700

Revert "Temporarily revert CV-in-stash optimisation"

This reverts commit 6eed25e2537643b77650cb3e4514ec9dc2e97d74.

---

Summary of changes:
 op.c  |  2 +-
 pod/perldelta.pod | 24 
 t/op/sub.t|  1 -
 3 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/op.c b/op.c
index c61bfd08de..368f9b146e 100644
--- a/op.c
+++ b/op.c
@@ -9617,7 +9617,7 @@ Perl_newATTRSUB_x(pTHX_ I32 floor, OP *o, OP *proto, OP 
*attrs,
   sub is stored in.  */
const I32 flags =
   ec ? GV_NOADD_NOINIT
- :   PL_curstash != CopSTASH(PL_curcop)
+ :   (IN_PERL_RUNTIME && PL_curstash != CopSTASH(PL_curcop))
   || memchr(name, ':', namlen) || memchr(name, '\'', namlen)
? gv_fetch_flags
: GV_ADDMULTI | GV_NOINIT | GV_NOTQUAL;
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index fbd5e9cacd..51953078c3 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -79,6 +79,24 @@ The parsing has now been made consistent, permitting 
yada-yada only as
 a statement.  Affected code can use C<do{...}> to put a yada-yada into
 an arbitrary expression context.
 
+=head2 Subroutines no longer need typeglobs
+
+Perl 5.22.0 introduced an optimization allowing subroutines to be stored in
+packages as simple sub refs, not requiring a full typeglob (thus
+potentially saving large amounts of memeory).  However, the optimization
+was flawed: it only applied to the main package.
+
+This optimization has now been extended to all packages.  This may break
+compatibility with introspection code that looks inside stashes and expects
+everything in them to be a typeglob.
+
+When this optimization happens, the typeglob still notionally exists, so
+accessing it will cause the stash entry to be upgraded to a typeglob.  The
+optimization does not apply to XSUBs or exported subroutines, and calling a
+method will undo it, since method calls cache things in typeglobs.
+
+[perl #129916] [perl #132252]
+
 =head1 Deprecations
 
 XXX Any deprecated features, syntax, modules etc. should be listed here.
@@ -155,6 +173,12 @@ In addition, C expressions which have a constant 
format
 containing only C<%s> and C<%%> format elements, and which have a fixed
 number of arguments, are now also optimised into a C op.
 
+=item *
+
+Subroutines in packages no longer need to be stored in typeglobs, saving
+large amounts of memory.  See L
+under L, above.
+
 =back
 
 =head1 Modules and Pragmata
diff --git a/t/op/sub.t b/t/op/sub.t
index 5c501b181e..f73abb455f 100644
--- a/t/op/sub.t
+++ b/t/op/sub.t
@@ -423,7 +423,6 @@ is ref($main::{rt_129916}), 'CODE', 'simple sub stored as 
CV in stash (main::)';
 sub foo { 42 }
 }
 {
-local $TODO = "CV symbol table optimization only works in main:: [perl 
#129916]";
 is ref($RT129916::{foo}), 'CODE', 'simple sub stored as CV in stash 
(non-main::)';
 }
 

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.5-295-g4ef3c1cb7c

2017-11-10 Thread Father Chrysostomos
In perl.git, the branch blead has been updated



- Log -
commit 4ef3c1cb7c86ade65752d609b1e1f3bc01796b49
Author: David Cantrell 
Date:   Fri Nov 10 13:06:00 2017 +

experimental::lexical_topic is no longer a warning category, it's a fatal 
compile-time error

---

Summary of changes:
 pod/perldiag.pod | 6 --
 1 file changed, 6 deletions(-)

diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 2cf2040cb1..b069fb165c 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -7085,12 +7085,6 @@ C<$array[0+$ref]>.  This warning is not given for 
overloaded objects,
 however, because you can overload the numification and stringification
 operators and then you presumably know what you are doing.
 
-=item Use of state $_ is experimental
-
-(S experimental::lexical_topic) Lexical $_ is an experimental feature and
-its behavior may change or even be removed in any future release of perl.
-See the explanation under L.
-
 =item Use of strings with code points over 0xFF as arguments to %s
 operator is not allowed
 

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.5-194-gb5af74de64

2017-11-03 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/b5af74de642f3be437a847539db9e6a9d6d5ed30?hp=eb9094826554d0a3641a98d3996ba0f604b0714c>

- Log -
commit b5af74de642f3be437a847539db9e6a9d6d5ed30
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Fri Nov 3 21:36:20 2017 -0700

perldelta for b3937e202aaf1 (Carp & ISA constant)

---

Summary of changes:
 pod/perldelta.pod | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index a8f029cf45..4b6664d7b9 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -155,7 +155,10 @@ XXX
 
 =item *
 
-L has been upgraded from version A.xx to B.yy.
+L has been upgraded from version 1.43 to 1.44.
+
+If a package on the call stack contains a constant named C, Carp no
+longer throws a "Not a GLOB reference" error.
 
 =back
 

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.5-183-g78a6433791

2017-11-01 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/78a643379185d2a728ff615b2a20bee0c66f9d4b?hp=498b84842835faa317bd30ea8a865ecb85dda258>

- Log -
commit 78a643379185d2a728ff615b2a20bee0c66f9d4b
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Wed Nov 1 13:59:05 2017 -0700

Increase $Carp::Heavy::VERSION to 1.44

commit f12efe04b38a481959bf3e032bdabd77c32abddc
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Wed Nov 1 13:13:00 2017 -0700

Increase $Carp::VERSION to 1.44

commit b3937e202aaf10c2f8996e2993c880bb38a7a268
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Wed Nov 1 13:11:27 2017 -0700

Carp: Don’t choke on ISA constant

This broke some time between 1.29 (perl 5.18) and 1.3301 (perl 5.20):

$ perl5.20.1 -e 'package Foo { use constant ISA => 42; Bar::f() } package 
Bar { use Carp; sub f { carp "tun syn" } }'
Not a GLOB reference at /usr/local/lib/perl5/5.20.1/Carp.pm line 560.

and still persisted in bleadperl (Carp 1.43) until this commit.

The code that goes poking through the symbol table needs to take into
account that not all stash elements are globs.

commit 28e6a224ef79c1dd15a21ca9219838086e3df115
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Tue Oct 31 22:18:10 2017 -0700

customized.dat: Add generator note

So that people like me who do not do this very often can see just
by looking at the file how it got generated.

commit cc851c4b38a5e51a2c6b719e6d60e9a14fa0268e
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Tue Oct 31 22:12:42 2017 -0700

Porting/Maintainers.pl: vutil.c is no longer CUSTOMIZED

commit 817794ed06753164373b1e73a0e98e885b1274ed
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Tue Oct 31 22:02:49 2017 -0700

Revert "vutil.c: use new SvPVCLEAR and constant string friendly macros"

This reverts commit 7394beb1401a6ac5e5e19cff7f08486e5141126c.

This change to vutil.c is unnecessary and makes it differ needlessly
from the CPAN release (CPAN *is* upstream for this file), making syn-
chronisation harder.

---

Summary of changes:
 Porting/Maintainers.pl  |  1 -
 dist/Carp/lib/Carp.pm   |  5 +++--
 dist/Carp/lib/Carp/Heavy.pm |  2 +-
 dist/Carp/t/Carp.t  | 13 -
 t/porting/customized.dat|  8 +---
 t/porting/customized.t  |  6 ++
 vutil.c |  8 
 7 files changed, 31 insertions(+), 12 deletions(-)

diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index a96e7527fe..2fd88cceba 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -1251,7 +1251,6 @@ use File::Glob qw(:case);
 # only necessary with the CPAN release.
 'CUSTOMIZED'   => [
 qw( lib/version.pm
-vutil.c
 vxs.inc
 ),
 ],
diff --git a/dist/Carp/lib/Carp.pm b/dist/Carp/lib/Carp.pm
index 6127b26f54..623558aada 100644
--- a/dist/Carp/lib/Carp.pm
+++ b/dist/Carp/lib/Carp.pm
@@ -116,7 +116,7 @@ BEGIN {
;
 }
 
-our $VERSION = '1.43';
+our $VERSION = '1.44';
 $VERSION =~ tr/_//d;
 
 our $MaxEvalLen = 0;
@@ -593,7 +593,8 @@ sub trusts_directly {
 for my $var (qw/ CARP_NOT ISA /) {
 # Don't try using the variable until we know it exists,
 # to avoid polluting the caller's namespace.
-if ( $stash->{$var} && *{$stash->{$var}}{ARRAY} && @{$stash->{$var}} ) 
{
+if ( $stash->{$var} && ref \$stash->{$var} eq 'GLOB'
+  && *{$stash->{$var}}{ARRAY} && @{$stash->{$var}} ) {
return @{$stash->{$var}}
 }
 }
diff --git a/dist/Carp/lib/Carp/Heavy.pm b/dist/Carp/lib/Carp/Heavy.pm
index 4b8cbe1b94..84b1106545 100644
--- a/dist/Carp/lib/Carp/Heavy.pm
+++ b/dist/Carp/lib/Carp/Heavy.pm
@@ -2,7 +2,7 @@ package Carp::Heavy;
 
 use Carp ();
 
-our $VERSION = '1.43';
+our $VERSION = '1.44';
 $VERSION =~ tr/_//d;
 
 # Carp::Heavy was merged into Carp in version 1.12.  Any mismatched versions
diff --git a/dist/Carp/t/Carp.t b/dist/Carp/t/Carp.t
index 65daed7c6c..b1e399d143 100644
--- a/dist/Carp/t/Carp.t
+++ b/dist/Carp/t/Carp.t
@@ -3,7 +3,7 @@ no warnings "once";
 use Config;
 
 use IPC::Open3 1.0103 qw(open3);
-use Test::More tests => 67;
+use Test::More tests => 68;
 
 sub runperl {
 my(%args) = @_;
@@ -488,6 +488,17 @@ SKIP:
 );
 }
 
+{
+package Mpar;
+sub f { Carp::croak "tun syn" }
+
+package Phou;
+$Phou::{ISA} = \42;
+eval { Mpar::f };
+}
+like $@, qr/tun syn/, 'Carp can handle non-glob ISA stash elems';
+
+
 # New tests go here
 
 # line 1 "XA"
diff --git a/t/porting/customized.dat b/t/porting/cus

[perl.git] branch blead updated. v5.27.5-170-ga385812b68

2017-10-31 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/a385812b685b3164e706880a72ee60c9cc9573e4?hp=125cf574559a697ab2dd31760c79d7c98f3479c4>

- Log -
commit a385812b685b3164e706880a72ee60c9cc9573e4
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Tue Oct 31 10:16:59 2017 -0700

Make get_cv cope with subrefs

When called with GV_NOADD_NOINIT, get_cv will fail an assertion if the
thingy in the stash is not a GV.

While calling with GV_NOADD_NOINIT is a strange thing to do, neverthe-
less Cpanel::JSON::XS does it with "Encode::decode", which is not an
unreasonable thing to do if it is known that the sub already exists.

This commit makes get_cv take sub refs into account, so that, when we
reënable the optimisation reverted by 9bceb75b8d9, Cpanel::JSON::XS
will continue to work with bleadperl.

(Currently, the optimisation only applies to the main package, which
is why I am able to test this now.)

commit 7cfe4f5255a555764f03a74312f9b7736c4142ec
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Oct 30 21:49:04 2017 -0700

Basic tests for get_cvn_flags

---

Summary of changes:
 MANIFEST   |  1 +
 ext/XS-APItest/APItest.xs  | 22 ++
 ext/XS-APItest/Makefile.PL |  1 +
 ext/XS-APItest/t/get.t | 22 ++
 perl.c |  3 +++
 5 files changed, 49 insertions(+)
 create mode 100644 ext/XS-APItest/t/get.t

diff --git a/MANIFEST b/MANIFEST
index e71a13a461..cfa1ecdf93 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -4295,6 +4295,7 @@ ext/XS-APItest/t/eval-filter.tSimple source 
filter/eval test
 ext/XS-APItest/t/exception.t   XS::APItest extension
 ext/XS-APItest/t/extend.t  test EXTEND() macro
 ext/XS-APItest/t/fetch_pad_names.t Tests for UTF8 names in pad
+ext/XS-APItest/t/get.t test get_sv et al.
 ext/XS-APItest/t/gotosub.t XS::APItest: tests goto  and hints
 ext/XS-APItest/t/grok.tXS::APItest: tests for grok* functions
 ext/XS-APItest/t/gv_autoload4.tXS::APItest: tests for gv_autoload4() 
and variants
diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs
index 9eafb0adf2..c2100d165e 100644
--- a/ext/XS-APItest/APItest.xs
+++ b/ext/XS-APItest/APItest.xs
@@ -4277,6 +4277,28 @@ string_without_null(SV *sv)
 OUTPUT:
 RETVAL
 
+CV *
+get_cv(SV *sv)
+CODE:
+{
+STRLEN len;
+const char *s = SvPV(sv, len);
+RETVAL = get_cvn_flags(s, len, 0);
+}
+OUTPUT:
+RETVAL
+
+CV *
+get_cv_flags(SV *sv, UV flags)
+CODE:
+{
+STRLEN len;
+const char *s = SvPV(sv, len);
+RETVAL = get_cvn_flags(s, len, flags);
+}
+OUTPUT:
+RETVAL
+
 MODULE = XS::APItest PACKAGE = XS::APItest::AUTOLOADtest
 
 int
diff --git a/ext/XS-APItest/Makefile.PL b/ext/XS-APItest/Makefile.PL
index 24078a6f8c..d79ba1150e 100644
--- a/ext/XS-APItest/Makefile.PL
+++ b/ext/XS-APItest/Makefile.PL
@@ -24,6 +24,7 @@ my @names = (qw(HV_DELETE HV_DISABLE_UVAR_XKEY 
HV_FETCH_ISSTORE
HV_FETCH_ISEXISTS HV_FETCH_LVALUE HV_FETCH_JUST_SV
G_SCALAR G_ARRAY G_VOID G_DISCARD G_EVAL G_NOARGS
G_KEEPERR G_NODEBUG G_METHOD G_FAKINGEVAL
+   GV_NOADD_NOINIT
IS_NUMBER_IN_UV IS_NUMBER_GREATER_THAN_UV_MAX
IS_NUMBER_NOT_INT IS_NUMBER_NEG IS_NUMBER_INFINITY
IS_NUMBER_NAN IS_NUMBER_TRAILING PERL_SCAN_TRAILING
diff --git a/ext/XS-APItest/t/get.t b/ext/XS-APItest/t/get.t
new file mode 100644
index 00..2264d664f9
--- /dev/null
+++ b/ext/XS-APItest/t/get.t
@@ -0,0 +1,22 @@
+
+# Tests for the get_*v functions.
+
+use Test::More tests => 5;
+use XS::APItest;
+
+# XXX So far we only test get_cv.
+
+is get_cv("utf8::encode"), \::encode, 'get_cv(utf8::encode)';
+
+sub foo { " ooof" } # should be stored in the stash as a subref
+die "Test has been sabotaged: sub foo{} should not create a full glob"
+unless ref $::{foo} eq 'CODE';
+
+my $subref = get_cv("foo");
+is ref $subref, "CODE", 'got a coderef from get_cv("globless sub")';
+is &$subref, " ooof", 'got the right sub';
+
+sub bar { "burr" }
+$subref = get_cv_flags("bar",GV_NOADD_NOINIT);
+is ref $subref, "CODE", 'got a coderef from get_cv with GV_NOADD_NOINIT';
+is &$subref, "burr", 'got the right sub';
diff --git a/perl.c b/perl.c
index 96eaa98b03..7f27694c09 100644
--- a/perl.c
+++ b/perl.c
@@ -2704,6 +2704,9 @@ Perl_get_cvn_flags(pTHX_ const char *name, STRLEN len, 
I32 flags)
 
 PERL_ARGS_ASSERT_GET_CVN_FLAGS;
 
+if (gv && UNLIKELY(SvROK(gv)) && SvTYPE(SvRV((SV *)gv)) == SVt_PVCV)

[perl.git] branch blead updated. v5.27.5-159-g301bcfdaa7

2017-10-30 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/301bcfdaa73a979264d6ee1845c40043ddd464eb?hp=d1f1f359ff734b2a99fa0f1933c26ce5fb2bbb8f>

- Log -
commit 301bcfdaa73a979264d6ee1845c40043ddd464eb
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Oct 30 13:37:21 2017 -0700

make_ext.pl: Use version.pm for version cmp

We do a version comparison to determine whether Makefile.PL needs to
be run (in case a module version changed).  The simple string compar-
ison we have done up till now fails if the two version numbers differ
simply by a trailing zero (as currently happens with DB_File, which
is at version 1.840, with XS_VERSION set to 1.84.  Since version.pm’s
routines are compiled into miniperl, there is no reason not to do this
‘properly’, and it stops multiple ‘make’ invocations from rebuilding
DB_File again, and again

---

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

diff --git a/make_ext.pl b/make_ext.pl
index 80d8f68aa3..9bc4718d52 100644
--- a/make_ext.pl
+++ b/make_ext.pl
@@ -303,7 +303,7 @@ sub build_extension {
last unless defined $oldv;
require ExtUtils::MM_Unix;
defined (my $newv = parse_version MM $vmod) or last;
-   if ($newv ne $oldv) {
+   if (version->parse($newv) ne $oldv) {
close $mfh or die "close $makefile: $!";
_unlink($makefile);
{

-- 
Perl5 Master Repository


[perl.git] branch sprout/cv-in-stash updated. v5.27.5-154-g9bceb75b8d

2017-10-29 Thread Father Chrysostomos
In perl.git, the branch sprout/cv-in-stash has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/9bceb75b8d9314324370833cf051a47269cb3b0c?hp=744d793b5175ab9ce036e29e88b06671b9f933d2>

  discards  744d793b5175ab9ce036e29e88b06671b9f933d2 (commit)
  discards  21b448bcad6516b166e522177e3430f7a37591d1 (commit)
  discards  94925d49e2e7313b2a035929ed62b44ad029ac27 (commit)
  discards  a0adec6524d6d8751ea554756d2d10e206a22e94 (commit)
  discards  fd0402619b9cb4cfb61b4668eb935c2897c46888 (commit)
  discards  d56410e6bb2895b502da4a014894ffd5bcf84f93 (commit)
  discards  1c0a9a4ddb7da06fac35f9027ab031bc280e1b8b (commit)
  discards  fddbfdd2e5d41eccaeb05c96cdda170ac81c929b (commit)
  discards  8ab8da97f2f9bee12b8fad70b971fd985806c2f5 (commit)
  discards  bd091733b5b92e6d8f867d8759d6834a05657a76 (commit)
  discards  b4e11809250634066af7a2e36c098c221525c18c (commit)
  discards  253fce33c2932bf24a226f8a74f82e6936061ffb (commit)
  discards  2e8b0e19663c893c9e3d16a7a90177374152e9b0 (commit)
  discards  f1891c3978ceeaf730e33c0f6efd0e6acbfcf6fa (commit)
  discards  7f9bb934b4c320518b157fb047eacfb824f509b0 (commit)
  discards  ef366e64beee3fa6bf6d1b1d07e9c33b13885f86 (commit)
- Log -
commit 9bceb75b8d9314324370833cf051a47269cb3b0c
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Oct 29 11:21:45 2017 -0700

Revert "Temporarily revert CV-in-stash optimisation"

This reverts commit 6eed25e2537643b77650cb3e4514ec9dc2e97d74.

---

Summary of changes:
 .metaconf-exclusions.txt   |   26 +
 AUTHORS|2 +
 Configure  | 1716 ++--
 Cross/cflags-cross-arm |1 -
 Cross/config.sh-arm-linux  |   85 +-
 Cross/config.sh-arm-linux-n770 |   72 +-
 EXTERN.h   |   20 +-
 INSTALL|   71 +-
 MANIFEST   |  798 ++--
 META.json  |3 +-
 META.yml   |3 +-
 Makefile.SH|   47 +-
 Makefile.micro |3 +-
 NetWare/Makefile   |4 +-
 NetWare/config.wc  |   45 +-
 NetWare/config_H.wc|  220 +-
 PACKAGING  |   30 +
 Porting/Glossary   |  314 +-
 Porting/Maintainers.pl |   53 +-
 Porting/README.pod |4 +
 Porting/bench.pl   |  323 +-
 Porting/config.sh  |   87 +-
 Porting/config_H   |  284 +-
 Porting/corelist-perldelta.pl  |   25 +-
 Porting/epigraphs.pod  |   17 +
 Porting/exec-bit.txt   |1 +
 Porting/makerel|4 +-
 Porting/mksample   |   33 +
 Porting/perldelta_template.pod |2 +-
 Porting/pumpkin.pod|   80 +-
 Porting/release_schedule.pod   |2 +-
 Porting/sync-with-cpan |   32 +-
 README.haiku   |4 +-
 README.macosx  |8 +-
 README.os2 |2 +-
 README.vms |4 +-
 XSUB.h |   26 +-
 caretx.c   |   11 +-
 cflags.SH  |9 -
 config_h.SH|  364 +-
 configpm   |   18 +-
 configure.com  |  110 +-
 cpan/CPAN-Meta/corpus/BadMETA.yml  |   48 +-
 cpan/Config-Perl-V/V.pm|   20 +-
 cpan/Config-Perl-V/t/10_base.t |   36 +-
 cpan/Config-Perl-V/t/20_plv56.t|7 +-
 cpan/Config-Perl-V/t/21_plv58.t|7 +-
 cpan/Config-Perl-V/t/22_plv510.t   |7 +-
 cpan/Config-Perl-V/t/23_plv512.t   |7 +-
 cpan/Config-Perl-V/t/24_plv514.t   |7 +-
 cpan/Config-Perl-V/t/25_plv516.t   |7 +-
 cpan/Config-Perl-V/t/25_plv5162.t  |7 +-
 cpan/Config-Perl-V/t/26_plv518.t   |7 +-
 cpan/Config-Perl-V/t/26_plv5182.t  |7 +-
 cpan/Config

[perl.git] branch blead updated. v5.27.5-118-g1cc318ccd0

2017-10-23 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/1cc318ccd01de3f743427faa3a82731c57c38a1c?hp=6c2ae6421675ba5ff81dd43f9167136f02dfe9d9>

- Log -
commit 1cc318ccd01de3f743427faa3a82731c57c38a1c
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Oct 23 09:52:23 2017 -0700

Increase $B::VERSION to 1.71

commit f4a37198b80677735d8243e3538253bb7082c86e
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Oct 23 09:50:10 2017 -0700

B::walksymtable: clear cached methods

There was a dummy assignment in B::walksymtable that I removed in com-
mit 6a4fc5265ba1 because it appeared to be redundant.  Removing that
assignment broke Module::Info (rt.cpan.org #123352), because it
changed the behaviour of B::Utils (by changing the behaviour of
B::walksymtable).  That seemingly useless assignment was actually
clearing cached methods, so that any B::GV object passed to the call-
back method sees ->CV pointing to something only if there is a real
sub there.  Since this seems like a reasonable expectation, this com-
mit restores the old behaviour, with a comment explaining what the
assignment is for, and tests it.

---

Summary of changes:
 ext/B/B.pm  |  4 +++-
 ext/B/t/b.t | 15 +++
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/ext/B/B.pm b/ext/B/B.pm
index 3365a14f8c..12d8201619 100644
--- a/ext/B/B.pm
+++ b/ext/B/B.pm
@@ -15,7 +15,7 @@ require Exporter;
 # walkoptree comes from B.xs
 
 BEGIN {
-$B::VERSION = '1.70';
+$B::VERSION = '1.71';
 @B::EXPORT_OK = ();
 
 # Our BOOT code needs $VERSION set, and will append to @EXPORT_OK.
@@ -261,6 +261,8 @@ sub walksymtable {
 no strict 'refs';
 $prefix = '' unless defined $prefix;
 foreach my $sym ( sort keys %$symref ) {
+my $dummy = $symref->{$sym}; # Copying the glob and incrementing
+ # the GPs refcnt clears cached methods
 $fullname = "*main::".$prefix.$sym;
if ($sym =~ /::$/) {
$sym = $prefix . $sym;
diff --git a/ext/B/t/b.t b/ext/B/t/b.t
index a5d724912b..587c8e665f 100644
--- a/ext/B/t/b.t
+++ b/ext/B/t/b.t
@@ -56,6 +56,21 @@ ok( join('', sort @syms) eq join('', sort keys %Subs), 'all 
symbols found' );
 # Make sure we only hit them each once.
 ok( (!grep $_ != 1, values %Subs), '...and found once' );
 
+
+# Make sure method caches are not present when walking the sym tab
+@Testing::Method::Caches::Foo::ISA='Testing::Method::Caches::Bar';
+sub Testing::Method::Caches::Bar::foo{}
+Testing::Method::Caches::Foo->foo; # caches the sub in the *foo glob
+
+my $have_cv;
+sub B::GV::method_cache_test { ${shift->CV} and ++$have_cv }
+
+B::walksymtable(\%Testing::Method::Caches::, 'method_cache_test',
+ sub { 1 }, 'Testing::Method::Caches::');
+# $have_cv should only have been incremented for ::Bar::foo
+is $have_cv, 1, 'walksymtable clears cached methods';
+
+
 # Tests for MAGIC / MOREMAGIC
 ok( B::svref_2object(\$.)->MAGIC->TYPE eq "\0", '$. has \0 magic' );
 {

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.4-129-g6fbf0c3106

2017-10-19 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/6fbf0c3106e14fed2b6901c567fbb10716895f10?hp=f65cb320dfb0701e599232a87aa5fa6a69d79a29>

- Log -
commit 6fbf0c3106e14fed2b6901c567fbb10716895f10
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Thu Oct 19 21:35:51 2017 -0700

Deparse.t tweak

The revert two commits ago causes B::Deparse to go through a different
code path when dumping the constant.  Ideally the output should be the
same either way (i.e., consistently with or without a semicolon, not
sometimes one way and sometimes the other).  But for now, just make
the test more lenient.

commit 834e1dc686d615ac888f5ddc4c85c14addd6c2b5
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Thu Oct 19 20:14:29 2017 -0700

perldelta for 14062320f

commit 6eed25e2537643b77650cb3e4514ec9dc2e97d74
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Thu Oct 19 18:18:37 2017 -0700

Temporarily revert CV-in-stash optimisation

This reverts two hunks from 6881372e19 to allow CPAN modules some time
to conform to the optimisation.

---

Summary of changes:
 lib/B/Deparse.t   | 2 +-
 op.c  | 2 +-
 pod/perldelta.pod | 7 +++
 t/op/sub.t| 1 +
 4 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/lib/B/Deparse.t b/lib/B/Deparse.t
index c61cfa2f66..f1aae49fcb 100644
--- a/lib/B/Deparse.t
+++ b/lib/B/Deparse.t
@@ -162,7 +162,7 @@ $a = readpipe qq|$^X $path "-MO=Deparse"|
  .qq| -e "#line 123 four-five-six"|
  .qq| -e "package G; sub g(){0} sub s{}" 2>&1|;
 $a =~ s/-e syntax OK\n//g;
-like($a, qr/sub F::f \(\) \{\s*0;\s*}/,
+like($a, qr/sub F::f \(\) \{\s*0;?\s*}/,
"Constant is dumped in package in which other subs are dumped");
 unlike($a, qr/sub g/,
"Constant is not dumped in package in which other subs are not dumped");
diff --git a/op.c b/op.c
index 4e45800876..95b7971a9c 100644
--- a/op.c
+++ b/op.c
@@ -8596,7 +8596,7 @@ Perl_newATTRSUB_x(pTHX_ I32 floor, OP *o, OP *proto, OP 
*attrs,
   sub is stored in.  */
const I32 flags =
   ec ? GV_NOADD_NOINIT
- :   (IN_PERL_RUNTIME && PL_curstash != CopSTASH(PL_curcop))
+ :   PL_curstash != CopSTASH(PL_curcop)
   || memchr(name, ':', namlen) || memchr(name, '\'', namlen)
? gv_fetch_flags
: GV_ADDMULTI | GV_NOINIT | GV_NOTQUAL;
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index d93050733f..fc4c834bdc 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -368,6 +368,13 @@ has been fixed.  This should call C<execvp()> with an 
empty C array
 returning false (and not setting L<C<$!>|perlvar/$!>).
 L<[perl #131730]|https://rt.perl.org/Public/Bug/Display.html?id=131730>
 
+=item *
+
+The C C function stopped working properly in Perl 5.22
+when fetching a constant with a UTF-8 name if that constant subroutine was
+stored in the stash as a simple scalar reference, rather than a full
+typeglob.  This has been corrected.
+
 =back
 
 =head1 Known Problems
diff --git a/t/op/sub.t b/t/op/sub.t
index f73abb455f..5c501b181e 100644
--- a/t/op/sub.t
+++ b/t/op/sub.t
@@ -423,6 +423,7 @@ is ref($main::{rt_129916}), 'CODE', 'simple sub stored as 
CV in stash (main::)';
 sub foo { 42 }
 }
 {
+local $TODO = "CV symbol table optimization only works in main:: [perl 
#129916]";
 is ref($RT129916::{foo}), 'CODE', 'simple sub stored as CV in stash 
(non-main::)';
 }
 

-- 
Perl5 Master Repository


[perl.git] branch blead, updated. v5.27.4-71-ge92359cbbc

2017-10-08 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/e92359cbbca7d7280e849dbfc006bc0aeb44df67?hp=7a388d0f142e3d8b43db79e3c5bf5a9a8e39e355>

- Log -
commit e92359cbbca7d7280e849dbfc006bc0aeb44df67
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Oct 8 22:23:38 2017 -0700

Increase B::Xref::VERSION to 1.07
---

Summary of changes:
 ext/B/B/Xref.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/B/B/Xref.pm b/ext/B/B/Xref.pm
index a4b8b2a563..000790a269 100644
--- a/ext/B/B/Xref.pm
+++ b/ext/B/B/Xref.pm
@@ -1,6 +1,6 @@
 package B::Xref;
 
-our $VERSION = '1.06';
+our $VERSION = '1.07';
 
 =head1 NAME
 

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.27.4-70-g7a388d0f14

2017-10-08 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/7a388d0f142e3d8b43db79e3c5bf5a9a8e39e355?hp=607733213512652a8c98b3055264d6baf5019eb5>

- Log -
commit 7a388d0f142e3d8b43db79e3c5bf5a9a8e39e355
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Oct 8 22:22:30 2017 -0700

Fix B::Xref to handle sub refs

This only applies to non-threaded builds.  Threaded builds were
already fine.
---

Summary of changes:
 ext/B/B/Xref.pm | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/ext/B/B/Xref.pm b/ext/B/B/Xref.pm
index 255ee890bd..a4b8b2a563 100644
--- a/ext/B/B/Xref.pm
+++ b/ext/B/B/Xref.pm
@@ -143,7 +143,7 @@ Malcolm Beattie, mbeat...@sable.ox.ac.uk.
 use strict;
 use Config;
 use B qw(peekop class comppadlist main_start svref_2object walksymtable
- OPpLVAL_INTRO SVf_POK OPpOUR_INTRO cstring
+ OPpLVAL_INTRO SVf_POK SVf_ROK OPpOUR_INTRO cstring
 );
 
 sub UNKNOWN { ["?", "?", "?"] }
@@ -331,7 +331,13 @@ sub pp_gv {
 }
 else {
$gv = $op->gv;
-   $top = [$gv->STASH->NAME, "*", $gv->SAFENAME];
+   if ($gv->FLAGS & SVf_ROK) { # sub ref
+   my $cv = $gv->RV;
+   $top = [$cv->STASH->NAME, '*', B::safename($cv->NAME_HEK)]
+   }
+   else {
+   $top = [$gv->STASH->NAME, '*', $gv->SAFENAME];
+   }
 }
 process($top, $op->private & OPpLVAL_INTRO ? "intro" : "used");
 }

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.27.4-69-g6077332135

2017-10-08 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/607733213512652a8c98b3055264d6baf5019eb5?hp=1369fd508410a5ab354672cedce158f1e9c653c9>

- Log -
commit 607733213512652a8c98b3055264d6baf5019eb5
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Oct 8 15:58:01 2017 -0700

B: Really remove unused var

6a4fc5265ba102 removed the useless assignment to it, but not the
var itself.
---

Summary of changes:
 ext/B/B.pm | 1 -
 1 file changed, 1 deletion(-)

diff --git a/ext/B/B.pm b/ext/B/B.pm
index d48fa3ad73..3365a14f8c 100644
--- a/ext/B/B.pm
+++ b/ext/B/B.pm
@@ -257,7 +257,6 @@ sub walkoptree_exec {
 sub walksymtable {
 my ($symref, $method, $recurse, $prefix) = @_;
 my $sym;
-my $ref;
 my $fullname;
 no strict 'refs';
 $prefix = '' unless defined $prefix;

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.27.4-68-g1369fd5084

2017-10-08 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/1369fd508410a5ab354672cedce158f1e9c653c9?hp=738f9dbfd2c2579147ef1010c651a0baeca1e5d4>

- Log -
commit 1369fd508410a5ab354672cedce158f1e9c653c9
Merge: 738f9dbfd2 a35c901808
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Oct 8 14:54:13 2017 -0700

[Merge] [perl #129916] Allow sub-in-stash outside of main

The sub-in-stash optimization introduced in 2eaf799e only applied to
subs in the main stash, not in other stashes, due to a problem with
the logic in newATTRSUB.

This branch includes various commits to fix the issue and other prob-
lems that the fix uncovered.

commit a35c901808a982f357645ef262e94f60300ddd23
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 24 16:48:48 2017 -0700

Make pp_multideref handle local $::{subref}

Based on a patch by Nicholas R.

M   pp_hot.c
M   t/op/local.t

commit 6881372e19f63014452bb62329f9954deb042b2e
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Thu Sep 21 07:06:05 2017 -0700

[perl #129916] Allow sub-in-stash outside of main

The sub-in-stash optimization introduced in 2eaf799e only applied to
subs in the main stash, not in other stashes, due to a problem with
the logic in newATTRSUB.

This comment:

   Also, we may be called from load_module at run time, so
   PL_curstash (which sets CvSTASH) may not point to the stash the
   sub is stored in.

explains why we need the PL_curstash != CopSTASH(PL_curcop) check.
(Perl_load_module will fail without it.) But that logic does not work
properly at compile time (when PL_curcop == _compiling).

The value of CopSTASH(_compiling) is never actually used.  It is
always set to the main stash.  So if we check that PL_curstash !=
CopSTASH(PL_curcop) and forego the optimization in that case, we will
never optimize subs outside of the main stash.

What we really need is to check IN_PERL_RUNTIME && PL_curstash !=
opSTASH(PL_curcop).  I.e., forego the optimization at run time if the
stashes differ.  That is what this commit implements.

One observable side effect of this change is that deleting a stash
element no longer anonymizes the CV if the CV had no GV that it was
depending on to provide its name.  Since the main thing in such situa-
tions is that we do not get a crash, I think this change (arguably an
improvement) is acceptable.)

---

A bit of explanation of various other changes:

gv.c:require_tie_mod needed a bit of help, since it could not handle
sub refs in stashes.

To keep localisation of stash elements working the same way,
local($Stash::{foo}) now upgrades a coderef to a full GV before the
localisation.  (Changes in two pp*.c files and in scope.c:save_gp.)

t/op/stash.t contains a test that makes sure that perl does not crash
when a GV with a CV pointing to it gets deleted.  This commit tweaks
the test so that it continues to test that.  (There has to be a GV for
the test to test what it is meant to test.)

Similarly with t/uni/caller.t and t/uni/stash.t.

op.c:rv2cv_op_cv with the _MAYBE_NAME_GV flag was returning the cal-
ling GV in those cases where a GV-less sub is called via a GV.  E.g.,
*main = \::foo; main().  This meant that errors like ‘Not enough
arguments’ were giving the wrong sub name.

newATTRSUB was not calling mro_method_changed_in when storing a
sub as an RV.

gv_init needs to arrange for the new GV to have the file and line num-
ber corresponding to the sub in it.  These are taken from CvSTART,
which may be off by a few lines, but is the closest we have to the
place the sub was declared.

M   gv.c
M   op.c
M   pad.c
M   pp.c
M   pp_hot.c
M   scope.c
M   t/op/stash.t
M   t/op/sub.t
M   t/uni/caller.t
M   t/uni/stash.t

commit d40d59b72ae37e2f89b98c8e1c4856c34c9242fd
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 24 14:15:01 2017 -0700

Increase $B::Deparse::VERSION to 1.43

M   lib/B/Deparse.pm

commit a9cafc7854aa42b0323fc25662391f1e8d27a24b
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 24 14:14:00 2017 -0700

Deparse: Better constant-dumping heuristics

Constants created via sub foo () { 1 } are stored in the stash as
simple scalar references, under the CV-in-stash optimisation.  That
optimisation currently only applies to the main package, but will
shortly be extended to other packages.  This means B::Deparse’s
heuristics for dumping the constants needs to be improved, to avoid
dumping B::Deparse’s own constants for every program.
   

[perl.git] branch blead, updated. v5.27.4-58-g738f9dbfd2

2017-10-08 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/738f9dbfd2c2579147ef1010c651a0baeca1e5d4?hp=e04fc1aa1cb8f08ee6e04f5c80e645cad2b3c75a>

- Log -
commit 738f9dbfd2c2579147ef1010c651a0baeca1e5d4
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 17 11:18:15 2017 -0700

Let Deparse.t be run from the top-level

It used to work before 851f7bb3.  It is helpful when debugging tests
to be able to run ‘./perl -Ilib lib/B/Deparse.t’ without chdir-
ring around.

M   lib/B/Deparse.t

commit 14062320f488e14541f86806767c360405a42e23
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 17 11:10:11 2017 -0700

Unbreak gv_fetchmeth_sv

Commit v5.21.6-383-gc290e18 stopped gv_fetchmeth_sv from working cor-
rectly when fetching a constant with a utf8 name, because it no longer
passed the utf8 flag to the underlying functions.

That utf8 flag gets passed to gv_init when upgrading a glob proxy
(such as a constant) into a real glob.

M   ext/XS-APItest/t/gv_fetchmeth.t
M   gv.c

commit 951698f8f098fd4b23f351122836cdb4e03d9f10
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 10 22:13:48 2017 -0700

Increase $B::VERSION to 1.70

M   ext/B/B.pm

commit 6a4fc5265ba102bfd84de80bdb946121153387af
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 10 22:12:50 2017 -0700

B.pm: Remove unused var

This variable stopped being used in perl-5.005_02-1108-g8bac7e0 but
continued to exist until now.

M   ext/B/B.pm

commit 42bcad312582e88fc4e5bd1e9c2ad91a7bdac1c1
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Aug 28 12:52:10 2017 -0700

Don’t assign PL_curstash twice in init_main_stash

This commit:

commit 8990e3071044a96302560bbdb5706f3e74cf1bef
Author: Larry Wall <la...@netlabs.com>
Date:   Fri Mar 18 00:00:00 1994 +

perl 5.0 alpha 6

added ‘curstash = defstash’ to perl.c:init_main_stash, which already
had such an assignment a few lines above.  So it is redundant, and
always has been.

M   perl.c

commit 04680144c43db3714671c554db48c5c4a8096517
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Aug 28 12:40:58 2017 -0700

Set PL_curstname in pp_ctl.c:doeval

Otherwise we get the wrong name in sub error and warning messages:

$ ./miniperl -we 'package bar { sub bar { eval q"sub foo ([)" } } bar::bar'
Missing ']' in prototype for main::foo : [ at (eval 1) line 1.

(PL_curstname is probably used for other things too.  I didn’t check.)

I can arbitrarily set the package name in the warning to what-
ever I want:

$ ./miniperl -we 'package bar { sub bar { eval q"sub foo ([)" } } package 
fwipm; BEGIN { bar::bar }'
Missing ']' in prototype for fwipm::foo : [ at (eval 1) line 1.

M   pp_ctl.c
M   t/lib/warnings/toke
---

Summary of changes:
 ext/B/B.pm  | 3 +--
 ext/XS-APItest/t/gv_fetchmeth.t | 7 ++-
 gv.c| 3 ++-
 lib/B/Deparse.t | 4 ++--
 perl.c  | 1 -
 pp_ctl.c| 6 +-
 t/lib/warnings/toke | 6 ++
 7 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/ext/B/B.pm b/ext/B/B.pm
index daa576435e..d48fa3ad73 100644
--- a/ext/B/B.pm
+++ b/ext/B/B.pm
@@ -15,7 +15,7 @@ require Exporter;
 # walkoptree comes from B.xs
 
 BEGIN {
-$B::VERSION = '1.69';
+$B::VERSION = '1.70';
 @B::EXPORT_OK = ();
 
 # Our BOOT code needs $VERSION set, and will append to @EXPORT_OK.
@@ -262,7 +262,6 @@ sub walksymtable {
 no strict 'refs';
 $prefix = '' unless defined $prefix;
 foreach my $sym ( sort keys %$symref ) {
-$ref= $symref->{$sym};
 $fullname = "*main::".$prefix.$sym;
if ($sym =~ /::$/) {
$sym = $prefix . $sym;
diff --git a/ext/XS-APItest/t/gv_fetchmeth.t b/ext/XS-APItest/t/gv_fetchmeth.t
index 9f6e884a11..22e8b142b3 100644
--- a/ext/XS-APItest/t/gv_fetchmeth.t
+++ b/ext/XS-APItest/t/gv_fetchmeth.t
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 40;
+use Test::More tests => 43;
 
 use_ok('XS::APItest');
 
@@ -45,6 +45,10 @@ ok !XS::APItest::gv_fetchmeth_type(\%::, "method\0not 
quite!", 3, $level, 0), "g
 
 sub method { 1 }
 
+use constant { φου1 => 1,
+   φου2 => 2,
+   φου3 => 3, };
+
 my $meth_as_octets =
 
"\357\275\215\357\275\205\357\275\224\357\275\210\357\275\217\357\275\204";
 
@@ -53,6 +57,7 @@ ok !XS::APItest::gv_fetchmeth_type(\%::, "method\0not 
quite!", 3, $

[perl.git] branch blead, updated. v5.27.4-38-gfea9768603

2017-10-03 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/fea97686030c8c2a333a9db3d7a250ac81c5212c?hp=95db2efbae5edc9942892a1153e1db8056d6ca06>

- Log -
commit fea97686030c8c2a333a9db3d7a250ac81c5212c
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 24 14:05:56 2017 -0700

sync-with-cpan: curl support

M   Porting/sync-with-cpan

commit 54ed4dc462a20cd99c2dfeb4b0bdd34bfce1ac83
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 24 13:27:18 2017 -0700

Porting/sync-with-cpan: 5.12 compatibility

So I can type simply ‘Porting/sync-with-cpan Test::Simple’ and run
it with the system perl.

M   Porting/sync-with-cpan
---

Summary of changes:
 Porting/sync-with-cpan | 32 +++-
 1 file changed, 19 insertions(+), 13 deletions(-)

diff --git a/Porting/sync-with-cpan b/Porting/sync-with-cpan
index 0176e18045..db42fc4afa 100755
--- a/Porting/sync-with-cpan
+++ b/Porting/sync-with-cpan
@@ -295,6 +295,22 @@ if ($cpan_mod =~ /-/ && $cpan_mod !~ /::/) {
 $cpan_mod =~ s/-/::/g;
 }
 
+sub wget {
+my ($url, $saveas) = @_;
+eval {
+require HTTP::Tiny;
+my $http= HTTP::Tiny->new();
+$http->mirror( $url => $saveas );
+1
+} or
+   # Some system do not have wget.  Fall back to curl if we do not
+   # have it.  On Windows, `which wget` is not going to work, so
+   # just use wget, as this script has always done.
+   WIN32 || -x substr(`which wget`, 0, -1)
+ ? system wget => $url, '-qO', $saveas
+ : system curl => $url, '-sSo', $saveas;
+}
+
 #
 # Find the information from CPAN.
 #
@@ -313,12 +329,7 @@ else {
 # Poor man's cache
 #
 unless (-f $package_file && -M $package_file < 1) {
-eval {
-require HTTP::Tiny;
-my $http= HTTP::Tiny->new();
-$http->mirror( $package_url => $package_file );
-1
-} or system wget => $package_url, '-qO', $package_file;
+wget $package_url, $package_file;
 }
 
 open my $fh, '<', $package_file;
@@ -339,12 +350,7 @@ else {
 #
 # Fetch the new distro
 #
-eval {
-require HTTP::Tiny;
-my $http= HTTP::Tiny->new();
-$http->mirror( $url => $new_file );
-1
-} or system wget => $url, '-qO', $new_file;
+wget $url, $new_file;
 }
 
 my  $old_dir  = "$pkg_dir-$old_version";
@@ -486,7 +492,7 @@ if (@de_exec && @delete) {
 # Mustn't change the +x bit on files that are whitelisted
 #
 if (@de_exec) {
-my %permitted = map +(tr/\n//dr => 1), grep !/^#/,
+my %permitted = map { (my $x = $_) =~ tr/\n//d; $x => 1 } grep !/^#/,
 do { local @ARGV = '../Porting/exec-bit.txt'; <> };
 @de_exec = grep !$permitted{"cpan/$pkg_dir/$_"}, @de_exec;
 }

--
Perl5 Master Repository


[perl.git] branch sprout/cv-in-stash, updated. v5.27.4-43-g744d793b51

2017-09-24 Thread Father Chrysostomos
In perl.git, the branch sprout/cv-in-stash has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/744d793b5175ab9ce036e29e88b06671b9f933d2?hp=3b14cea98d39a4cf06ec18cea55004cfb7852f51>

  discards  3b14cea98d39a4cf06ec18cea55004cfb7852f51 (commit)
  discards  36b6fac80cf886f8d1aa4afafdd131297b6576fa (commit)
  discards  f80e7f0b256906d5a02c5e85b8f349f722026260 (commit)
  discards  856d0dde21853e4abb2d88a5ff9776428db9b561 (commit)
  discards  bc1f4b18a290df2a9d94f42d36900a77e3c1458c (commit)
  discards  a95ed7bc423ebb2e5aa103e125ad8cc7d3d5546d (commit)
  discards  ae95a5e4ad5999a835c2d153edd72af27a367d71 (commit)
  discards  c39942ca52138b177d77818158c96de451274e6f (commit)
  discards  4fa48d27e416ea26e90eb0360ce9ab77e8e19c44 (commit)
  discards  c75d6b1c146b7d633a611ae4e40a2e5087d9a785 (commit)
  discards  7c4ce06040f8b9989f4a1ba1ce231dbc0a1810ac (commit)
  discards  38c78408ebe11176239a6795ab67548571a21d23 (commit)
  discards  15f718410b8e4169608a17877b6d7ecf0528779b (commit)
- Log -
commit 744d793b5175ab9ce036e29e88b06671b9f933d2
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 24 16:48:48 2017 -0700

Make pp_multideref handle local $::{subref}

Based on a patch by Nicholas R.

M   pp_hot.c
M   t/op/local.t

commit 21b448bcad6516b166e522177e3430f7a37591d1
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Thu Sep 21 07:06:05 2017 -0700

[perl #129916] Allow sub-in-stash outside of main

The sub-in-stash optimization introduced in 2eaf799e only applied to
subs in the main stash, not in other stashes, due to a problem with
the logic in newATTRSUB.

This comment:

   Also, we may be called from load_module at run time, so
   PL_curstash (which sets CvSTASH) may not point to the stash the
   sub is stored in.

explains why we need the PL_curstash != CopSTASH(PL_curcop) check.
(Perl_load_module will fail without it.) But that logic does not work
properly at compile time (when PL_curcop == _compiling).

The value of CopSTASH(_compiling) is never actually used.  It is
always set to the main stash.  So if we check that PL_curstash !=
CopSTASH(PL_curcop) and forego the optimization in that case, we will
never optimize subs outside of the main stash.

What we really need is to check IN_PERL_RUNTIME && PL_curstash !=
opSTASH(PL_curcop).  I.e., forego the optimization at run time if the
stashes differ.  That is what this commit implements.

One observable side effect of this change is that deleting a stash
element no longer anonymizes the CV if the CV had no GV that it was
depending on to provide its name.  Since the main thing in such situa-
tions is that we do not get a crash, I think this change (arguably an
improvement) is acceptable.)

---

A bit of explanation of various other changes:

gv.c:require_tie_mod needed a bit of help, since it could not handle
sub refs in stashes.

To keep localisation of stash elements working the same way,
local($Stash::{foo}) now upgrades a coderef to a full GV before the
localisation.  (Changes in two pp*.c files and in scope.c:save_gp.)

t/op/stash.t contains a test that makes sure that perl does not crash
when a GV with a CV pointing to it gets deleted.  This commit tweaks
the test so that it continues to test that.  (There has to be a GV for
the test to test what it is meant to test.)

Similarly with t/uni/caller.t and t/uni/stash.t.

op.c:rv2cv_op_cv with the _MAYBE_NAME_GV flag was returning the cal-
ling GV in those cases where a GV-less sub is called via a GV.  E.g.,
*main = \::foo; main().  This meant that errors like ‘Not enough
arguments’ were giving the wrong sub name.

newATTRSUB was not calling mro_method_changed_in when storing a
sub as an RV.

gv_init needs to arrange for the new GV to have the file and line num-
ber corresponding to the sub in it.  These are taken from CvSTART,
which may be off by a few lines, but is the closest we have to the
place the sub was declared.

M   gv.c
M   op.c
M   pad.c
M   pp.c
M   pp_hot.c
M   scope.c
M   t/op/stash.t
M   t/op/sub.t
M   t/uni/caller.t
M   t/uni/stash.t

commit 94925d49e2e7313b2a035929ed62b44ad029ac27
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 24 14:15:01 2017 -0700

Increase $B::Deparse::VERSION to 1.43

M   lib/B/Deparse.pm

commit a0adec6524d6d8751ea554756d2d10e206a22e94
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 24 14:14:00 2017 -0700

Deparse: Better constant-dumping heuristics

Constants created via sub foo () { 1 } are stored in the stash as
simple scalar references, under the CV-in-stas

[perl.git] branch blead, updated. v5.27.4-10-g79656330a0

2017-09-21 Thread Father Chrysostomos
In perl.git, the branch blead has been updated



- Log -
commit 79656330a0811b95642a8239e923166ada7fb0a0
Author: Nicolas R 
Date:   Mon Sep 18 14:37:48 2017 -0600

Add CvGvNAME_HEK helper

CvGvNAME_HEK can be used instead of the boilerplate:
CvNAMED(sv) ? CvNAME_HEK((CV *)sv) : GvNAME_HEK(CvGV(sv))

This is also saving an extra CvNAMED check from CvNAME_HEK.
---

Summary of changes:
 cv.h| 12 +++-
 gv.c|  3 +--
 scope.c |  9 ++---
 3 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/cv.h b/cv.h
index ebbdd360f3..dac83fa873 100644
--- a/cv.h
+++ b/cv.h
@@ -234,7 +234,17 @@ CvNAME_HEK(CV *sv)
? ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_gv_u.xcv_hek
: 0;
 }
-/* This lowers the refernce count of the previous value, but does *not*
+
+/* helper for the common pattern:
+   CvNAMED(sv) ? CvNAME_HEK((CV *)sv) : GvNAME_HEK(CvGV(sv))
+*/
+#define CvGvNAME_HEK(sv) ( \
+CvNAMED((CV*)sv) ? \
+((XPVCV*)MUTABLE_PTR(SvANY((SV*)sv)))->xcv_gv_u.xcv_hek\
+: GvNAME_HEK(CvGV( (SV*) sv)) \
+)
+
+/* This lowers the reference count of the previous value, but does *not*
increment the reference count of the new value. */
 #define CvNAME_HEK_set(cv, hek) ( \
CvNAME_HEK((CV *)(cv))   \
diff --git a/gv.c b/gv.c
index cfe4be572c..6df78cc013 100644
--- a/gv.c
+++ b/gv.c
@@ -2799,8 +2799,7 @@ Perl_Gv_AMupdate(pTHX_ HV *stash, bool destructing)
gv = Perl_gv_fetchmeth_pvn(aTHX_ stash, cooky, l, -1, 0);
 cv = 0;
 if (gv && (cv = GvCV(gv)) && CvHASGV(cv)) {
-const HEK * const gvhek =
-CvNAMED(cv) ? CvNAME_HEK(cv) : GvNAME_HEK(CvGV(cv));
+const HEK * const gvhek = CvGvNAME_HEK(cv);
 const HEK * const stashek =
 HvNAME_HEK(CvNAMED(cv) ? CvSTASH(cv) : GvSTASH(CvGV(cv)));
 if (HEK_LEN(gvhek) == 3 && strEQ(HEK_KEY(gvhek), "nil")
diff --git a/scope.c b/scope.c
index 59cea3b985..dfaab806aa 100644
--- a/scope.c
+++ b/scope.c
@@ -1194,10 +1194,7 @@ Perl_leave_scope(pTHX_ I32 base)
 break;
 case SVt_PVCV:
 {
-HEK *hek =
- CvNAMED(sv)
-   ? CvNAME_HEK((CV *)sv)
-   : GvNAME_HEK(CvGV(sv));
+HEK *hek = CvGvNAME_HEK(sv);
 assert(hek);
 (void)share_hek_hek(hek);
 cv_undef((CV *)sv);
@@ -1223,9 +1220,7 @@ Perl_leave_scope(pTHX_ I32 base)
 case SVt_PVHV: *svp = MUTABLE_SV(newHV()); break;
 case SVt_PVCV:
 {
-HEK * const hek = CvNAMED(sv)
- ? CvNAME_HEK((CV *)sv)
- : GvNAME_HEK(CvGV(sv));
+HEK * const hek = CvGvNAME_HEK(sv);
 
 /* Create a stub */
 *svp = newSV_type(SVt_PVCV);

--
Perl5 Master Repository


[perl.git] branch sprout/cv-in-stash, created. v5.27.3-34-g3b14cea98d

2017-09-21 Thread Father Chrysostomos
In perl.git, the branch sprout/cv-in-stash has been created

<http://perl5.git.perl.org/perl.git/commitdiff/3b14cea98d39a4cf06ec18cea55004cfb7852f51?hp=>

at  3b14cea98d39a4cf06ec18cea55004cfb7852f51 (commit)

- Log -
commit 3b14cea98d39a4cf06ec18cea55004cfb7852f51
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Thu Sep 21 07:06:05 2017 -0700

unfinished

M   gv.c
M   op.c
M   pad.c
M   pp.c
M   pp_hot.c
M   scope.c
M   t/op/stash.t
M   t/op/sub.t
M   t/uni/caller.t
M   t/uni/stash.t

commit 36b6fac80cf886f8d1aa4afafdd131297b6576fa
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 17 11:18:15 2017 -0700

Let Deparse.t be run from the top-level

It used to work before 851f7bb3.  It is helpful when debugging tests
to be able to run ‘./perl -Ilib lib/B/Deparse.t’ without chdir-
ring around.

M   lib/B/Deparse.t

commit f80e7f0b256906d5a02c5e85b8f349f722026260
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 17 11:10:11 2017 -0700

Unbreak gv_fetchmeth_sv

Commit v5.21.6-383-gc290e18 stopped gv_fetchmeth_sv from working cor-
rectly when fetching a constant with a utf8 name, because it no longer
passed the utf8 flag to the underlying functions.

That utf8 flag gets passed to gv_init when upgrading a glob proxy
(such as a constant) into a real glob.

M   ext/XS-APItest/t/gv_fetchmeth.t
M   gv.c

commit 856d0dde21853e4abb2d88a5ff9776428db9b561
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 10 22:13:48 2017 -0700

Increase $B::VERSION to 1.70

M   ext/B/B.pm

commit bc1f4b18a290df2a9d94f42d36900a77e3c1458c
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 10 22:12:50 2017 -0700

B.pm: Remove unused var

This variable stopped being used in perl-5.005_02-1108-g8bac7e0 but
continued to exist until now.

M   ext/B/B.pm

commit a95ed7bc423ebb2e5aa103e125ad8cc7d3d5546d
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 10 21:51:50 2017 -0700

Provisional version bumps for cpan/

Patches have been submitted upstream already, so hopefully these
version numbers will be short-lived.

M   cpan/NEXT/lib/NEXT.pm
M   cpan/Test-Simple/lib/Test2/Event/Generic.pm

commit ae95a5e4ad5999a835c2d153edd72af27a367d71
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 10 21:49:14 2017 -0700

Increase B::Concise::VERSION to 1.002

M   ext/B/B/Concise.pm

commit c39942ca52138b177d77818158c96de451274e6f
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 10 21:46:41 2017 -0700

Make B::Concise handle subrefs in stashes

The concise_stashref sub, for dumping all subroutines in a package,
would assign the value of a stash element to *s, and then use *s
to access the code ref in it.  If you do *s = *foo and then later
*s = \, then you have assigned \ to *foo{CODE}, and even
a localisation of *s beforehand will not help.  That is exactly
what B::Concise was doing when dumping a package with some subref
elements.

M   ext/B/B/Concise.pm

commit 4fa48d27e416ea26e90eb0360ce9ab77e8e19c44
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 10 13:59:47 2017 -0700

[rt.cpan.org #123003] Fix Test::Simple to work with GLOB stubs

I need this in order to fix perl bug #129916.

M   cpan/Test-Simple/lib/Test2/Event/Generic.pm

commit c75d6b1c146b7d633a611ae4e40a2e5087d9a785
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 10 13:59:47 2017 -0700

[rt.cpan.org #123002] Fix NEXT.pm to work with GLOB stubs

I need this in order to fix perl bug #129916.

M   cpan/NEXT/lib/NEXT.pm
M   cpan/NEXT/t/next.t

commit 7c4ce06040f8b9989f4a1ba1ce231dbc0a1810ac
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 3 11:12:11 2017 -0700

Add isGV_or_RVCV macro

This will be useful for a few code paths that need to treat a sub
ref in a stash the same way as a GV.

M       sv.h

commit 38c78408ebe11176239a6795ab67548571a21d23
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Aug 28 12:52:10 2017 -0700

Don’t assign PL_curstash twice in init_main_stash

This commit:

commit 8990e3071044a96302560bbdb5706f3e74cf1bef
Author: Larry Wall <la...@netlabs.com>
Date:   Fri Mar 18 00:00:00 1994 +

perl 5.0 alpha 6

added ‘curstash = defstash’ to perl.c:init_main_stash, which already
had such an assignment a few lines above.  So it is redundant, and
always has been.

M   perl.c

commit 15f718410b8e4169608a17877b6d7ecf0528779b
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Aug 28 12:40:58 2017 -0700

Set PL_curs

[perl.git] branch blead, updated. v5.27.3-21-gcbf837914d

2017-08-28 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/cbf837914d6724cb703a328dab484c8c9995ca3a?hp=365cfd8eaaec7a682ba41eb6274ce70b09eb9430>

- Log -
commit cbf837914d6724cb703a328dab484c8c9995ca3a
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Aug 27 22:19:24 2017 -0700

[perl #131883] Include pkg in :prototype warnings

The subref-in-stash optimisation was causing the package name to be
dropped in prototype warnings triggered by the :prototype() attribute
syntax, since the GV containing the stash name and the sub name did
not exist because of the optimisation.

Commit 2eaf799e, which introduced said optimisation, simply did not
include the package name in validate_proto’s ‘name’ parameter, but
just the sub name.  This commit makes it tell validate_proto to use
the current stash name.

M   embed.fnc
M   embed.h
M   op.c
M   proto.h
M   t/lib/warnings/toke
M   toke.c

commit 5783dc5192c36d5487bd5408fd7138e9ea36d70c
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Aug 27 21:48:42 2017 -0700

Add another param to validate_proto

I need this in order to fix bug #131883.  Since it has a bit of
churn, I’m putting it in a separate commit.

M   embed.fnc
M   embed.h
M   ext/attributes/attributes.pm
M   ext/attributes/attributes.xs
M   op.c
M   proto.h
M   toke.c

commit bc63756f96fd2f5f6bc046ab634053b983799876
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Aug 27 11:42:50 2017 -0700

Test ‘Missing ']' in prototype’ warning

M   t/lib/warnings/toke
---

Summary of changes:
 embed.fnc|  6 --
 embed.h  |  4 ++--
 ext/attributes/attributes.pm |  2 +-
 ext/attributes/attributes.xs |  2 +-
 op.c | 12 +++-
 proto.h  |  4 ++--
 t/lib/warnings/toke  | 13 -
 toke.c   | 12 ++--
 8 files changed, 39 insertions(+), 16 deletions(-)

diff --git a/embed.fnc b/embed.fnc
index aa3a623ab5..b0a362b294 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1047,7 +1047,8 @@ poX   |OP*|op_lvalue_flags|NULLOK OP* o|I32 
type|U32 flags
 p  |void   |finalize_optree|NN OP* o
 #if defined(PERL_IN_OP_C)
 s  |void   |finalize_op|NN OP* o
-s  |void   |move_proto_attr|NN OP **proto|NN OP **attrs|NN const GV *name
+s  |void   |move_proto_attr|NN OP **proto|NN OP **attrs \
+   |NN const GV *name|bool curstash
 #endif
 : Used in op.c and pp_sys.c
 p  |int|mode_from_discipline|NULLOK const char* s|STRLEN len
@@ -2708,7 +2709,8 @@ s |int|tokereport |I32 rv|NN const YYSTYPE* lvalp
 sf |void   |printbuf   |NN const char *const fmt|NN const char *const s
 #  endif
 #endif
-EXMp   |bool   |validate_proto |NN SV *name|NULLOK SV *proto|bool warn
+EXMp   |bool   |validate_proto |NN SV *name|NULLOK SV *proto|bool warn \
+   |bool curstash
 
 #if defined(PERL_IN_UNIVERSAL_C)
 s  |bool   |isa_lookup |NN HV *stash|NN const char * const name \
diff --git a/embed.h b/embed.h
index 31a9852e16..a28d1c849a 100644
--- a/embed.h
+++ b/embed.h
@@ -948,7 +948,7 @@
 #define sv_only_taint_gmagic   S_sv_only_taint_gmagic
 #define swash_fetch(a,b,c) Perl_swash_fetch(aTHX_ a,b,c)
 #define swash_init(a,b,c,d,e)  Perl_swash_init(aTHX_ a,b,c,d,e)
-#define validate_proto(a,b,c)  Perl_validate_proto(aTHX_ a,b,c)
+#define validate_proto(a,b,c,d)Perl_validate_proto(aTHX_ a,b,c,d)
 #define vivify_defelem(a)  Perl_vivify_defelem(aTHX_ a)
 #define yylex()Perl_yylex(aTHX)
 #  if !defined(PERL_EXT_RE_BUILD)
@@ -1634,7 +1634,7 @@
 #define listkids(a)S_listkids(aTHX_ a)
 #define looks_like_bool(a) S_looks_like_bool(aTHX_ a)
 #define modkids(a,b)   S_modkids(aTHX_ a,b)
-#define move_proto_attr(a,b,c) S_move_proto_attr(aTHX_ a,b,c)
+#define move_proto_attr(a,b,c,d)   S_move_proto_attr(aTHX_ a,b,c,d)
 #define my_kid(a,b,c)  S_my_kid(aTHX_ a,b,c)
 #define newGIVWHENOP(a,b,c,d,e)S_newGIVWHENOP(aTHX_ a,b,c,d,e)
 #define newMETHOP_internal(a,b,c,d)S_newMETHOP_internal(aTHX_ a,b,c,d)
diff --git a/ext/attributes/attributes.pm b/ext/attributes/attributes.pm
index 3a3a43ea5b..82e970ad6e 100644
--- a/ext/attributes/attributes.pm
+++ b/ext/attributes/attributes.pm
@@ -1,6 +1,6 @@
 package attributes;
 
-our $VERSION = 0.30;
+our $VERSION = 0.31;
 
 @EXPORT_OK = qw(get reftype);
 @EXPORT = ();
diff --git a/ext/attributes/attributes.xs b/ext/attributes/attributes.xs
index 287ac347d9..605749a010 100644
--- a/ext/attributes/attributes.xs
+++ b/ext/attributes/attributes.xs
@@ -96,7 +96,7 @@ modify_SV_attributes(pTHX_ 

[perl.git] branch blead, updated. v5.27.3-12-g714f94d1f6

2017-08-21 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/714f94d1f69f6267a390f59f2cf64240cf49a484?hp=9f9332db9d7efbba5be5556810f700da32ad6dee>

- Log -
commit 714f94d1f69f6267a390f59f2cf64240cf49a484
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Aug 21 14:52:47 2017 -0700

sort perldiag

M   pod/perldiag.pod

commit 283151b7c3d8e1552496c93cd5f20529bbc9b7b2
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Aug 21 14:47:37 2017 -0700

perldiag: Correct diag names

to get diag.t passing.

M   pod/perldiag.pod

commit 8d9d049853b4f4c782ea0c573ad6bd24ec24979d
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Aug 21 14:43:16 2017 -0700

Sprinkle diag_listed_as; perldiag tweaks

Trying to get tests passing after making diag.t smarter

M   op.c
M   pod/perldiag.pod
M   toke.c

commit 77b7eccc0a02a2c5b734eaeb598fbdf30d00cb5e
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Aug 21 14:33:14 2017 -0700

diag.t needs to know that yywarn implies WARN_SYNTAX

because yywarn calls yyerror with PL_in_eval containing the EVAL_WARNONLY
flag, and yyerror calls Perl_ck_warner_d(aTHX_ packWARN(WARN_SYNTAX),...)
when that flag is set.

M   t/porting/diag.t

commit 3f673807c860bf6e752b19518730bb1ea96c297c
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Aug 21 14:22:29 2017 -0700

perldiag: Tweaks

Rewrap for better splain output, and tweak the wording in places.

M   pod/perldiag.pod

commit 9eb2b0d3ff3723751f3e80d6215a4aaae50d4178
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Aug 21 13:53:42 2017 -0700

Teach diag.t about Perl_form

Some of the error-producing functions are called with Perl_form(...) as
the first argument.  diag.t did not know about this, and was missing
many cases.

M   t/porting/diag.t

commit 0b6630937e7851e40c44607edcdd1473f6fa5ede
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Aug 21 13:52:35 2017 -0700

Move illegalproto warnings to t/lib/warning/toke

The code that produces the warnings is in toke.c, after all.

M   t/lib/warnings/op
M   t/lib/warnings/toke

commit afe59f35c2b4b2af5b2ebc50a90e2e559b1eaf87
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Aug 6 11:38:28 2017 -0700

Add SORTf_UNSTABLE flag

This will allow a future commit to make mergesort unstable when
the user specifies ‘no sort stable’, since it has been decided
that mergesort should remain stable by default.

This bit is not yet used, but is quite harmless.

M   lib/B/Op_private.pm
M   lib/sort.pm
M   op.c
M   opcode.h
M   perl.h
M   pp_sort.c
M   regen/op_private
---

Summary of changes:
 lib/B/Op_private.pm |   5 +-
 lib/sort.pm |   5 +-
 op.c|   3 +
 opcode.h| 138 +-
 perl.h  |   3 +-
 pod/perldiag.pod| 168 ++--
 pp_sort.c   |   3 +
 regen/op_private|   1 +
 t/lib/warnings/op   |  59 --
 t/lib/warnings/toke |  60 ++-
 t/porting/diag.t|   4 +-
 toke.c  |  13 
 12 files changed, 244 insertions(+), 218 deletions(-)

diff --git a/lib/B/Op_private.pm b/lib/B/Op_private.pm
index 19d1333e4a..b7dfd39767 100644
--- a/lib/B/Op_private.pm
+++ b/lib/B/Op_private.pm
@@ -537,7 +537,7 @@ $bits{sin}{0} = $bf[0];
 $bits{snetent}{0} = $bf[0];
 @{$bits{socket}}{3,2,1,0} = ($bf[4], $bf[4], $bf[4], $bf[4]);
 @{$bits{sockpair}}{3,2,1,0} = ($bf[4], $bf[4], $bf[4], $bf[4]);
-@{$bits{sort}}{6,5,4,3,2,1,0} = ('OPpSORT_STABLE', 'OPpSORT_QSORT', 
'OPpSORT_DESCEND', 'OPpSORT_INPLACE', 'OPpSORT_REVERSE', 'OPpSORT_INTEGER', 
'OPpSORT_NUMERIC');
+@{$bits{sort}}{7,6,5,4,3,2,1,0} = ('OPpSORT_UNSTABLE', 'OPpSORT_STABLE', 
'OPpSORT_QSORT', 'OPpSORT_DESCEND', 'OPpSORT_INPLACE', 'OPpSORT_REVERSE', 
'OPpSORT_INTEGER', 'OPpSORT_NUMERIC');
 @{$bits{splice}}{3,2,1,0} = ($bf[4], $bf[4], $bf[4], $bf[4]);
 @{$bits{split}}{4,3,2} = ('OPpSPLIT_ASSIGN', 'OPpSPLIT_LEX', 
'OPpSPLIT_IMPLIM');
 @{$bits{sprintf}}{3,2,1,0} = ($bf[4], $bf[4], $bf[4], $bf[4]);
@@ -676,6 +676,7 @@ our %defines = (
 OPpSORT_QSORT=>  32,
 OPpSORT_REVERSE  =>   4,
 OPpSORT_STABLE   =>  64,
+OPpSORT_UNSTABLE => 128,
 OPpSPLIT_ASSIGN  =>  16,
 OPpSPLIT_IMPLIM  =>   4,
 OPpSPLIT_LEX =>   8,
@@ -775,6 +776,7 @@ our %labels = (
 OPpSORT_QSORT=> 'QSORT',
 OPpSORT_REVERSE  => 'REV',
 OPpSORT_STABLE   => 'STABLE',
+OPpSORT_UNSTABLE => 'UNSTABL

[perl.git] branch blead, updated. v5.27.2-8-ge9b9033560

2017-07-20 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/e9b90335606dcae569679dd71fa9a380955fb8f7?hp=56c35cf6201e8e4c101fea1c8bc4878b17afd323>

- Log -
commit e9b90335606dcae569679dd71fa9a380955fb8f7
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Thu Jul 20 18:55:44 2017 -0700

op.c: Confusing comment typo
---

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

diff --git a/op.c b/op.c
index c6b5ec735f..fedaf67cc7 100644
--- a/op.c
+++ b/op.c
@@ -11130,7 +11130,7 @@ Perl_ck_sort(pTHX_ OP *o)
 }
 
 /* for sort { X } ..., where X is one of
- *   $a <=> $b, $b <= $a, $a cmp $b, $b cmp $a
+ *   $a <=> $b, $b <=> $a, $a cmp $b, $b cmp $a
  * elide the second child of the sort (the one containing X),
  * and set these flags as appropriate
OPpSORT_NUMERIC;

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.27.1-127-g00a68463f4

2017-07-10 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/00a68463f4f475b7f5f17189492f65676e9c40e3?hp=43901c14b88e29ab163687f16d4934b3d66d3b7c>

- Log -
commit 00a68463f4f475b7f5f17189492f65676e9c40e3
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Jul 9 22:53:52 2017 -0700

Test that ref works in tainted statements

This commit broke Module::Runtime in debugging builds:

commit ba75e9a42bd919d317a4f5deb1e487c13586929d
Author: David Mitchell <da...@iabyn.com>
Date:   Fri Jan 6 14:59:54 2017 +

make OP_REF support boolean context

This commit restored the previous, behaviour:

commit a10e04b588b6b10ac6d059efacd8dec25d14bdb3
Author: David Mitchell <da...@iabyn.com>
Date:   Thu Jun 15 14:29:56 2017 +0100

pp_ref: do SvSETMAGIC(TARG)

But no test was added to make sure it stays fixed.  Here is a test.
---

Summary of changes:
 t/op/taint.t | 5 +
 1 file changed, 5 insertions(+)

diff --git a/t/op/taint.t b/t/op/taint.t
index c13eaf6bd8..0988c7e0e0 100644
--- a/t/op/taint.t
+++ b/t/op/taint.t
@@ -2448,6 +2448,11 @@ is eval { eval $::x.1 }, 1, 'reset does not taint undef';
 isnt_tainted $b, "list assign post tainted expression b";
 }
 
+# Module::Runtime was temporarily broken between 5.27.0 and 5.27.1 because
+# ref() would fail an assertion in a tainted statement.  (No ok() neces-
+# sary since it aborts when it fails.)
+() = defined $^X && ref \$^X;
+
 
 # This may bomb out with the alarm signal so keep it last
 SKIP: {

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.27.1-101-gb9a58d500d

2017-07-02 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/b9a58d500dd75ba783abac92a56e57d41227f62b?hp=132771f7006e25b81986880bb09296b68d3e29f4>

- Log -
commit b9a58d500dd75ba783abac92a56e57d41227f62b
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Jul 2 11:35:20 2017 -0700

[perl #131679] Fix ‘our sub foo::bar’ message

It should say subroutine, not variable.

M   t/lib/croak/toke
M   toke.c

commit cc1385000d16c5233a15d62adab1df3cc1a2d2ad
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Jul 2 11:27:32 2017 -0700

op.c: Remove unused THX param

M   op.c

commit e26c6904d9f9f5ea818e590331b14038279332d1
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Jun 25 06:37:19 2017 -0700

[perl #131645] Fix assert fail in pp_sselect

pp_sselect (4-arg select) process its first three bitfield arguments
first, making sure each one has a valid PV, and then it moves on to
the final, timeout argument.

SvGETMAGIC() on the timeout argument will wipe out any values the SV
holds, so if the same scalar is used as a bitfield argument *and* as
the timeout, it will no longer hold a valid PV.

Assertions later in pp_sselect make sure there is a valid PV.

This commit solves the assertion failure by making a temporary copy of
any gmagical or overloaded argument.  When the temporary copy is made,
the values written to the temporary copies of the bitfield arguments
are then copied back to the original magical arguments.

M   pp_sys.c
M   t/op/sselect.t

commit 7600a9e5585cdade08986d507c3de5ea3b678bc3
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Jun 25 17:26:33 2017 -0700

pad.c: comment typo

M   pad.c

commit 1cdc5f0b922411a4ba6ac3cfc0450abb16db3f22
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Jun 25 17:21:29 2017 -0700

pad.c: POD typo

M   pad.c

commit 926b8942cc68fcd98a48c776f19e7348d819a396
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Jun 25 06:12:21 2017 -0700

Couple of test file comments

M   t/op/select.t
M   t/op/sselect.t
---

Summary of changes:
 op.c |  6 +++---
 pad.c|  4 ++--
 pp_sys.c | 21 +++--
 t/lib/croak/toke |  6 ++
 t/op/select.t|  3 +++
 t/op/sselect.t   | 13 -
 toke.c   |  3 ++-
 7 files changed, 43 insertions(+), 13 deletions(-)

diff --git a/op.c b/op.c
index 6ff74a1d88..1a2101c628 100644
--- a/op.c
+++ b/op.c
@@ -13495,7 +13495,7 @@ S_maybe_multideref(pTHX_ OP *start, OP *orig_o, UV 
orig_action, U8 hints)
  */
 
 static void
-S_check_for_bool_cxt(pTHX_ OP*o, U8 bool_flag, U8 maybe_flag)
+S_check_for_bool_cxt(OP*o, U8 bool_flag, U8 maybe_flag)
 {
 OP *lop;
 
@@ -14292,7 +14292,7 @@ Perl_rpeep(pTHX_ OP *o)
case OP_PADHV:
 /* see if %h is used in boolean context */
 if ((o->op_flags & OPf_WANT) == OPf_WANT_SCALAR)
-S_check_for_bool_cxt(aTHX_ o, OPpTRUEBOOL, OPpMAYBE_TRUEBOOL);
+S_check_for_bool_cxt(o, OPpTRUEBOOL, OPpMAYBE_TRUEBOOL);
 if (o->op_type != OP_PADHV)
 break;
 /* FALLTHROUGH */
@@ -14790,7 +14790,7 @@ Perl_rpeep(pTHX_ OP *o)
 case OP_REF:
 /* see if ref() is used in boolean context */
 if ((o->op_flags & OPf_WANT) == OPf_WANT_SCALAR)
-S_check_for_bool_cxt(aTHX_ o, OPpTRUEBOOL, OPpMAYBE_TRUEBOOL);
+S_check_for_bool_cxt(o, OPpTRUEBOOL, OPpMAYBE_TRUEBOOL);
 break;
 
case OP_CUSTOM: {
diff --git a/pad.c b/pad.c
index 5bbb07a092..bbc835ab31 100644
--- a/pad.c
+++ b/pad.c
@@ -1019,7 +1019,7 @@ Perl_pad_findmy_sv(pTHX_ SV *name, U32 flags)
 
 Until the lexical C<$_> feature was removed, this function would
 find the position of the lexical C<$_> in the pad of the
-currently-executing function and returns the offset in the current pad,
+currently-executing function and return the offset in the current pad,
 or C.
 
 Now it always returns C.
@@ -2001,7 +2001,7 @@ S_cv_clone_pad(pTHX_ CV *proto, CV *cv, CV *outside, HV 
*cloned,
{
/* my sub */
/* Just provide a stub, but name it.  It will be
-  upgrade to the real thing on scope entry. */
+  upgraded to the real thing on scope entry. */
 dVAR;
U32 hash;
PERL_HASH(hash, PadnamePV(namesv)+1,
diff --git a/pp_sys.c b/pp_sys.c
index 65900faf5a..100762c1b7 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1149,6 +1149,7 @@ PP(pp_sselect)
 struct timeval *tbuf = 
 I32 growsize;
 c

[perl.git] branch sprout/131645, created. v5.27.1-70-gdce93dfad3

2017-06-25 Thread Father Chrysostomos
In perl.git, the branch sprout/131645 has been created

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

at  dce93dfad366d34e6501b4b31bcbe5c446b7b61b (commit)

- Log -
commit dce93dfad366d34e6501b4b31bcbe5c446b7b61b
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Jun 25 06:37:19 2017 -0700

Tentative fix for #131645

M   pp_sys.c
M   t/op/sselect.t

commit ca075b23bc985bda1e2d5d5d307cdc9da2f079a9
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Jun 25 06:12:21 2017 -0700

Couple of test file comments

M   t/op/select.t
M   t/op/sselect.t
---

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.27.0-51-g790acddeaa

2017-06-01 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/790acddeaa0d2c73524596048b129561225cf100?hp=dddb22758b5060ae9de978fbb03317185af97b24>

- Log -
commit 790acddeaa0d2c73524596048b129561225cf100
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Fri Apr 7 14:08:02 2017 -0700

[perl #131085] Crash with sub-in-stash

$ perl -e '$::{"A"} = sub {}; \&{"A"}'
Segmentation fault (core dumped)

The code that vivifies a typeglob out of a code ref assumed that the
CV had a name hek, which is always the case when perl itself puts the
code ref there (via ‘sub A{}’), but is not necessarily the case if
someone is insinuating other stuff into the stash.
---

Summary of changes:
 gv.c  | 2 +-
 t/op/gv.t | 4 
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gv.c b/gv.c
index d32a9c5399..315ec49169 100644
--- a/gv.c
+++ b/gv.c
@@ -421,7 +421,7 @@ Perl_gv_init_pvn(pTHX_ GV *gv, HV *stash, const char *name, 
STRLEN len, U32 flag
/* Not actually a constant.  Just a regular sub.  */
CV * const cv = (CV *)has_constant;
GvCV_set(gv,cv);
-   if (CvSTASH(cv) == stash && (
+   if (CvNAMED(cv) && CvSTASH(cv) == stash && (
   CvNAME_HEK(cv) == GvNAME_HEK(gv)
|| (  HEK_LEN(CvNAME_HEK(cv)) == HEK_LEN(GvNAME_HEK(gv))
   && HEK_FLAGS(CvNAME_HEK(cv)) != HEK_FLAGS(GvNAME_HEK(gv))
diff --git a/t/op/gv.t b/t/op/gv.t
index 8d5e7dcacc..4fe6b0028a 100644
--- a/t/op/gv.t
+++ b/t/op/gv.t
@@ -1187,6 +1187,10 @@ package GV_DOWNGRADE {
 ::like "$GV_DOWNGRADE::{FOO}", qr/SCALAR/, "gv_downgrade: post";
 }
 
+# [perl #131085] This used to crash; no ok() necessary.
+$::{"A131085"} = sub {}; \&{"A131085"};
+
+
 __END__
 Perl
 Rules

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.25.8-208-gfe7df09eec

2017-01-13 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/fe7df09eecdd7566894f43ed5bb23bdc3074e47e?hp=cbe2fc5001aa59cdc73e04cc35e097a2ecfbeec0>

- Log -
commit fe7df09eecdd7566894f43ed5bb23bdc3074e47e
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Thu Jan 12 22:17:04 2017 -0800

[perl #130546] Restore delete-scalar-slice warning

Commit v5.19.3-506-g429a25554a reduced false positives with the annoy-
ing ‘Scalar value such-and-such better written as such-and-such’ warn-
ing by flagging the op in the lexer (instead of warning immediately),
and then checking the op tree later, in order to avoid false positives
with perfectly valid constructs, such as qw"...".

The new code that checked the op tree looked for hslice and aslice
ops, but in the particular case of delete @a{...} and delete @a[...],
the slice op gets nulled and the delete op takes care of the slicing
operation (if you can call it that) itself.  The result was that the
warning disappeared altogether for delete.

This commit makes op.c check also for nulled hslice and aslice ops,
and applies the same heuristics to them as to unnulled slicing ops.
---

Summary of changes:
 op.c  | 10 --
 t/lib/warnings/op |  6 ++
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/op.c b/op.c
index 919e8ed514..c213bb684f 100644
--- a/op.c
+++ b/op.c
@@ -1670,10 +1670,12 @@ static void
 S_scalar_slice_warning(pTHX_ const OP *o)
 {
 OP *kid;
+const bool h = o->op_type == OP_HSLICE
+   || (o->op_type == OP_NULL && o->op_targ == OP_HSLICE);
 const char lbrack =
-   o->op_type == OP_HSLICE ? '{' : '[';
+   h ? '{' : '[';
 const char rbrack =
-   o->op_type == OP_HSLICE ? '}' : ']';
+   h ? '}' : ']';
 SV *name;
 SV *keysv = NULL; /* just to silence compiler warnings */
 const char *key = NULL;
@@ -2596,6 +2598,10 @@ S_finalize_op(pTHX_ OP* o)
 S_check_hash_fields_and_hekify(aTHX_ rop, key_op);
break;
 }
+case OP_NULL:
+   if (o->op_targ != OP_HSLICE && o->op_targ != OP_ASLICE)
+   break;
+   /* FALLTHROUGH */
 case OP_ASLICE:
S_scalar_slice_warning(aTHX_ o);
break;
diff --git a/t/lib/warnings/op b/t/lib/warnings/op
index e8d93e8a8c..37ebbbed99 100644
--- a/t/lib/warnings/op
+++ b/t/lib/warnings/op
@@ -167,9 +167,13 @@ use warnings 'syntax' ;
 @a{--$_};
 @a[$_];
 @a[--$_];
+delete @a[$x];
+delete @a{$x};
 no warnings 'syntax' ;
 @a[3];
 @a{3};
+delete @a[$x];
+delete @a{$x};
 EXPECT
 Scalar value @a[3] better written as $a[3] at - line 3.
 Scalar value @a{3} better written as $a{3} at - line 4.
@@ -181,6 +185,8 @@ Scalar value @a{...} better written as $a{...} at - line 9.
 Scalar value @a{...} better written as $a{...} at - line 10.
 Scalar value @a[...] better written as $a[...] at - line 11.
 Scalar value @a[...] better written as $a[...] at - line 12.
+Scalar value @a[...] better written as $a[...] at - line 13.
+Scalar value @a{...} better written as $a{...} at - line 14.
 
 # op.c
 use utf8;

--
Perl5 Master Repository


[perl.git] branch sprout/nonull, deleted. v5.25.4-136-gd99b32e

2016-09-20 Thread Father Chrysostomos
In perl.git, the branch sprout/nonull has been deleted



   was  d99b32eaf7ea0d4f7d205793d0747a75eb3d821b

---
d99b32eaf7ea0d4f7d205793d0747a75eb3d821b Make regexp_nonull.t test patterns 
without null
---

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.25.4-175-g2ad45e6

2016-09-18 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/2ad45e6fc35ffacc3e7203e55a5fc507aa9bbb06?hp=bccb768e4d426a431a6e9e675d1d3934a98fa089>

- Log -
commit 2ad45e6fc35ffacc3e7203e55a5fc507aa9bbb06
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 18 20:27:11 2016 -0700

perldelta for #129287 / b43665

M   pod/perldelta.pod

commit 47c158f08e62e042778e03c59cf45e2e7d23f137
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 18 20:24:00 2016 -0700

perldelta: Remove duplicate entry; fix typo

I had already documented the perlinterp change.

M   pod/perldelta.pod
---

Summary of changes:
 pod/perldelta.pod | 15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 3fab1a1..4d14955 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -175,11 +175,7 @@ section.
 =item *
 
 L has been expanded to give a more detailed example of how to
-hunt around in the parser to how a given operator is handled.
-
-=item *
-
-L now has an expanded op-tree section.
+hunt around in the parser for how a given operator is handled.
 
 =back
 
@@ -450,6 +446,15 @@ when it wasn't. [perl #129038]
 Fixed place where regex was not setting the syntax error correctly.
 [perl #129122]
 
+=item *
+
+The C<&.> operator (and the C<&> operator, when it treats its arguments as
+strings) were failing to append a trailing null byte if at least one string
+was marked as utf8 internally.  Many code paths (system calls, regexp
+compilation) still expect there to be a null byte in the string buffer
+just past the end of the logical string.  An assertion failure was the
+result.  [perl #129287]
+
 =back
 
 =head1 Known Problems

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.25.4-173-gbccb768

2016-09-18 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/bccb768e4d426a431a6e9e675d1d3934a98fa089?hp=2c4879e2628d6fa5a764e130f610deaff6f859a5>

- Log -
commit bccb768e4d426a431a6e9e675d1d3934a98fa089
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 18 20:20:06 2016 -0700

bop.t: Delete $SIG{__WARN__}

It is only needed for one block of tests.  Leaving the handler in
place makes it harder to add temporary diagnostics elsewhere in
the code.  (Where did my warning go?  Hey, why is ‘warn’ not work-
ing? :-)

M   t/op/bop.t

commit b43665fffa48dd179eba1b5616d4ca35b4def876
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 18 20:17:08 2016 -0700

[perl #129287] Make UTF8 & append null

The & and &. operators were not appending a null byte to the string
in utf8 mode.

(The internal function that they use is the same.  I used &. in the
test just because its intent is clearer.)

M   doop.c
M   t/op/bop.t

commit 71c89c826804a03f81e980d5286fdb0444490d86
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 18 12:19:13 2016 -0700

regexp.t: Update comments about column 1

Years out of date!

M   t/re/regexp.t
---

Summary of changes:
 doop.c|  1 +
 t/op/bop.t| 16 +++-
 t/re/regexp.t |  5 +++--
 3 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/doop.c b/doop.c
index ad9172a..234a425 100644
--- a/doop.c
+++ b/doop.c
@@ -1093,6 +1093,7 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right)
if (sv == left || sv == right)
(void)sv_usepvn(sv, dcorig, needlen);
SvCUR_set(sv, dc - dcorig);
+   *SvEND(sv) = 0;
break;
case OP_BIT_XOR:
while (lulen && rulen) {
diff --git a/t/op/bop.t b/t/op/bop.t
index 2afb8d7..f9bf1c5 100644
--- a/t/op/bop.t
+++ b/t/op/bop.t
@@ -19,7 +19,7 @@ BEGIN {
 # If you find tests are failing, please try adding names to tests to track
 # down where the failure is, and supply your new names as a patch.
 # (Just-in-time test naming)
-plan tests => 192 + (10*13*2) + 5 + 29;
+plan tests => 192 + (10*13*2) + 5 + 30;
 
 # numerics
 ok ((0xdead & 0xbeef) == 0x9ead);
@@ -567,6 +567,8 @@ for (
 }
 }
 
+delete $SIG{__WARN__};
+
 my $strval;
 
 {
@@ -664,3 +666,15 @@ is $^A, "123", '~v0 clears vstring magic on retval';
 is(-1 >> $w + 1, -1, "IV -1 right shift $w + 1 == -1");
 }
 }
+
+# [perl #129287] UTF8 & was not providing a trailing null byte.
+# This test is a bit convoluted, as we want to make sure that the string
+# allocated for &’s target contains memory initialised to something other
+# than a null byte.  Uninitialised memory does not make for a reliable
+# test.  So we do &. on a longer non-utf8 string first.
+for (["aaa","aaa"],[substr ("a\x{100}",0,1), "a"]) {
+use feature "bitwise";
+no warnings "experimental::bitwise", "pack";
+$byte = substr unpack("P2", pack "P", $$_[0] &. $$_[1]), -1;
+}
+is $byte, "\0", "utf8 &. appends null byte";
diff --git a/t/re/regexp.t b/t/re/regexp.t
index 2cbfc9f..1e85c93 100644
--- a/t/re/regexp.t
+++ b/t/re/regexp.t
@@ -5,8 +5,9 @@
 # There are five columns, separated by tabs.
 # An optional sixth column is used to give a reason, only when skipping tests
 #
-# Column 1 contains the pattern, optionally enclosed in C<''>.
-# Modifiers can be put after the closing C<'>.
+# Column 1 contains the pattern, optionally enclosed in C<''> C<::> or
+# C.  Modifiers can be put after the closing delimiter.  C<''> will
+# automatically be added to any other patterns.
 #
 # Column 2 contains the string to be matched.
 #

--
Perl5 Master Repository


[perl.git] branch sprout/nonull, created. v5.25.4-136-gd99b32e

2016-09-18 Thread Father Chrysostomos
In perl.git, the branch sprout/nonull has been created

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

at  d99b32eaf7ea0d4f7d205793d0747a75eb3d821b (commit)

- Log -
commit d99b32eaf7ea0d4f7d205793d0747a75eb3d821b
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 18 12:11:28 2016 -0700

Make regexp_nonull.t test patterns without null

It was only testing matches against strings without a trailing
null byte.  Now it also tests compilation of patterns without
a trailing null byte.
---

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.25.4-135-gdd81958

2016-09-17 Thread Father Chrysostomos
In perl.git, the branch blead has been updated



- Log -
commit dd819584009e7adfc0786ed5beaf6c805ef05a2d
Author: E. Choroba 
Date:   Sat Sep 17 22:05:15 2016 +0200

Fix English in perlfunc
---

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 e2c9a81..efd6198 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -4350,7 +4350,7 @@ opens the UTF8-encoded file containing Unicode characters;
 see L.  Note that if layers are specified in the
 three-argument form, then default layers stored in ${^OPEN} (see L;
 usually set by the L pragma or the switch C<-CioD>) are ignored.
-Those layers will also be ignored if you specifying a colon with no name
+Those layers will also be ignored if you specify a colon with no name
 following it.  In that case the default layer for the operating system
 (:raw on Unix, :crlf on Windows) is used.
 

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.25.4-134-ge426a4a

2016-09-17 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/e426a4af0644ce718d70a7327657df22c8e68d9e?hp=f434f3571e41ee9c418f07c8510af58cf4083f70>

- Log -
commit e426a4af0644ce718d70a7327657df22c8e68d9e
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sat Sep 17 11:06:55 2016 -0700

Add regexp_nonull.t

for testing the regular expression engine with strings that
lack a trailing null byte.
---

Summary of changes:
 MANIFEST  |  1 +
 ext/XS-APItest/APItest.xs | 12 
 t/re/regexp.t |  4 +++-
 t/re/regexp_nonull.t  | 17 +
 4 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 t/re/regexp_nonull.t

diff --git a/MANIFEST b/MANIFEST
index d99b41b..f37157f 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -5678,6 +5678,7 @@ t/re/regex_sets.t Test (?[ ])
 t/re/regex_sets_compat.t   Test (?[ ]) is compatible with old [ ]
 t/re/regexp.t  See if regular expressions work
 t/re/regexp_noamp.tSee if regular expressions work with 
optimizations
+t/re/regexp_nonull.t   See if regexps work without trailing nulls
 t/re/regexp_notrie.t   See if regular expressions work without trie 
optimisation
 t/re/regexp_qr.t   See if regular expressions work as qr//
 t/re/regexp_qr_embed.t See if regular expressions work with embedded 
qr//
diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs
index 4602cee..907c17d 100644
--- a/ext/XS-APItest/APItest.xs
+++ b/ext/XS-APItest/APItest.xs
@@ -4219,6 +4219,18 @@ CODE:
 } else
 Perl_croak(aTHX_ "load_module can't yet support %"IVdf" items", 
(IV)items);
 
+SV *
+string_without_null(SV *sv)
+CODE:
+{
+STRLEN len;
+const char *s = SvPV(sv, len);
+RETVAL = newSVpvn_flags(s, len, SvUTF8(sv));
+*SvEND(RETVAL) = 0xff;
+}
+OUTPUT:
+RETVAL
+
 MODULE = XS::APItest PACKAGE = XS::APItest::AUTOLOADtest
 
 int
diff --git a/t/re/regexp.t b/t/re/regexp.t
index 5ec6e5c..2cbfc9f 100644
--- a/t/re/regexp.t
+++ b/t/re/regexp.t
@@ -98,7 +98,8 @@ sub convert_from_ascii {
 use strict;
 use warnings FATAL=>"all";
 use vars qw($bang $ $nulnul); # used by the tests
-use vars qw($qr $skip_amp $qr_embed $qr_embed_thr $regex_sets); # set by our 
callers
+use vars qw($qr $skip_amp $qr_embed $qr_embed_thr $regex_sets
+$no_null); # set by our callers
 
 
 
@@ -363,6 +364,7 @@ foreach (@tests) {
# Need to make a copy, else the utf8::upgrade of an already studied
# scalar confuses things.
my $subject = $subject;
+   $subject = XS::APItest::string_without_null($subject) if $no_null;
my $c = $iters;
my ($code, $match, $got);
 if ($repl eq 'pos') {
diff --git a/t/re/regexp_nonull.t b/t/re/regexp_nonull.t
new file mode 100644
index 000..885ef0f
--- /dev/null
+++ b/t/re/regexp_nonull.t
@@ -0,0 +1,17 @@
+#!./perl
+
+# Matches regular expressions against strings with no terminating null
+# character.
+
+print("1..0 # Skip No XS::APItest under miniperl\n"), exit 0 if
+  !defined ::boot_DynaLoader;
+
+$no_null = 1;
+require XS::APItest;
+for $file ('./re/regexp.t', './t/re/regexp.t', ':re:regexp.t') {
+  if (-r $file) {
+do $file or die $@;
+exit;
+  }
+}
+die "Cannot find ./re/regexp.t or ./t/re/regexp.t\n";

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.25.4-129-g6ad1523

2016-09-14 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/6ad15231b493b02c8de67d569c41b9403c64c934?hp=1665b718d8fbd58705dbe6376fa51f8c1a02d887>

- Log -
commit 6ad15231b493b02c8de67d569c41b9403c64c934
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Tue Sep 13 23:05:43 2016 -0700

Increase $XS::APItest::VERSION to 0.84

M   ext/XS-APItest/APItest.pm

commit abd589f7eef29bc20721042e0aec86b6313d8ca2
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Tue Sep 13 23:01:58 2016 -0700

perldelta for #129164 / 92b69f650

M   pod/perldelta.pod

commit 190c14e6ab8de1c1994b1043511ececcdf6d544d
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Tue Sep 13 23:00:56 2016 -0700

perldelta for #129090 / 6da13066b6

M   pod/perldelta.pod

commit 80d3c92b9be75c347eb83dcb51779eb9693d6414
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Tue Sep 13 22:59:18 2016 -0700

perldelta for #47047 / 1de22db27a

M   pod/perldelta.pod

commit 046a081fb2198b60a2d9a40f1d9b0ceaab7f86e2
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Tue Sep 13 22:57:22 2016 -0700

perldelta for #129196 / 9bde56224

M   pod/perldelta.pod

commit 5c0226f4301ebe0bbd5f2b351893c751547d35b4
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Tue Sep 13 22:54:49 2016 -0700

perldelta for ba0a4150f

M   pod/perldelta.pod

commit cb236c5af879f63fa780eab6c248de095735b48d
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Tue Sep 13 22:50:30 2016 -0700

perldelta for #125679 / 2b6a5bfb1

M   pod/perldelta.pod

commit 2f8fe46ae12e1e284e8f9e09873282d9288b7a54
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Tue Sep 13 22:48:29 2016 -0700

perldelta for #107726 / 8bc40f3a4e

M   pod/perldelta.pod

commit 6985230a6e9dafc0b356186a2513961407efe2da
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Tue Sep 13 22:46:43 2016 -0700

perldelta for 65169990

M   pod/perldelta.pod
---

Summary of changes:
 ext/XS-APItest/APItest.pm |  2 +-
 pod/perldelta.pod | 45 -
 2 files changed, 41 insertions(+), 6 deletions(-)

diff --git a/ext/XS-APItest/APItest.pm b/ext/XS-APItest/APItest.pm
index 09cfe22..d35018f 100644
--- a/ext/XS-APItest/APItest.pm
+++ b/ext/XS-APItest/APItest.pm
@@ -5,7 +5,7 @@ use strict;
 use warnings;
 use Carp;
 
-our $VERSION = '0.83';
+our $VERSION = '0.84';
 
 require XSLoader;
 
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 0898ab1..8b7f65c 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -33,7 +33,14 @@ XXX Any security-related notices go here.  In particular, 
any security
 vulnerabilities closed should be noted here rather than in the
 L section.
 
-[ List each security issue as a =head2 entry ]
+=head2 "Escaped" colons and relative paths in PATH
+
+On Unix systems, Perl treats any relative paths in the PATH environment
+variable as tainted when starting a new process.  Previously, it was
+allowing a backslash to escape a colon (unlike the OS), consequently
+allowing relative paths to be considered safe if the PATH was set to
+something like C.  The check has been fixed to treat C<.> as tainted
+in that example.
 
 =head1 Incompatible Changes
 
@@ -119,7 +126,10 @@ XXX
 
 =item *
 
-L has been upgraded from version A.xx to B.yy.
+L has been upgraded from version 0.92 to 0.93.
+
+It no longer treats C immediately following C as
+end-of-file.  [perl #107726]
 
 =back
 
@@ -152,13 +162,14 @@ XXX Changes which significantly change existing files in 
F go here.
 However, any changes to F should go in the L
 section.
 
-=head3 L
+=head3 L
 
 =over 4
 
 =item *
 
-XXX Description of the change here
+L has been expanded to give a more detailed example of how to
+hunt around in the parser to how a given operator is handled.
 
 =back
 
@@ -346,7 +357,31 @@ files in F and F are best summarized in 
L.
 
 =item *
 
-XXX
+Invalid assignments to a reference constructor (e.g., C<\eval=time>) could
+sometimes crash in addition to giving a syntax error.  [perl #125679]
+
+=item *
+
+The parser could sometimes crash if a bareword came after C.
+[perl #129196]
+
+=item *
+
+Autoloading via a method call would warn erroneously ("Use of inherited
+AUTOLOAD for non-method") if there was a stub present in the package into
+which the invocant had been blessed.  The warning is no longer emitted in
+such circumstances.  [perl #47047]
+
+=item *
+
+A sub containing with a "forward" declaration with the same name (e.g.,
+C) could sometimes crash or loop infinitely.  [perl
+#129090]
+
+=item *
+
+The use of C on arrays with nonexistent elements could cause other
+operators to crash.  [perl #129164]
 
 =back
 

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.25.4-120-g1665b71

2016-09-13 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/1665b718d8fbd58705dbe6376fa51f8c1a02d887?hp=cfb736762c1becf344ce6beaa701ff2e1abd5f9c>

- Log -
commit 1665b718d8fbd58705dbe6376fa51f8c1a02d887
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Tue Sep 13 22:38:59 2016 -0700

[perl #129267] Test for gv_fetchmethod buffer overrun
---

Summary of changes:
 ext/XS-APItest/APItest.xs   | 3 +++
 ext/XS-APItest/t/gv_fetchmethod_flags.t | 5 +
 2 files changed, 8 insertions(+)

diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs
index 992b6a5..4602cee 100644
--- a/ext/XS-APItest/APItest.xs
+++ b/ext/XS-APItest/APItest.xs
@@ -2571,6 +2571,9 @@ gv_fetchmethod_flags_type(stash, methname, type, flags)
gv = gv_fetchmethod_pvn_flags(stash, name, len, flags | 
SvUTF8(methname));
break;
 }
+   case 4:
+   gv = gv_fetchmethod_pvn_flags(stash, SvPV_nolen(methname),
+ flags, SvUTF8(methname));
 }
XPUSHs( gv ? (SV*)gv : _sv_undef);
 
diff --git a/ext/XS-APItest/t/gv_fetchmethod_flags.t 
b/ext/XS-APItest/t/gv_fetchmethod_flags.t
index 15d1c41..2da3b70 100644
--- a/ext/XS-APItest/t/gv_fetchmethod_flags.t
+++ b/ext/XS-APItest/t/gv_fetchmethod_flags.t
@@ -49,3 +49,8 @@ is XS::APItest::gv_fetchmethod_flags_type(\%::, "method\0not 
quite!", 2, 0), "*m
 }
 }
 }
+
+# [perl #129267] Buffer overrun when argument name ends with colon and
+#there is a colon past the end.  This used to segv.
+XS::APItest::gv_fetchmethod_flags_type(\%::, "method:", 4, 7);
+ # With type 4, 7 is the length

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.25.4-111-g92b69f6

2016-09-11 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/92b69f6501b4d7351e09c8b1ddd386aa7e1c9cd1?hp=95c0a761e6d0916fd6abd02af5a344be7de9ecdb>

- Log -
commit 92b69f6501b4d7351e09c8b1ddd386aa7e1c9cd1
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 11 21:29:56 2016 -0700

[perl #129164] Crash with splice

This fixes #129166 and #129167 as well.

splice needs to take into account that arrays can hold NULLs and
return _sv_undef in those cases where it would have returned a
NULL element.
---

Summary of changes:
 pp.c |  4 
 t/op/array.t | 17 +
 2 files changed, 21 insertions(+)

diff --git a/pp.c b/pp.c
index 49b6abe..ea49b01 100644
--- a/pp.c
+++ b/pp.c
@@ -5363,6 +5363,8 @@ PP(pp_splice)
for (i = length - 1, dst = (ary)[offset]; i > 0; i--)
SvREFCNT_dec(*dst++);   /* free them now */
}
+   if (!*MARK)
+   *MARK = _sv_undef;
}
AvFILLp(ary) += diff;
 
@@ -5459,6 +5461,8 @@ PP(pp_splice)
while (length-- > 0)
SvREFCNT_dec(tmparyval[length]);
}
+   if (!*MARK)
+   *MARK = _sv_undef;
}
else
*MARK = _sv_undef;
diff --git a/t/op/array.t b/t/op/array.t
index 691d6ce..59ba434 100644
--- a/t/op/array.t
+++ b/t/op/array.t
@@ -558,4 +558,21 @@ is $#foo, 3, 'assigning to arylen aliased in 
foreach(scalar $#arylen)';
 sub { undef *_; shift }->(); # This would crash; no ok() necessary.
 sub { undef *_; pop   }->();
 
+# [perl #129164], [perl #129166], [perl #129167]
+# splice() with null array entries
+# These used to crash.
+$#a = -1; $#a++;
+() = 0-splice @a; # subtract
+$#a = -1; $#a++;
+() =  -splice @a; # negate
+$#a = -1; $#a++;
+() = 0+splice @a; # add
+# And with array expansion, too
+$#a = -1; $#a++;
+() = 0-splice @a, 0, 1, 1, 1;
+$#a = -1; $#a++;
+() =  -splice @a, 0, 1, 1, 1;
+$#a = -1; $#a++;
+() = 0+splice @a, 0, 1, 1, 1;
+
 "We're included by lib/Tie/Array/std.t so we need to return something true";

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.25.4-110-g95c0a76

2016-09-10 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/95c0a761e6d0916fd6abd02af5a344be7de9ecdb?hp=2799b159a376d29e518b47c469185f745cb3c97f>

- Log -
commit 95c0a761e6d0916fd6abd02af5a344be7de9ecdb
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sat Sep 10 07:27:43 2016 -0700

pad.c:pad_fixup_inner_anons: Add assertions

These would have made it easier to track down the bug fixed by
the previous commit.

M   pad.c

commit 6da13066b6bcab52b33b8891e90130d243b7faa1
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sat Sep 10 07:24:41 2016 -0700

[perl #129090] Crash with sub c{sub c}

The crash in the bug report was caused by v5.21.7-215-g307cbb9, which
added the code in question in order to fix another crash.  It exposed
an existing problem caused by v5.21.6-386-ga70f21d.

Some background:

When parsing ‘sub c{’, perl creates a new CV.  The CV gets installed
in the symbol table when the final ‘}’ is reached.

If there is already an undefined CV at that point, it gets reused and
the contents of the new CV are transferred to the existing one.  That
means that any subs defined within now have their CvOUTSIDE pointer
pointing to a stub that is about to be freed, so pad_fix_inner_anons
gets called to update those CvOUTSIDE pointers accordingly.

Formats were not getting their CvOUTSIDE pointers updated, so commit
v5.11.2-160-g421f30e added formats to the containing sub’s pad to
allow the CvOUTSIDE fix-up to apply to them, too.

That caused a crash, as explained in the commit message for
v5.17.1-213-ge09ac07, that the cited commit fixed by putting a weak RV
in the pad, not a direct pointer to the format, and giving the format
a strong CvOUTSIDE pointer.

Problem:

Commit v5.21.6-386-ga70f21d¹ fixed a problem with named subs not cor-
rectly referencing outer state vars (because of bad CvOUTSIDE point-
ers hiding the lexical vars).  It did so by extending the mechanism
already used for formats to apply to named subs as well.

The one mistake that that commit made was to add a pad entry for the
sub even if it was just a stub declaration.  That caused a sub with a
stub declaration inside it to a loop if they have the same name:

$ ./perl -Ilib -le '%c; sub c { sub c; eval q|$x| } c'

This happens because the ‘sub c;’ inserts a stub into the symbol table
and inserts a reference to that stub also into the pad of the sub cur-
rently being compiled.  The final CvOUTSIDE fix-up sets the CvOUTSIDE
of the erstwhile stub (that has just become the newly defined sub) to
the sub itself.  (The %c in the example is necessary to vivify the
typeglob; otherwise perl will cheat and the stub declaration won’t
actually create a CV.)

In addition, a crash can occur in this one-liner (reduced from the
original bug report):

$ ./miniperl -e '$a="a$a";my sub b;%c;sub c{sub b;sub c}'

The fix-up code iterates through the pad backwards, starting from the
last entry, so the CvOUTSIDE(c) -> c loop is set up before the lexical
 entry is encountered.  When it is encountered, CvOUTSIDE pointers
are followed to find the outer pad where b is defined, but the
PARENT_PAD_INDEX stored in the  padname is wrong for c’s own pad,
which is what we end up looking at due to the CvOUTSIDE loop.  The
‘outer’ entry may then turn out be an RV, not a CV, or just about any-
thing.  Crashes ensue.

Another, perhaps clearer, way to make it crash is to give the lexical
sub pad entry an outer offset far beyond the end of the directly-
enclosing sub:

$ ./perl -Ilib -lE '%c; my 
($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k,$l,$m,$n,$o,$p,$q,$r,$s,$t,$u); state sub b; 
sub c { sub b {} sub c }'
Segmentation fault: 11

Solution:

The fix is to stop package stubs from creating pad entries.

¹ Which I found by bisecting like this, in case anyone is interested:
../perl.git/Porting/bisect.pl --expect-fail  --start=v5.20.0 
--end=v5.22.0  -e '%c; sub c{sub c}; use B; print 
B::svref_2object(\)->PADLIST->ARRAYelt(0)->ARRAYelt(1)->PV'

M   op.c
M   t/op/sub.t

commit bbd6d871a56f710514d051bb71c3909085b11daf
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Thu Sep 8 22:17:34 2016 -0700

op.c: Avoid string cmp when unnecessary

M   op.c

commit 9c426bfddbdd904fc37d276cc68e6f2ec04251f4
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Thu Sep 8 14:25:09 2016 -0700

toke.c: Correct comment

M   toke.c
---

Summary of changes:
 op.c   |  4 ++--
 pad.c  |  2 ++
 t/op/sub.t | 14 +

[perl.git] branch blead, updated. v5.25.4-93-g6b42170

2016-09-06 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/6b4217073fa5e351c7c41aa008f521a158e84237?hp=10068948b21836d5094958b8b2766eb9393c909b>

- Log -
commit 6b4217073fa5e351c7c41aa008f521a158e84237
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Tue Sep 6 22:11:05 2016 -0700

[perl #129106] Check for null PL_curcop in IN_LC()

or, rather, in macros that it calls.

When exiting a string eval, the current cop may be freed, so PL_curcop
gets set to null.  With the -DC option, we may end up printfing NVs
during scope exit, so the locale macros used to make sure that the
locale is sane before converting the numbers to strings need to make
sure not to read PL_curcop->cop_hints when PL_curcop is null.

This used to crash with: ./miniperl -DC -e'eval "l/A"'

I’m not sure how to write a test for this, or even whether it’s worth
writing a test for -D, which often changes behaviour depending on
porters’ whims.
---

Summary of changes:
 perl.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/perl.h b/perl.h
index 9509be2..f1914a8 100644
--- a/perl.h
+++ b/perl.h
@@ -6002,7 +6002,8 @@ typedef struct am_table_short AMTS;
 
 /* Returns TRUE if the plain locale pragma without a parameter is in effect
  */
-#   define IN_LOCALE_RUNTIME   cBOOL(CopHINTS_get(PL_curcop) & HINT_LOCALE)
+#   define IN_LOCALE_RUNTIME   (PL_curcop \
+&& CopHINTS_get(PL_curcop) & HINT_LOCALE)
 
 /* Returns TRUE if either form of the locale pragma is in effect */
 #   define IN_SOME_LOCALE_FORM_RUNTIME   \
@@ -6023,7 +6024,7 @@ typedef struct am_table_short AMTS;
 
 #   define IN_LC_PARTIAL_COMPILETIME   cBOOL(PL_hints & HINT_LOCALE_PARTIAL)
 #   define IN_LC_PARTIAL_RUNTIME  \
-cBOOL(CopHINTS_get(PL_curcop) & HINT_LOCALE_PARTIAL)
+   (PL_curcop && CopHINTS_get(PL_curcop) & HINT_LOCALE_PARTIAL)
 
 #   define IN_LC_COMPILETIME(category)   \
(IN_LC_ALL_COMPILETIME || (IN_LC_PARTIAL_COMPILETIME  \

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.25.4-89-g05bda26

2016-09-05 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/05bda26ce45ab1f7024d0e8a656a251a181f0275?hp=0af40c757f083cc12988effb46da5313cd042f00>

- Log -
commit 05bda26ce45ab1f7024d0e8a656a251a181f0275
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Sep 5 10:14:29 2016 -0700

Fix up B::Concise tests following op flag change

M   ext/B/t/optree_specials.t

commit 1de22db27a9aaa5fec9e9b93ec06a1d6c6f05c31
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Sep 5 09:31:31 2016 -0700

[perl #47047] Fix erroneous AUTOLOAD warning

If there was a stub present in the package into which the invocant had
been blessed, then AUTOLOADing via a *method* call would warn with ‘Use
of inherited AUTOLOAD for non-method’ even if it is a method.

A recent commit stopped OPf_REF from being set on OP_ENTERSUB, so this
commit uses that flag to indicate a method call, to allow a fast run-
time check to see whether to pass the method flag to gv_autoload.

M   op.c
M   pp_hot.c

commit 9493dad184630fd01d49f6b613821550566a587c
Author: Rick Delaney <r...@bort.ca>
Date:   Mon Sep 5 09:25:59 2016 -0700

Test for perl #47047

M   t/lib/warnings/gv

commit 63433e93928eda511e2444d6caea6da9a03a256c
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 4 23:27:42 2016 -0700

No need to skip t/op/dump.t on darwin

M   t/op/dump.t

commit f441d7d224a86a59913b23e5e17431baf03db56e
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 4 23:14:21 2016 -0700

Stop setting OPf_REF on OP_ENTERSUB

It isn’t doing anything really here, and I need it for
another purpose.

M   op.c
---

Summary of changes:
 ext/B/t/optree_specials.t | 36 ++--
 op.c  |  6 --
 pp_hot.c  |  5 -
 t/lib/warnings/gv |  2 ++
 t/op/dump.t   |  2 +-
 5 files changed, 29 insertions(+), 22 deletions(-)

diff --git a/ext/B/t/optree_specials.t b/ext/B/t/optree_specials.t
index d7200db..83ea44e 100644
--- a/ext/B/t/optree_specials.t
+++ b/ext/B/t/optree_specials.t
@@ -48,7 +48,7 @@ checkOptree ( name=> 'BEGIN',
 # -<;> ex-nextstate(B::Concise -837 Concise.pm:366) v:*,&,{,x*,x&,x$,$ 
->4
 # -<@> lineseq K ->-
 # 4   <;> nextstate(B::Concise -275 Concise.pm:356) :*,&,{,x*,x&,x$,$ 
->5
-# 9   <1> entersub[t1] KS*/TARG,STRICT ->a
+# 9   <1> entersub[t1] KRS*/TARG,STRICT ->a
 # 5  <0> pushmark s ->6
 # 6  <$> const[PV "strict"] sM ->7
 # 7  <$> const[PV "refs"] sM ->8
@@ -62,7 +62,7 @@ checkOptree ( name=> 'BEGIN',
 # -<;> ex-nextstate(B::Concise -812 Concise.pm:386) v:*,&,x*,x&,x$,$ 
->e
 # -<@> lineseq K ->-
 # e   <;> nextstate(B::Concise -265 Concise.pm:367) :*,&,x*,x&,x$,$ ->f
-# j   <1> entersub[t1] KS*/TARG,STRICT ->k
+# j   <1> entersub[t1] KRS*/TARG,STRICT ->k
 # f  <0> pushmark s ->g
 # g  <$> const[PV "strict"] sM ->h
 # h  <$> const[PV "refs"] sM ->i
@@ -76,7 +76,7 @@ checkOptree ( name=> 'BEGIN',
 # -<;> ex-nextstate(B::Concise -798 Concise.pm:406) v:*,&,{,x*,x&,x$,$ 
->o
 # -<@> lineseq K ->-
 # o   <;> nextstate(B::Concise -254 Concise.pm:386) :*,&,{,x*,x&,x$,$ 
->p
-# t   <1> entersub[t1] KS*/TARG,STRICT ->u
+# t   <1> entersub[t1] KRS*/TARG,STRICT ->u
 # p  <0> pushmark s ->q
 # q  <$> const[PV "warnings"] sM ->r
 # r  <$> const[PV "qw"] sM ->s
@@ -98,7 +98,7 @@ EOT_EOT
 # -<;> ex-nextstate(B::Concise -837 Concise.pm:366) v:*,&,{,x*,x&,x$,$ 
->4
 # -<@> lineseq K ->-
 # 4   <;> nextstate(B::Concise -275 Concise.pm:356) :*,&,{,x*,x&,x$,$ 
->5
-# 9   <1> entersub[t1] KS*/TARG,STRICT ->a
+# 9   <1> entersub[t1] KRS*/TARG,STRICT ->a
 # 5  <0> pushmark s ->6
 # 6  <$> const(PV "strict") sM ->7
 # 7  <$> const(PV "refs") sM ->8
@@ -112,7 +112,7 @@ EOT_EOT
 # -<;> ex-nextstate(B::Concise -812 Concise.pm:386) v:*,&,x*,x&,x$,$ 
->e
 # -<@> lineseq K ->-
 # e   <;> nextstate(B::Concise -265 Concise.pm:367) :*,&,x*,x&,x$,$ ->f
-# j   <1> 

[perl.git] branch blead, updated. v5.25.4-74-g03a1fa1

2016-09-04 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/03a1fa1ec8c5ab3929f9d04fe91f45260062eb0e?hp=a6128716d2cc20147851e0a37768376647bd3242>

- Log -
commit 03a1fa1ec8c5ab3929f9d04fe91f45260062eb0e
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 4 22:11:00 2016 -0700

parser.t: Suppress warning
---

Summary of changes:
 t/comp/parser.t | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/t/comp/parser.t b/t/comp/parser.t
index 2da145c..b752500 100644
--- a/t/comp/parser.t
+++ b/t/comp/parser.t
@@ -544,7 +544,10 @@ eval "grep+grep";
 eval 'BEGIN {$^H=-1} \eval=time';
 
 # Used to fail an assertion [perl #129073]
-eval '${p{};sub p}()';
+{
+ local $SIG{__WARN__} = sub{};
+ eval '${p{};sub p}()';
+}
 
 # RT #124207 syntax error during stringify can leave stringify op
 # with multiple children and assertion failures

--
Perl5 Master Repository


[perl.git] branch maint-votes, updated. bb2234c5214d8fed81e9b37563b566cc371f8309

2016-09-04 Thread Father Chrysostomos
In perl.git, the branch maint-votes has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/bb2234c5214d8fed81e9b37563b566cc371f8309?hp=87c95c8e060342f1d4c5073b47e4f1947a07586f>

- Log -
commit bb2234c5214d8fed81e9b37563b566cc371f8309
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 4 21:41:37 2016 -0700

Proposals

M   votes-5.22.xml
M   votes-5.24.xml

commit f0a769b7b23aea94b4e04ce5335175d3d59b048b
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 4 21:36:52 2016 -0700

Vote

M   votes-5.22.xml
M   votes-5.24.xml

commit b8149113393d64c23f6dddb7ab4d92053067cc78
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 4 21:35:11 2016 -0700

Vote for #129122; propose it for 5.22

M   votes-5.22.xml
M   votes-5.24.xml
---

Summary of changes:
 votes-5.22.xml | 9 -
 votes-5.24.xml | 9 +++--
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/votes-5.22.xml b/votes-5.22.xml
index 1d41b1b..485e130 100644
--- a/votes-5.22.xml
+++ b/votes-5.22.xml
@@ -25,6 +25,8 @@ The same criteria apply to code in dual-life modules as to 
core code.)
 
 Security Fixes
 
+
+
 
 
 Crash / Assertion / Memory Corruption Fixes
@@ -34,6 +36,9 @@ The same criteria apply to code in dual-life modules as to 
core code.)
 
 
 
+
+
+
 
 
 
@@ -78,6 +83,8 @@ the first one required manual backporting (available on 
request).
 
 
 
+
+
 
 
 New Feature Fixes
@@ -104,7 +111,7 @@ the first one required manual backporting (available on 
request).
 Documentation Fixes
 
 
-
+
 
 
 
diff --git a/votes-5.24.xml b/votes-5.24.xml
index 377fdad..c2f18aa 100644
--- a/votes-5.24.xml
+++ b/votes-5.24.xml
@@ -44,6 +44,8 @@ The same criteria apply to code in dual-life modules as to 
core code.)
 
 Security Fixes
 
+
+
 
 
 Crash / Assertion / Memory Corruption Fixes
@@ -57,6 +59,9 @@ This one needs the version in ext/POSIX/lib/POSIX.pm bumped 
to 1.65_01:
 
 
 
+
+
+
 
 
 
@@ -107,7 +112,7 @@ the first one required manual backporting (available on 
request).
 
 
 
-
+
 
 
 New Feature Fixes
@@ -141,7 +146,7 @@ Should we not just backport 2d41a263 instead? And does 5.22 
need this, too? --sp
 
 
 
-
+
  
 
 

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.25.4-73-ga612871

2016-09-04 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/a6128716d2cc20147851e0a37768376647bd3242?hp=56e4cf64af2b3a43a26bdad52bcc8e17c6a05a23>

- Log -
commit a6128716d2cc20147851e0a37768376647bd3242
Author: Dan Collins <dcolli...@gmail.com>
Date:   Sun Sep 4 14:43:41 2016 -0400

Regression test for RT #129196

M   t/op/evalbytes.t

commit 9bde56224e82f20e7a65b3469b1ffb6b9f6d4df8
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 4 20:24:19 2016 -0700

[perl #129196] Crash/bad read with ‘evalbytes S’

5dc13276 added some code to toke.c that did not take into account
that the opnum (‘f’) argument to UNI* could be a negated op number.
PL_last_lop_op must never be negative, since it is used as an offset
into a struct.

Tests for the crash will come in the next commit.

M   toke.c
---

Summary of changes:
 t/op/evalbytes.t | 6 +-
 toke.c   | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/t/op/evalbytes.t b/t/op/evalbytes.t
index 9b77c8e..9a09ba9 100644
--- a/t/op/evalbytes.t
+++ b/t/op/evalbytes.t
@@ -7,7 +7,7 @@ BEGIN {
 require './charset_tools.pl';
 }
 
-plan(tests => 8);
+plan(tests => 9);
 
 {
 local $SIG{__WARN__} = sub {};
@@ -34,3 +34,7 @@ chop($upcode = "use utf8; $U_100" . chr 256);
 is evalbytes $upcode, chr 256, 'use utf8 within evalbytes on utf8 string';
 eval { evalbytes chr 256 };
 like $@, qr/Wide character/, 'evalbytes croaks on non-bytes';
+
+eval 'evalbytes S';
+ok 1, '[RT #129196] evalbytes S should not segfault';
+
diff --git a/toke.c b/toke.c
index 2fe8b69..2350703 100644
--- a/toke.c
+++ b/toke.c
@@ -241,7 +241,7 @@ static const char* const lex_state_names[] = {
if (have_x) PL_expect = x; \
PL_bufptr = s; \
PL_last_uni = PL_oldbufptr; \
-   PL_last_lop_op = f; \
+   PL_last_lop_op = f < 0 ? -f : f; \
if (*s == '(') \
return REPORT( (int)FUNC1 ); \
s = skipspace(s); \

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.25.4-70-g3697c6e

2016-09-04 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/3697c6e2db983f1714b7206be5b04ee0784584e1?hp=bdc377e5e0c60dfb539423e956843489501ca2bd>

- Log -
commit 3697c6e2db983f1714b7206be5b04ee0784584e1
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 4 16:02:02 2016 -0700

release_schedule.pod: Tick off last month
---

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

diff --git a/Porting/release_schedule.pod b/Porting/release_schedule.pod
index f294bf4..bd61503 100644
--- a/Porting/release_schedule.pod
+++ b/Porting/release_schedule.pod
@@ -52,7 +52,7 @@ you should reset the version numbers to the next blead series.
   2016-05-20  5.25.1 ✓Sawyer X
   2016-06-20  5.25.2 ✓Matthew Horsfall
   2016-07-20  5.25.3 ✓Steve Hay
-  2016-08-20  5.25.4  BinGOs
+  2016-08-20  5.25.4 ✓BinGOs
   2016-09-20  5.25.5  Stevan Little
   2016-10-20  5.25.6  Chad Granum
   2016-11-20  5.25.7  Aaron Crane

--
Perl5 Master Repository


[perl.git] branch sprout/rstack, updated. v5.25.4-81-ga582a80

2016-09-04 Thread Father Chrysostomos
In perl.git, the branch sprout/rstack has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/a582a80191fe5c53e9f1ca809cef2c80546cf9d7?hp=8471533d46bf609a526e53df6b909049111be86e>

  discards  8471533d46bf609a526e53df6b909049111be86e (commit)
  discards  2a8e0661a57aa08bea585044fce6cebb7bc447bc (commit)
  discards  5747d176a9b7ececff89e31ed8caf8bf35f63261 (commit)
  discards  9dcdac8ab2413f0bfef4e427ce480abe4b1b5126 (commit)
  discards  028e9429205ef80a90da7f4c6407214416b74fbb (commit)
  discards  098fc52000c5b4471432b4a6b56d9366b9cf360a (commit)
  discards  990e26bd498625e7ae90aa61e0cacd718e61024c (commit)
  discards  9bc2df7ca4774be32d90d94f4adf47b9673da418 (commit)
  discards  dc74df58a5b29c5591a98738a7e219310fac1313 (commit)
  discards  a03882e33024c87b23c467bc041cce3c892f8ce9 (commit)
  discards  61998a82fb955a1ba2f8ec1b1cecdb65e991c3c6 (commit)
  discards  84bae2d2d6e1ff8c86c3a92c7b31ce25233c34fb (commit)
- Log -
commit a582a80191fe5c53e9f1ca809cef2c80546cf9d7
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Jul 25 23:24:49 2016 -0700

Make core use rstack; copy stack for xsubs

UNFINISHED!!!

The G_STACK flag will need to be documented in a subsequent commit.

M   cop.h
M   embed.fnc
M   embed.h
M   perl.c
M   perl.h
M   pp.h
M   pp_hot.c
M   scope.c

commit 4516dcafe27642e1a40e26c07743bd3aa862cb9e
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 4 14:40:54 2016 -0700

Actually create the new rmarkstack

M   perl.c

commit c5f68d8788878514e8f3d3d8423a91fc28b995e3
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Aug 29 22:14:00 2016 -0700

av.c:av_store: Handle rstack

I do believe this code is unreachable and paranoid, but call
me paranoid.

M   av.c

commit b4f230c7b2d1af7f3d2ce365c0d321f54e445e7a
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Aug 28 23:56:17 2016 -0700

av.c:av_extend: Handle rstack

M   av.c

commit 0cdb0f7d0fa77dd416192534c37296ad51651fee
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Thu Aug 25 22:15:34 2016 -0700

cop.h: Add G_RSTACK flag

This will be implicitly passed to call_sv and call_whatever based on
the value of the PERL_STACK_LOCALLY_REFCOUNTED #define.

M   cop.h

commit f325a82d1b3fd33ddfc0b4deee1b60f426c02206
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Aug 8 22:18:44 2016 -0700

Adjust mark macros to handle both stacks

Leave the refcounted-stack code disarmed for now, to keep things
compilable.

M   inline.h
M   pp.h

commit 4efdf00ee31858b526032ac16386edda306c4aab
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Wed Aug 10 23:03:43 2016 -0700

perl.c: Inline CALL_LIST_BODY

into the only spot that calls it.  This just makes the code at that
point clearer and easier to edit.

M   perl.c

commit fd0590ce3f1a1e2142975c2487138fa76043956c
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Aug 8 22:31:46 2016 -0700

sv.c: Clone new refcounted stacks

M   sv.c

commit 92d1047be0b955bf43d873010c4f7893f437f81d
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Jul 31 18:31:32 2016 -0700

New rmarkstack_grow func for rc stack

You can’t read the new body of the function without seeing stars.

M   embed.fnc
M   embed.h
M   proto.h
M   scope.c

commit 4ec9a4d9e5a5e897a4ce9cddc72434ed4ecc0f99
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Tue Jul 26 22:32:45 2016 -0700

Add rstack_grow function to grow refcounted stack

M   embed.fnc
M   embed.h
M   proto.h
M   scope.c

commit 2ad2305352f5733d4a96ae8715bf62ef06eb84cd
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Mon Jul 18 18:08:28 2016 -0700

perl.h: defines for refcounted stack

M   perl.h

commit ca7dca2eecaa6491d501701018b414e231eb3fc3
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sat Jul 16 23:08:15 2016 -0700

Add XSUB flag for refcounted stack

Subs with this flag will use perl’s default refcounted stack.  Other
subs will get the stack copied to the old non-refcounted stack when
they are called.

M   cv.h

commit 4eae3a25783006029fb26250e655a2e300bec1c4
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sat Jul 16 00:52:17 2016 -0700

Add intrp vars for a refcounted stack

M   embedvar.h
M   intrpvar.h
---

Summary of changes:
 AUTHORS  |   2 +
 Porting/bisect.pl|   6 +-
 cpan/HTTP-Tiny/t/140_proxy.t |   4 +
 dist/PathTools/Makefile.PL   |   1 -
 embed.fnc|  92 +++---
 embed.h  |   8 +-
 embedvar.h   |   4 +
 ext/POSIX/POSIX.xs   |

[perl.git] branch blead, updated. v5.25.4-69-gbdc377e

2016-09-04 Thread Father Chrysostomos
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/bdc377e5e0c60dfb539423e956843489501ca2bd?hp=ba0a4150f6f1604df236035adf6df18bd43de88e>

- Log -
commit bdc377e5e0c60dfb539423e956843489501ca2bd
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Sep 4 14:22:37 2016 -0700

[perl #129073] Assert failure: ${p{};sub p}()

When parsing the special ${var{subscript}} syntax, the lexer notes
that the } matching the ${ will be a fake bracket, and should
be ignored.

In the case of ${p{};sub p}() the first syntax error causes tokens to
be popped, such that the } following the sub declaration ends up being
the one treated as a fake bracket and ignored.

The part of the lexer that deals with sub declarations treats a ( fol-
lowing the sub name as a prototype (which is a single term) if signa-
tures are disabled, but ignores it and allows the rest of the lexer to
treat it as a parenthesis if signatures are enabled.

Hence, the part of the parser (perly.y) that parses signatures knows
that a parenthesis token can only come after a sub if signatures are
enabled, and asserts as much.

In the case of an error and tokens being discarded, a parenthesis may
come after a sub name as far as the parser is concerned, even though
there was a } in between that got discarded.  The sub part of the
lexer, of course did not see the parenthesis because of the interven-
ing brace, and did not treat it as a prototype.  So we get an asser-
tion failure.

The simplest fix is to loosen up the assertion and allow for anomalies
after errors.  It does not hurt to go ahead and parse a signature at
this point, even though the feature is disabled, because there has
been a syntax error already, so the parsed code will never run, and
the parsed sub will not be installed.
---

Summary of changes:
 perly.act   | 1557 +++
 perly.h |  297 +++
 perly.tab   | 1482 
 perly.y |4 +-
 t/comp/parser.t |3 +
 5 files changed, 1655 insertions(+), 1688 deletions(-)

diff --git a/perly.act b/perly.act
index 56285e9..2b71fe4 100644
--- a/perly.act
+++ b/perly.act
@@ -5,246 +5,219 @@
  */
 
 case 2:
-#line 118 "perly.y" /* yacc.c:1646  */
+#line 118 "perly.y"
 {
  parser->expect = XSTATE;
-   }
-
+   ;}
 break;
 
   case 3:
-#line 122 "perly.y" /* yacc.c:1646  */
+#line 122 "perly.y"
 {
- 
newPROG(block_end((ps[-1].val.ival),(ps[0].val.opval)));
+ newPROG(block_end((ps[(3) - (4)].val.ival),(ps[(4) - 
(4)].val.opval)));
  PL_compiling.cop_seq = 0;
  (yyval.ival) = 0;
-   }
-
+   ;}
 break;
 
   case 4:
-#line 128 "perly.y" /* yacc.c:1646  */
+#line 128 "perly.y"
 {
  parser->expect = XTERM;
-   }
-
+   ;}
 break;
 
   case 5:
-#line 132 "perly.y" /* yacc.c:1646  */
+#line 132 "perly.y"
 {
- PL_eval_root = (ps[0].val.opval);
+ PL_eval_root = (ps[(3) - (3)].val.opval);
  (yyval.ival) = 0;
-   }
-
+   ;}
 break;
 
   case 6:
-#line 137 "perly.y" /* yacc.c:1646  */
+#line 137 "perly.y"
 {
  parser->expect = XBLOCK;
-   }
-
+   ;}
 break;
 
   case 7:
-#line 141 "perly.y" /* yacc.c:1646  */
+#line 141 "perly.y"
 {
  PL_pad_reset_pending = TRUE;
- PL_eval_root = (ps[0].val.opval);
+ PL_eval_root = (ps[(3) - (3)].val.opval);
  (yyval.ival) = 0;
  yyunlex();
  parser->yychar = YYEOF;
-   }
-
+   ;}
 break;
 
   case 8:
-#line 149 "perly.y" /* yacc.c:1646  */
+#line 149 "perly.y"
 {
  parser->expect = XSTATE;
-   }
-
+   ;}
 break;
 
   case 9:
-#line 153 "perly.y" /* yacc.c:1646  */
+#line 153 "perly.y"
 {
  PL_pad_reset_pending = TRUE;
- PL_eval_root = (ps[0].val.opval);
+ PL_eval_root = (ps[(3) - (3)].val.opval);
  (yyva

[perl.git] branch sprout/av, deleted. v5.25.4-23-gdd45e15

2016-09-04 Thread Father Chrysostomos
In perl.git, the branch sprout/av has been deleted



   was  dd45e15f34111efd4025bc1131d808ab5aabb904

---
dd45e15f34111efd4025bc1131d808ab5aabb904 av experiment
---

--
Perl5 Master Repository


  1   2   3   4   5   6   7   8   9   10   >