This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
7 years agoperldelta for 743e3e72117a
Tony Cook [Tue, 24 Jan 2017 04:37:38 +0000 (15:37 +1100)]
perldelta for 743e3e72117a

7 years ago(perl #129190) intuit_method() can move the line buffer
Tony Cook [Thu, 8 Sep 2016 03:21:02 +0000 (13:21 +1000)]
(perl #129190) intuit_method() can move the line buffer

and broke PL_bufptr when it did.

7 years agoperldelta for 71776ae4fad9
Tony Cook [Tue, 24 Jan 2017 00:46:38 +0000 (11:46 +1100)]
perldelta for 71776ae4fad9

7 years ago(perl #129274) avoid treating the # in $# as a comment intro
Tony Cook [Tue, 24 Jan 2017 00:14:28 +0000 (11:14 +1100)]
(perl #129274) avoid treating the # in $# as a comment intro

7 years agopermit goto at top level of multicalled sub
Zefram [Mon, 23 Jan 2017 02:25:50 +0000 (02:25 +0000)]
permit goto at top level of multicalled sub

A multicalled sub is reckoned to be a pseudo block, out of which it is
not permissible to goto.  However, the test for a pseudo block was being
applied too early, preventing not just escape from a multicalled sub but
also a goto at the top level within the sub.  This is a bug similar, but
not identical, to [perl #113938].  Now the test is deferred, permitting
goto at the sub's top level but still forbidding goto out of it.

7 years agoBe consistent in deprecation messages.
Abigail [Mon, 23 Jan 2017 21:29:19 +0000 (22:29 +0100)]
Be consistent in deprecation messages.

Changed one deprecation message to not use a leading v in the Perl
version number, as the other deprecation messages don't have them
either.

7 years agodump.c: handle GV being really a ref to a CV
David Mitchell [Mon, 23 Jan 2017 16:12:38 +0000 (16:12 +0000)]
dump.c: handle GV being really a ref to a CV

RT #129285

These days a 'GV' can actually just be a ref to a CV when the only thing
that would be stored in the glob is a CV. Update S_do_op_dump_bar() to
handle this. Formerly it would trigger an assert on a non-threaded build.

In fact, incorporate the fixed logic into a static function,
S_gv_display(), that is shared by both S_do_op_dump_bar() and
Perl_debop(); so both

    perl -Dx

and

    perl -Dt

get the benefit.

Also for the -Dx case, make it display the raw address of the GV too.

7 years agoreindent OP_AELEMFAST block in S_do_op_dump_bar()
David Mitchell [Mon, 23 Jan 2017 15:14:43 +0000 (15:14 +0000)]
reindent OP_AELEMFAST block in S_do_op_dump_bar()

after previous commit removed an enclosing 'if' block.
Whitespace-only change

7 years agoop_dump(): no OPf_SPECIAL on AELEMFAST,GVSV,GV
David Mitchell [Mon, 23 Jan 2017 15:10:12 +0000 (15:10 +0000)]
op_dump(): no OPf_SPECIAL on AELEMFAST,GVSV,GV

between 5.14 and 5.16 pp_aelemfast changed from using OPf_SPECIAL to
using op type to distinguish between a lexical or glob arg, but op_dump()
hadn't been updated to reflect this. Also, GVSV and GV never used the
OPf_SPECIAL flag, so testing for it with those ops was wrong (but
currently harmless).

7 years agofix some more bizarre indention in dump.c
David Mitchell [Mon, 23 Jan 2017 14:58:29 +0000 (14:58 +0000)]
fix some more bizarre indention in dump.c

(whitespace-only change)

Not mentioning any names to protect the guilty, but about 3 years ago some
code was committed to dump.c that had just bizarre indentation; for
example, this

    if (foo)
        bar

being more like

        if (foo)
     bar

(and this is nothing to do with tab expansion).

This commit fixes up the most glaring issues.

7 years agomess_sv(): access only if PL_curcop is non-null
David Mitchell [Mon, 23 Jan 2017 13:37:21 +0000 (13:37 +0000)]
mess_sv(): access only if PL_curcop is non-null

RT #130621

In Perl_mess_sv(), don't try to add an "at foo line NN" to the error
message if PL_curcop is null.

In the ticket above, the reason that PL_curcop is null is the less
than optimal way that evals free their optree: ideally the optree should
be attached to the eval CV and freed when the CV is; instead a separate
SAVEFREEOP() is done. But that fix is for another time; regardless,
mess_sv() should have a PL_curcop != NULL guard anyway.

7 years agockDEAD: PL_curcop->cop_warnings only if PL_curcop
David Mitchell [Mon, 23 Jan 2017 13:27:07 +0000 (13:27 +0000)]
ckDEAD: PL_curcop->cop_warnings only if PL_curcop

RT #130621

In ckDEAD(), don't check the value of PL_curcop->cop_warnings unless
PL_curcop is non-null.

In the ticket above, the reason that PL_curcop is null is the less
than optimal way that evals free their optree: ideally the optree should
be attached to the eval CV and freed when the CV is; instead a separate
SAVEFREEOP() is done. But that fix is for another time; regardless,
ckDEAD() should have a PL_curcop != NULL guard anyway like isLEXWARN_on()
etc already do.

7 years agoavoid sort assert failure after compile fail
David Mitchell [Mon, 23 Jan 2017 12:27:20 +0000 (12:27 +0000)]
avoid sort assert failure after compile fail

RT #130617

in rpeep(), there's an assert that the optree is sane for the sort's
codeblock. After compile errors, it isn;t necessary sane, so skip the
assert in that case.

I've also changed a kLISTOP->op_next into the equivalent but less
obfuscated kid->op_next.

7 years agoFix memory leak in B::RHE->HASH method.
Sergey Aleynikov [Wed, 4 Jan 2017 22:33:32 +0000 (01:33 +0300)]
Fix memory leak in B::RHE->HASH method.

7 years agolib/utf8.t: Generalize for EBCDIC
Karl Williamson [Sun, 22 Jan 2017 17:55:43 +0000 (10:55 -0700)]
lib/utf8.t: Generalize for EBCDIC

This had an ASCII-specific test which has been failing on EBCDIC
platforms.

7 years agoMove I8 test helpers to common file
Karl Williamson [Sun, 22 Jan 2017 17:53:41 +0000 (10:53 -0700)]
Move I8 test helpers to common file

This moves the code that helps in testing I8 (which is the same as UTF-8
on non-EBCDIC platforms) to t/charset_tools.pl, away from the .t where
they previously were.  This means these can now be used in other .t's.

7 years agofix special-case recreation of *::
Zefram [Sun, 22 Jan 2017 07:26:34 +0000 (07:26 +0000)]
fix special-case recreation of *::

If *:: is called for then as a special case it is looked up as
$::{"main::"}.  If $::{"main::"} has been deleted, then that hash entry
is recreated.  But formerly it was only recreated as an undef scalar,
which broke things relying on glob lookup returning a glob.  Now in
that special case the recreated hash entry is initialised as a glob,
and populated with the customary recursive reference to the main stash.
Fixes [perl #129869].

7 years agohandle errors in gen_constant_list
Zefram [Sun, 22 Jan 2017 03:20:08 +0000 (03:20 +0000)]
handle errors in gen_constant_list

When the attempt to constant-fold a list generates an error, that
error should not be signalled at compile time, but merely abort the
attempt at constant folding, so that the error will occur naturally
at runtime.  This is achieved by wrapping the compile-time execution in
gen_constant_list() in a fake eval block.  This brings it in line with
the scalar fold_constants().  Fixes [perl #129320].

7 years agoavoid disabling utf8 pos cache on tainted strings
David Mitchell [Sat, 21 Jan 2017 15:47:43 +0000 (15:47 +0000)]
avoid disabling utf8 pos cache on tainted strings

RT #130584

When pos() or similar is used on a utf8 string, perl attaches magic
to it that caches a couple of byte<->char offset conversions. This can
avoid quadratic behaviour when continually scanning a big chunk of a long
string to convert a byte offset to a char offset when pos() is called.

v5.17.3-203-g7d1328b added code to invalidate this cache when get magic is
called on an SV, since the get magic may change the value of the SV.

However, under -T, taint magic gets added to a tainted string, which
includes a get method which doesn't actually change the SV's value.
So make a special exception to get-magic-cache-invalidation if the only
get magic on the string is taint.

This stops code like the following going quadratic under -T:

    $_ = "... long tainted utf8 string ...";
    while ( /..../g) {
        my $p = pos(); # calculating pos() goes quadratic
    }

7 years agoS_do_op_dump_bar(): fix some weird indentation
David Mitchell [Fri, 20 Jan 2017 12:40:31 +0000 (12:40 +0000)]
S_do_op_dump_bar(): fix some weird indentation

whitespace-only change

7 years agorevamp the op_dump() output format
David Mitchell [Tue, 17 Jan 2017 17:40:32 +0000 (17:40 +0000)]
revamp the op_dump() output format

This is mainly used for low-level debugging these days (higher level stuff
like Concise having since been created), e.g. calling op_dump() from
within a debugger or running with -Dx. Make it display more info, and use
an ACSII-art tree to show the structure.

The main changes are:

* added 'ASCII-art' tree structure;
* it now displays each op's class and address;
* for op_next etc links, it now displays the type and address of the
  linked-to op in addition to its sequence number;
* the following ops now have their op_other field displayed, like op_and
  etc already do:
    andassign argdefelem dor dorassign entergiven entertry enterwhen
    once orassign regcomp substcont
* enteriter now has its op_redo etc fields displayed, like enterloop
  already does;

Here is a sample before and after of perl -Dx -e'($x+$y) * $z'

Before:

    {
    1   TYPE = leave  ===> NULL
        TARG = 1
        FLAGS = (VOID,KIDS,PARENS,SLABBED)
        PRIVATE = (REFC)
        REFCNT = 1
        {
    2       TYPE = enter  ===> 3
            FLAGS = (UNKNOWN,SLABBED,MORESIB)
        }
        {
    3       TYPE = nextstate  ===> 4
            FLAGS = (VOID,SLABBED,MORESIB)
            LINE = 1
            PACKAGE = "main"
            SEQ = 4294967246
        }
        {
    5       TYPE = multiply  ===> 1
            TARG = 5
            FLAGS = (VOID,KIDS,SLABBED)
            PRIVATE = (0x2)
            {
    6           TYPE = add  ===> 7
                TARG = 3
                FLAGS = (SCALAR,KIDS,PARENS,SLABBED,MORESIB)
                PRIVATE = (0x2)
                {
    8               TYPE = null  ===> (9)
                      (was rv2sv)
                    FLAGS = (SCALAR,KIDS,SLABBED,MORESIB)
                    PRIVATE = (0x1)
                    {
    4                   TYPE = gvsv  ===> 9
                        FLAGS = (SCALAR,SLABBED)
                        PADIX = 1
                    }
                }
                {
    10              TYPE = null  ===> (6)
                      (was rv2sv)
                    FLAGS = (SCALAR,KIDS,SLABBED)
                    PRIVATE = (0x1)
                    {
    9                   TYPE = gvsv  ===> 6
                        FLAGS = (SCALAR,SLABBED)
                        PADIX = 2
                    }
                }
            }
            {
    11          TYPE = null  ===> (5)
                  (was rv2sv)
                FLAGS = (SCALAR,KIDS,SLABBED)
                PRIVATE = (0x1)
                {
    7               TYPE = gvsv  ===> 5
                    FLAGS = (SCALAR,SLABBED)
                    PADIX = 4
                }
            }
        }
    }

After:

    1    leave LISTOP(0xdecb38) ===> [0x0]
         TARG = 1
         FLAGS = (VOID,KIDS,PARENS,SLABBED)
         PRIVATE = (REFC)
         REFCNT = 1
         |
    2    +--enter OP(0xdecb00) ===> 3 [nextstate 0xdecb80]
         |   FLAGS = (UNKNOWN,SLABBED,MORESIB)
         |
    3    +--nextstate COP(0xdecb80) ===> 4 [gvsv 0xdeb3b8]
         |   FLAGS = (VOID,SLABBED,MORESIB)
         |   LINE = 1
         |   PACKAGE = "main"
         |   SEQ = 4294967246
         |
    5    +--multiply BINOP(0xdecbe0) ===> 1 [leave 0xdecb38]
             TARG = 5
             FLAGS = (VOID,KIDS,SLABBED)
             PRIVATE = (0x2)
             |
    6        +--add BINOP(0xdeb2b0) ===> 7 [gvsv 0xdeb270]
             |   TARG = 3
             |   FLAGS = (SCALAR,KIDS,PARENS,SLABBED,MORESIB)
             |   PRIVATE = (0x2)
             |   |
    8        |   +--null (ex-rv2sv) UNOP(0xdeb378) ===> 9 [gvsv 0xdeb338]
             |   |   FLAGS = (SCALAR,KIDS,SLABBED,MORESIB)
             |   |   PRIVATE = (0x1)
             |   |   |
    4        |   |   +--gvsv PADOP(0xdeb3b8) ===> 9 [gvsv 0xdeb338]
             |   |       FLAGS = (SCALAR,SLABBED)
             |   |       PADIX = 1
             |   |
    10       |   +--null (ex-rv2sv) UNOP(0xdeb2f8) ===> 6 [add 0xdeb2b0]
             |       FLAGS = (SCALAR,KIDS,SLABBED)
             |       PRIVATE = (0x1)
             |       |
    9        |       +--gvsv PADOP(0xdeb338) ===> 6 [add 0xdeb2b0]
             |           FLAGS = (SCALAR,SLABBED)
             |           PADIX = 2
             |
    11       +--null (ex-rv2sv) UNOP(0xdeb220) ===> 5 [multiply 0xdecbe0]
                 FLAGS = (SCALAR,KIDS,SLABBED)
                 PRIVATE = (0x1)
                 |
    7            +--gvsv PADOP(0xdeb270) ===> 5 [multiply 0xdecbe0]
                     FLAGS = (SCALAR,SLABBED)
                     PADIX = 4

7 years agoadd Perl_op_class(o) API function
David Mitchell [Wed, 18 Jan 2017 12:35:50 +0000 (12:35 +0000)]
add Perl_op_class(o) API function

Given an op, this function determines what type of struct it has been
allocated as. Returns one of the OPclass enums, such as OPclass_LISTOP.

Originally this was a static function in B.xs, but it has wider
applicability; indeed several XS modules on CPAN have cut and pasted it.

It adds the OPclass enum to op.h. In B.xs there was a similar enum, but
with names like OPc_LISTOP. I've renamed them to OPclass_LISTOP etc. so as
not to clash with the cut+paste code already on CPAN.

7 years agoUpdate Module::CoreList for 5.25.10
Abigail [Fri, 20 Jan 2017 16:37:58 +0000 (17:37 +0100)]
Update Module::CoreList for 5.25.10

7 years agoBump the perl version in various places for 5.25.10
Abigail [Fri, 20 Jan 2017 16:31:32 +0000 (17:31 +0100)]
Bump the perl version in various places for 5.25.10

7 years agoNew perldelta for 5.25.10
Abigail [Fri, 20 Jan 2017 16:19:00 +0000 (17:19 +0100)]
New perldelta for 5.25.10

7 years agoTick!
Abigail [Fri, 20 Jan 2017 16:07:55 +0000 (17:07 +0100)]
Tick!

7 years agoEpigraph for 5.25.9
Abigail [Fri, 20 Jan 2017 16:06:54 +0000 (17:06 +0100)]
Epigraph for 5.25.9

7 years agoLet's be consistent v5.25.9
Abigail [Fri, 20 Jan 2017 03:07:32 +0000 (04:07 +0100)]
Let's be consistent

7 years agoAdd perlhist entry for the 5.25.9 release
Abigail [Fri, 20 Jan 2017 03:06:13 +0000 (04:06 +0100)]
Add perlhist entry for the 5.25.9 release

7 years agoAcknowledgements for perldelta
Abigail [Fri, 20 Jan 2017 03:04:09 +0000 (04:04 +0100)]
Acknowledgements for perldelta

7 years agoMore work on perldelta:
Abigail [Fri, 20 Jan 2017 02:48:55 +0000 (03:48 +0100)]
More work on perldelta:

* Finished the update modules.
* Made podchecker -warning -warnings happy.
* Fixed some typos.

7 years agoFix typo in the name the .pm file is generated from.
Abigail [Fri, 20 Jan 2017 02:32:26 +0000 (03:32 +0100)]
Fix typo in the name the .pm file is generated from.

7 years agoUpdate Module::CoreList for 5.25.9
Abigail [Fri, 20 Jan 2017 01:46:55 +0000 (02:46 +0100)]
Update Module::CoreList for 5.25.9

7 years agoMore perldelta entries
Abigail [Fri, 20 Jan 2017 01:15:00 +0000 (02:15 +0100)]
More perldelta entries

7 years agoWork on perldelta
Abigail [Fri, 20 Jan 2017 00:50:32 +0000 (01:50 +0100)]
Work on perldelta

7 years agoMake an entry for the deprecation of certain string delimiters.
Abigail [Thu, 19 Jan 2017 18:40:51 +0000 (19:40 +0100)]
Make an entry for the deprecation of certain string delimiters.

This mostly copies the entry in perldiag to perldeprecation. When 5.30
arrives, the entry in perldiag can dissappear, and the wording in
perldeprecation needs to change -- as the deprecation will no longer
be in the future.

7 years agoTypo fix: one of the =head2's should have been a =head3
Abigail [Thu, 19 Jan 2017 18:37:10 +0000 (19:37 +0100)]
Typo fix: one of the =head2's should have been a =head3

7 years agoutil.c: Allow C backtrace to compile under threads
Karl Williamson [Thu, 19 Jan 2017 20:54:48 +0000 (13:54 -0700)]
util.c: Allow C backtrace to compile under threads

This would not compile due to passing a thread context parameter to
Safefree, which isn't expecting it.

No claim is made by this commit that it works well under threads.  No
claim is made in the documentation to that effect either.

7 years agotoke.c: Refactor part of tr// handling, mostly for EBCDIC
Karl Williamson [Thu, 19 Jan 2017 04:48:51 +0000 (21:48 -0700)]
toke.c: Refactor part of tr// handling, mostly for EBCDIC

Commit af9be36c89322d2469f27b3c98c20c32044697fe changed toke.c to count
the number of UTF-8 variant characters seen in a string so far.  If the
count is 0 when the string has to be upgraded to UTF-8, then only a flag
has to be flipped, saving reparse time.  Incrementing this count wasn't
getting done during the expansion of ranges like A-Z under tr///.  This
currently doesn't matter for ASCII platforms, as the count is currently
treated as a boolen, and it was getting set if a range endpoint is
variant.  On EBCDIC platforms a range may contain variants even if both
endpoints are not.  For example \x00-\xFF.  (\xFF is a control that is
an invariant).  This led to a lot of noise on an EBCDIC smoke, but no
actual tests failing.

I want to keep it as a count so that in the future, things could be
changed so that count can be used to know how big to grow a string when
it is converted to UTF-8, without having to re-parse it as we do now.
It turns out that we need to have this count anyway in the tr/// code as
that grows the string to account for the expansion, and needs to know
how many variants there are in order to do so if the string already is
in UTF-8.  So refactoring that code slightly allows the count to served
double-duty, for the grow if it is already UTF-8, and how much to grow
if it isn't UTF-8.  And it fixes the noise problem on EBCDIC

7 years agotoke.c: Avoid work if tr/a-b/foo/
Karl Williamson [Wed, 18 Jan 2017 22:36:49 +0000 (15:36 -0700)]
toke.c: Avoid work if tr/a-b/foo/

A two-element range here is already fully set up, and no need to do
anything.

7 years agotoke.c: Avoid work for tr/a-a/.../
Karl Williamson [Wed, 18 Jan 2017 21:21:02 +0000 (14:21 -0700)]
toke.c: Avoid work for tr/a-a/.../

A single element range can skip a bunch of work.

7 years agotoke.c: Save a branch
Karl Williamson [Thu, 19 Jan 2017 20:52:57 +0000 (13:52 -0700)]
toke.c: Save a branch

By ordering these sequential tests properly, a branch in the mainline
can be saved.

7 years agotoke.c: Add, clarify some comments, white-space
Karl Williamson [Wed, 18 Jan 2017 21:19:37 +0000 (14:19 -0700)]
toke.c: Add, clarify some comments, white-space

7 years agoperlebcdic: Rmv obsolete text about 'use encoding'
Karl Williamson [Tue, 17 Jan 2017 00:52:55 +0000 (17:52 -0700)]
perlebcdic: Rmv obsolete text about 'use encoding'

7 years agoperlop: Remove obsolete text
Karl Williamson [Tue, 17 Jan 2017 00:51:20 +0000 (17:51 -0700)]
perlop: Remove obsolete text

'use encoding' no longer works.  Don't say it does.

7 years agoFix bug with a digit range under re 'strict'
Karl Williamson [Fri, 13 Jan 2017 20:53:17 +0000 (13:53 -0700)]
Fix bug with a digit range under re 'strict'

"use re 'strict" is supposed to warn if a range whose start and end
points are digits aren't from the same group of 10.  For example, if you
mix Bengali and Thai digits.  It wasn't working properly for 5 groups of
mathematical digits starting at U+1D7E.  This commit fixes that, and
refactors the code to bail out as soon as it discovers that no warning
is warranted, instead of doing unnecessary work.

7 years agopp_ctl.c: false/true --> FALSE/TRUE
Craig A. Berry [Thu, 19 Jan 2017 16:10:36 +0000 (10:10 -0600)]
pp_ctl.c: false/true --> FALSE/TRUE

The win32 build died with the lower case versions.

Follow-up to 86191aed6f092273.

7 years ago[perl #129377] don't read past start of string for unmatched backref
Hugo van der Sanden [Wed, 5 Oct 2016 11:56:05 +0000 (12:56 +0100)]
[perl #129377] don't read past start of string for unmatched backref

We can have (start, end) == (0, -1) for an unmatched backref, we must
check for that.

7 years ago(perl #129342) test for buffer overflow
Tony Cook [Tue, 17 Jan 2017 00:52:53 +0000 (11:52 +1100)]
(perl #129342) test for buffer overflow

7 years ago[perl #129342] ensure range-start is set after error in tr///
Hugo van der Sanden [Wed, 5 Oct 2016 13:53:27 +0000 (14:53 +0100)]
[perl #129342] ensure range-start is set after error in tr///

A parse error due to invalid octal or hex escape in the range of a
transliteration must still ensure some kind of start and end values
are captured, since we don't stop on the first such error. Failure
to do so can cause invalid reads after "Here we have parsed a range".

7 years agoperldelta for 86191aed6f09
Tony Cook [Thu, 19 Jan 2017 06:35:49 +0000 (17:35 +1100)]
perldelta for 86191aed6f09

7 years ago(perl #129125) copy form data if it might be freed
Tony Cook [Thu, 19 Jan 2017 05:28:03 +0000 (16:28 +1100)]
(perl #129125) copy form data if it might be freed

If the format SV also appeared as an argument, and the FF_CHOP
operator modified that argument, the magic and hence the compiled
format would be freed, and the next iteration of the processing
the compiled format would read freed memory.

Unlike my original patch this copies the formsv too, since
that is also stored in the magic, and is needed for presenting
literal text from the format.

7 years ago(perl #126228) partly revert 8cc95fdb and fix a3c8358c origin/tonyc/126228-dxsub_sysx
Tony Cook [Mon, 16 May 2016 06:51:51 +0000 (16:51 +1000)]
(perl #126228) partly revert 8cc95fdb and fix a3c8358c

a3c8358c changed:

-#define dXSUB_SYS int dummy
+#define dXSUB_SYS

which made dXSUB_SYS into not-a-declaration, this apparently broke
something, since 8cc95fdb then went through all the definitions of
dXSUB_SYS, made each of them into not-a-declaration and then
ensured ExtUtilis::Miniperl emitted dXSUB_SYS in a place where it
didn't matter whether it was a declaration or a statement.

When these changes were made perl.h didn't have dNOOP, but now we
do, so we can make dXSUB_SYS a declaration again, as its name
implies.

Based on a patch originally created by Daniel Dragan (bulk88).

7 years agoAPItest/t/handy.t: Skip some tests on EBCDIC
Karl Williamson [Wed, 18 Jan 2017 18:05:47 +0000 (11:05 -0700)]
APItest/t/handy.t: Skip some tests on EBCDIC

The skipped tests are for malformed input for the various isCNTRL
functions.  Perl does not go out of its way to test for malformedness in
the these, only making sure they are well-formed if that is necessary
for the correct operation of the function.  Since all controls in EBCDIC
are represented by a single byte, and you can't malform a single byte,
all the malformedness control tests will not detect malformedness on
EBCDIC platforms, so skip them.

7 years agoAPItest/t/handy.t: Use more mnemonic variable names
Karl Williamson [Tue, 10 Jan 2017 16:46:23 +0000 (09:46 -0700)]
APItest/t/handy.t: Use more mnemonic variable names

The previous commit might not have been necessary if these had been more
mnemonic in the first place.

7 years agoRemove obsolete (PL_)statcache mentions in comments
Dagfinn Ilmari Mannsåker [Wed, 18 Jan 2017 12:39:28 +0000 (12:39 +0000)]
Remove obsolete (PL_)statcache mentions in comments

cando() has not used PL_statcache since Perl 3 (commit a687059cbaf)

7 years agoAvoid deprecation message.
Abigail [Tue, 17 Jan 2017 21:54:08 +0000 (22:54 +0100)]
Avoid deprecation message.

File::Glob::glob is deprecated. So, if we test it, we should avoid
the warning.

7 years agoAvoid triggering a deprecation warnings.
Abigail [Tue, 17 Jan 2017 21:21:29 +0000 (22:21 +0100)]
Avoid triggering a deprecation warnings.

The offending line is put in a block with "no warnings 'deprecated';".
The line can go after 5.26, as it'll be fatal in 5.28.

7 years agoAvoid deprecation warning.
Abigail [Tue, 17 Jan 2017 21:16:02 +0000 (22:16 +0100)]
Avoid deprecation warning.

Use of an unqualified dump() now gives a deprecation warning. So, change
dump into CORE::dump in the tests.

7 years agoadd S_process_optree() function to op.c
David Mitchell [Sat, 14 Jan 2017 16:02:46 +0000 (16:02 +0000)]
add S_process_optree() function to op.c

Extract into a new static function, S_process_optree(), some of the common
code that calls rpeep(), finalize_optree() etc in the various
newSUB()-style functions.

There should be no functional changes, except that for formats, pad_tidy()
is now called *after* optimisation. This matches what already happens for
normals subs, and can possibly be regarded as a bug fix - although I can't
think of anything it actually fixes.

There are probably more things that could be consolidated into this
function, but because the details vary amongst the various call sites,
I've left them alone for now.

7 years agoperldelta for 254707b
James E Keenan [Tue, 17 Jan 2017 13:42:28 +0000 (08:42 -0500)]
perldelta for 254707b

7 years agoUpdates CPAN.pm to ANDK/CPAN-2.16-TRIAL2.tar.gz
Andreas Koenig [Tue, 17 Jan 2017 08:27:49 +0000 (09:27 +0100)]
Updates CPAN.pm to ANDK/CPAN-2.16-TRIAL2.tar.gz

7 years agodavem's perldelta entries for 5.25.9 so far
David Mitchell [Tue, 17 Jan 2017 11:55:58 +0000 (11:55 +0000)]
davem's perldelta entries for 5.25.9 so far

7 years ago(perl #129149) fix the test so skip has a SKIP: to work with origin/tonyc/129149-fix-skip
Tony Cook [Tue, 17 Jan 2017 04:36:31 +0000 (15:36 +1100)]
(perl #129149) fix the test so skip has a SKIP: to work with

Thanks to bulk88 for pointing this out.

7 years agowarn at most once per literal about misplaced _
Zefram [Tue, 17 Jan 2017 00:04:00 +0000 (00:04 +0000)]
warn at most once per literal about misplaced _

Fixes [perl #70878].

7 years agoperldelta for bf4a926a2937
Tony Cook [Mon, 16 Jan 2017 23:56:33 +0000 (10:56 +1100)]
perldelta for bf4a926a2937

7 years ago(perl #129149) avoid a heap buffer overflow with pack "W"...
Tony Cook [Wed, 7 Sep 2016 06:51:39 +0000 (16:51 +1000)]
(perl #129149) avoid a heap buffer overflow with pack "W"...

7 years agoperldelta for 02c161ef974f
Tony Cook [Mon, 16 Jan 2017 22:27:15 +0000 (09:27 +1100)]
perldelta for 02c161ef974f

7 years agoperldelta: Fix typo
Karl Williamson [Mon, 16 Jan 2017 20:05:14 +0000 (13:05 -0700)]
perldelta: Fix typo

7 years agoMention changed deprecation messages in perldelta.
Abigail [Mon, 16 Jan 2017 18:10:04 +0000 (19:10 +0100)]
Mention changed deprecation messages in perldelta.

7 years agoThere's an objection to fatalizing jumping into a construct.
Abigail [Mon, 16 Jan 2017 10:44:30 +0000 (11:44 +0100)]
There's an objection to fatalizing jumping into a construct.

This reverts commit 84b32f52b10f9912b40ef378cd0b01f4aff80630.
This reverts commit d30393aaade31b605724846a30a10dd1e96cd181.

We need more debate on this one; either we should undeprecate it,
or settle on an end-of-life version.

7 years agoUse of $* and $# will be fatal in 5.30.
Abigail [Sun, 15 Jan 2017 21:23:47 +0000 (22:23 +0100)]
Use of $* and $# will be fatal in 5.30.

Initially, the plan was to just drop the deprecation message of $* and $#,
letting them be the magicless punctuation variables they are now. However,
we decided to make their use fatal, so we can use them in a future version
of Perl.

7 years agoRevert "Remove deprecation warnings related to $* and $#."
Abigail [Sun, 15 Jan 2017 12:23:34 +0000 (13:23 +0100)]
Revert "Remove deprecation warnings related to $* and $#."

This reverts commit e9b5346b919b4f4cc0096af4644cb0d48d64e14c.

We've decided that instead of leaving $* and $# as usuable, magic-free
variables, we instead make it fatal to use them. Therefore, we restore
the warnings their use gives, and in a subsequent commit, we fix the
warning to indicate the version where their use becomes fatal.

7 years agoRevert "Fix mentioning of C<$#>."
Abigail [Sun, 15 Jan 2017 12:23:12 +0000 (13:23 +0100)]
Revert "Fix mentioning of C<$#>."

This reverts commit b9a643355baa0bd9bc9b4e9cbaf51c8727589bfa.

7 years agoMention $! vs $^E in pod/perlport.pod
Abigail [Sat, 14 Jan 2017 21:34:30 +0000 (22:34 +0100)]
Mention $! vs $^E in pod/perlport.pod

Since 5.24, it has been deprecated to check $! after a Winsock function;
one such use $^E instead. However, since we do not have a deprecation
warning for this, we cannot set an EOL version of this deprecation.
As such, it just gets mentioned in perlport, and this will be the
only deprecation without an EOL version.

7 years agoUpdate an old email address of mine
Abigail [Sat, 14 Jan 2017 21:28:50 +0000 (22:28 +0100)]
Update an old email address of mine

7 years agoString bitwise operators will not accept code points > 0xFF in 5.28
Abigail [Sat, 14 Jan 2017 21:13:54 +0000 (22:13 +0100)]
String bitwise operators will not accept code points > 0xFF in 5.28

7 years agoReading/writing bytes from :utf8 handles will be fatal in 5.30
Abigail [Sat, 14 Jan 2017 20:44:56 +0000 (21:44 +0100)]
Reading/writing bytes from :utf8 handles will be fatal in 5.30

7 years agoDeprecating the modifyable variables in constants by 5.32.
Abigail [Sat, 14 Jan 2017 17:25:48 +0000 (18:25 +0100)]
Deprecating the modifyable variables in constants by 5.32.

It was already deprecated, but we're now adding a version number.

7 years agoMake it fatal to pass malformed UTF-8.
Abigail [Sat, 14 Jan 2017 03:01:39 +0000 (04:01 +0100)]
Make it fatal to pass malformed UTF-8.

Due to a bug in either Perl, or in some XS-code, it's possible
for a string which is supposed to be in UTF-8 format to not be
properly encoded. If you try to find out its type (digit,
punctuation) perl will now croak.

This behaviour was deprecated in Perl 5.18.

7 years agomy() in a false conditional will be fatal in Perl 5.30
Abigail [Sat, 14 Jan 2017 01:30:49 +0000 (02:30 +0100)]
my() in a false conditional will be fatal in Perl 5.30

7 years agoDeprecation of an unqualified dump() to mean CORE::dump().
Abigail [Fri, 13 Jan 2017 21:36:47 +0000 (22:36 +0100)]
Deprecation of an unqualified dump() to mean CORE::dump().

This will no longer be allowed in 5.30.

7 years agoDeprecating the use of C<< \cI<X> >> to specify a printable character.
Abigail [Fri, 13 Jan 2017 19:29:58 +0000 (20:29 +0100)]
Deprecating the use of C<< \cI<X> >> to specify a printable character.

Starting in 5.14, we deprecated the use of "\cI<X>" when this
results in a printable character. For instance, "\c:" is just
a fancy way of writing "z". Starting in 5.28, this will be a
fatal error.

This also includes certain usage in regular expressions with the
experimental (?[ ]) construct, or when "use re 'strict'" is in
effect (also experimental).

7 years agoB::OP::terse will go away in Perl 5.28.
Abigail [Thu, 24 Nov 2016 14:35:43 +0000 (15:35 +0100)]
B::OP::terse will go away in Perl 5.28.

Adjusted the deprecation message, and bumped the version of B::Terse.

7 years agoNo longer mention some uses of $SIG {__DIE__} are deprecated.
Abigail [Thu, 24 Nov 2016 12:57:23 +0000 (13:57 +0100)]
No longer mention some uses of $SIG {__DIE__} are deprecated.

The C<$SIG{__DIE__}> hook is called even inside an C<eval()>. It was
never intended to happen this way, but an implementation glitch made
this possible. This used to be deprecated, as it allowed strange action
at a distance like rewriting a pending exception in C<$@>. Plans to
rectify this have been scrapped, as users found that rewriting a
pending exception is actually a useful feature, and not a bug.

7 years agoRemove utils/c2ph and utils/pstruct
Abigail [Thu, 24 Nov 2016 12:22:10 +0000 (13:22 +0100)]
Remove utils/c2ph and utils/pstruct

These programs are the same, just behave differently depending on
under which name you call it.

This is a very old script, originally dating from the perl3 era.
It has been deprecated in favour of h2xs for a long time.

In Perl 5.26, these utilities will no longer be available.

7 years agoDon't recognize the --libpods option in Pod::Html
Abigail [Thu, 24 Nov 2016 11:40:04 +0000 (12:40 +0100)]
Don't recognize the --libpods option in Pod::Html

Since Perl 5.18, the --libpods option has been recognized, but
did not do anything other than issue a deprecation warnings.
As of now, using the --libpods option creates an error.

The version number of Pod::Html has bumped to 1.2202.

7 years agoRemove unneeded entry from pod/perldiag.pod
Abigail [Thu, 24 Nov 2016 00:11:01 +0000 (01:11 +0100)]
Remove unneeded entry from pod/perldiag.pod

It had an entry 'Use of %s is deprecated', matching the warnings
the deprecation() macro in handy.h could generate.

Most of these warning had already their own entries in perldiag.pod,
and the ones which did not, now do. Furthermore, the format of the
warnings has changed, as we now have a version in which the construct
disappears from Perl in the message.

7 years agoUse of inherited AUTOLOAD for non-methods will be fatal in 5.28.
Abigail [Wed, 23 Nov 2016 23:50:09 +0000 (00:50 +0100)]
Use of inherited AUTOLOAD for non-methods will be fatal in 5.28.

Which will be 21 years after it was deprecated (5.004).

7 years agoRemove the deprecate() macro from handy.h.
Abigail [Wed, 23 Nov 2016 22:03:13 +0000 (23:03 +0100)]
Remove the deprecate() macro from handy.h.

Since we now require each deprecation message to come with a
version in which the feature will disappear, and we have reworked
the existing uses of this macro, there doesn't seem to be a need
for this one anymore.

7 years agoJumping into constructs will be fatal in 5.28.
Abigail [Wed, 23 Nov 2016 21:52:36 +0000 (22:52 +0100)]
Jumping into constructs will be fatal in 5.28.

7 years agoUse of comma-less variable lists is deprecated.
Abigail [Wed, 23 Nov 2016 18:38:15 +0000 (19:38 +0100)]
Use of comma-less variable lists is deprecated.

It will be fatal by Perl 5.28.

7 years agoUse of Unicode code points exceeding IV_MAX will be fatal in Perl 5.28
Abigail [Wed, 23 Nov 2016 18:06:51 +0000 (19:06 +0100)]
Use of Unicode code points exceeding IV_MAX will be fatal in Perl 5.28

Changed the warning to reflect the deadline of this deprecation.
Update tests, perldiag.pod and added a section to perldeprecation.pod.

7 years agoUnescaped left braces in regular expressions will be fatal in 5.30.
Abigail [Mon, 21 Nov 2016 21:38:32 +0000 (22:38 +0100)]
Unescaped left braces in regular expressions will be fatal in 5.30.

In 5.26, some uses of unescaped left braces were made fatal; they have
given a deprecation warning since 5.20. Due to an oversight, some cases
were missed, and did not give a deprecation warning. They do now.

This patch changes said deprecation warning to mention the Perl version
in which the use of an unescaped left brace will be fatal (5.30).

The patch also cleans up some unnecessary quotes inside a C<> construct
in the discussion of this warning in perldiag.pod.

7 years agoBare heredocs will be fatal in 5.28.
Abigail [Fri, 18 Nov 2016 17:33:19 +0000 (18:33 +0100)]
Bare heredocs will be fatal in 5.28.

Heredocs without a terminator after the << have been deprecated
since 5.000. After more than 2 decades, it's time to retire this
construct. They will be fatal in 5.28.

7 years agoUse of \N{} will be fatal in 5.28.
Abigail [Fri, 18 Nov 2016 16:41:44 +0000 (17:41 +0100)]
Use of \N{} will be fatal in 5.28.

Use of \N{} in a double quoted context, with nothing between the
braces, was deprecated in 5.24, and it will be a fatal error in 5.28.

7 years agoReformat overlong comment.
Abigail [Fri, 18 Nov 2016 13:56:56 +0000 (14:56 +0100)]
Reformat overlong comment.

pod/perlhack.pod says to try hard not to exceed 79 columns.

7 years ago$/ = \-1 will be fatal in Perl 5.28.
Abigail [Fri, 18 Nov 2016 13:52:18 +0000 (14:52 +0100)]
$/ = \-1 will be fatal in Perl 5.28.

Setting $/ to a reference of a non-positive integer has been deprecated
since 5.20, in which it was special cased to act like you had set to
$/ to undef.

In Perl 5.28, setting $/ to a reference to a non-positive integer will
be a fatal error.

7 years agoOpening a file and dir using the same symbol will be fatal in 5.28.
Abigail [Thu, 17 Nov 2016 18:34:37 +0000 (19:34 +0100)]
Opening a file and dir using the same symbol will be fatal in 5.28.

Perl 5.10 deprecated using the same symbol to open both a filehandle
and a dirhandle, as this can lead to confusing code.

In Pelr 5.28, this will become a fatal error. This patch changes the
warning to reflect this.

7 years agoFix mentioning of C<$#>.
Abigail [Wed, 16 Nov 2016 23:38:38 +0000 (00:38 +0100)]
Fix mentioning of C<$#>.

A copy and past left a C<$*> instead of a C<$#>.

Pointed out by douglas steinwand.