11 days agoTests for declared_refs err/warn messages sprout/mywack
Father Chrysostomos [Mon, 30 May 2016 03:11:08 +0000]
Tests for declared_refs err/warn messages

11 days agofixup for ‘Allow my \$a’
Father Chrysostomos [Mon, 30 May 2016 01:40:07 +0000]
fixup for ‘Allow my \$a’

11 days agoperldiag entries for declared_refs
Father Chrysostomos [Sun, 29 May 2016 23:02:53 +0000]
perldiag entries for declared_refs

11 days agoClearer declared_refs warning msg
Father Chrysostomos [Sun, 29 May 2016 21:32:11 +0000]
Clearer declared_refs warning msg

11 days agoUpdate docs for declared_refs
Father Chrysostomos [Sun, 29 May 2016 21:29:28 +0000]
Update docs for declared_refs

2 weeks agofixup for warnings category
Father Chrysostomos [Thu, 26 May 2016 04:44:48 +0000]
fixup for warnings category

2 weeks agoMake my\ experimental
Father Chrysostomos [Mon, 23 May 2016 06:45:45 +0000]
Make my\ experimental

2 weeks agoAdd declared_refs feature feature
Father Chrysostomos [Mon, 23 May 2016 06:40:27 +0000]
Add declared_refs feature feature

2 weeks agoAdd experimental::declared_refs warn categ
Father Chrysostomos [Mon, 23 May 2016 06:39:44 +0000]
Add experimental::declared_refs warn categ

2 weeks agoAllow my \$a
Father Chrysostomos [Sat, 21 May 2016 05:28:31 +0000]
Allow my \$a

This applies to ‘my’, ‘our’, ‘state’ and ‘local’, and both to single
variable and lists of variables, in all their variations:

my \$a        # equivalent to \my $a
my \($a,$b)   # equivalent to \my($a, $b)
my (\($a,$b)) # same
my (\$a, $b)  # equivalent to (\my $a, $b)

2 weeks agoperldiag: Rewrite a mangled sentence
Father Chrysostomos [Sun, 22 May 2016 01:33:38 +0000]
perldiag: Rewrite a mangled sentence

2 weeks agoSort perldiag
Father Chrysostomos [Sun, 22 May 2016 01:31:26 +0000]
Sort perldiag

2 weeks agorecognize and reject version control conflict markers (RT #127993)
Lukas Mai [Sat, 21 May 2016 17:12:21 +0000]
recognize and reject version control conflict markers (RT #127993)

2 weeks agoFix STRESS_REALLOC after 3caf0269d
Father Chrysostomos [Sat, 21 May 2016 18:36:56 +0000]
Fix STRESS_REALLOC after 3caf0269d

This commit:

commit 3caf0269dd4c609b8c2bc22b54598c642ba63ed8
Author: David Mitchell <[email protected]>
Date:   Sun Dec 27 14:07:02 2015 +0000

    offset PL_savestack_max by SS_MAXPUSH

stopped savestack_grow from adding 4 to the allocated amount, which
broke builds with -Accflags=-DSTRESS_REALLOC.

savestack_grow accepts no arguments.  The callers have no way to
tell it how much to allocate; they just assume that it will allocate
enough.  By default, in increases the stack size by 50%, and the stack
starts out at 128 elements, so everything works fine.

Under STRESS_REALLOC, introduced by commit 2ce36478e5 in ’98, the
savestack started out at 1 (later, SS_MAXPUSH; as of 3caf0269d,
PL_savestack_max is 0 initially, though the actual stack size is
SS_MAXPUSH).  And the stack-growing functions in scope.h that default
to 50% instead add 1 element to the stack.

Anything that calls savestack_grow assumes it will allocate enough for
the savestack elements pushed.  The most elements ever pushed at once
is 4, so 2ce36478e5 added a +4 to the size in savestack_grow.

3caf0269d removed that +4, so the stack is only incremented by 1, and
this assertion at the end of scope.h:SS_ADD_END failed:

    if (UNLIKELY(ix > PL_savestack_max)) savestack_grow();      \
    assert(PL_savestack_ix <= PL_savestack_max);

3caf0269d was right in removing the +4, since it is unnecessary for
normal builds.  For STRESS_REALLOC, which is designed to grow stacks
as little as possible, we were allocating one more element than neces-
sary.  So this commit just explicitly grows the stack by SS_MAXPUSH
(the new name for 4) in savestack_grow if STRESS_REALLOC is defined.

2 weeks agoUpdate for the version thats on the CPAN
Chris 'BinGOs' Williams [Sat, 21 May 2016 15:46:12 +0000]
Update for the version thats on the CPAN

2 weeks agoSimplify parser’s handling of my/local
Father Chrysostomos [Sat, 21 May 2016 12:42:55 +0000]
Simplify parser’s handling of my/local

In Perl 5.000, the same token, LOCAL, was used for both ‘my’ and
‘local’, with a token value, passed to localize() as a second argu-
ment, to distinguish between them.

perl-5.003_07-9-g55497cf (inseparable changes from patch from
perl5.003_07 to perl5.003_08), for no apparent reason, split them into
two tokens, removing the token values and assigning values in perly.y
via $$ = 0 and $$ = 1.  They still ultimately made their way through
the same grammar rule, as there was only one localize() call in
perly.y.  The code still made sense.

perl-5.005_02-1816-g09bef84 (sub : attrlist) changed things, such that
the tokens are separate *and* they get separate token values assigned
to them.  ‘local’ and ‘my’ no longer follow the same grammar rules
in perly.y, so there are separate localize() calls for the different
token types.  Hence, the use of a token value to distinguish them does
not make sense.  It just makes this more complicated that necessary.

So this commit removes the token values.  Since the two token types
follow different paths through perly.y and have separate localize()
calls, we can hard-code the argument to localize() there, instead of
passing the value through from toke.c as a token value.

This does shrink toke.o slightly (for me it went from 876040 to
876000), and it makes this conceptually clearer.

2 weeks ago[perl #128204] Fix crash with @a &.= etc.
Father Chrysostomos [Sat, 21 May 2016 04:55:40 +0000]
[perl #128204] Fix crash with @a &.= etc.

The new bitwise operators in their assignment forms were not correctly
catching things like arrays on the lhs at compile time.

At run time, they would either crash or croak with ‘Can’t coerce
ARRAY...’.

This commit puts in the correct compile-time check, simply by flagging
these as scalar modifiers.

2 weeks agoAnother op description correction: & -> &.
Father Chrysostomos [Sat, 21 May 2016 03:32:48 +0000]
Another op description correction: & -> &.

The string bitwise ops have dots in them, which should be included
in the op descriptions.

2 weeks agoCorrect ‘bitiwse’ in two op descriptions
Father Chrysostomos [Sat, 21 May 2016 03:24:50 +0000]
Correct ‘bitiwse’ in two op descriptions

Oops!

2 weeks ago[Merge] &CORE::foo() calls with keys, push, etc.
Father Chrysostomos [Sat, 21 May 2016 05:14:08 +0000]
[Merge] &CORE::foo() calls with keys, push, etc.

The hash and array functions, keys, each, values, push, pop, shift,
unshift and splice, can now be called with ampersand syntax and via
reference.

2 weeks agoUpdate CORE.pod to reflect &CORE::keys() etc.
Father Chrysostomos [Sat, 21 May 2016 04:57:32 +0000]
Update CORE.pod to reflect &CORE::keys() etc.

2 weeks agoAllow assignment to &CORE::keys()
Father Chrysostomos [Sat, 21 May 2016 00:50:23 +0000]
Allow assignment to &CORE::keys()

2 weeks agoAllow &CORE::foo() with array functions
Father Chrysostomos [Tue, 17 May 2016 07:27:30 +0000]
Allow &CORE::foo() with array functions

2 weeks agoperldiag: Document unknown OA_* panic
Father Chrysostomos [Tue, 17 May 2016 06:32:06 +0000]
perldiag: Document unknown OA_* panic

2 weeks agof
Father Chrysostomos [Sat, 21 May 2016 05:13:15 +0000]
f

2 weeks agoAllow &CORE::foo() with hash functions
Father Chrysostomos [Tue, 17 May 2016 06:10:17 +0000]
Allow &CORE::foo() with hash functions

&CORE::keys does not yet work as an lvalue.  (I’m not sure how to make
that work.)

2 weeks agoIncrease $Opcode::VERSION to 1.35
Father Chrysostomos [Tue, 17 May 2016 01:16:28 +0000]
Increase $Opcode::VERSION to 1.35

2 weeks agoAdd avhvswitch op
Father Chrysostomos [Tue, 17 May 2016 01:15:42 +0000]
Add avhvswitch op

&CORE::keys() et al. will use this to switch between keys and akeys
depending on the argument type.

2 weeks agoregen/opcodes: Re-order aeach, akeys, and avalues
Father Chrysostomos [Tue, 17 May 2016 01:09:02 +0000]
regen/opcodes: Re-order aeach, akeys, and avalues

In a forthcoming commit, I will need them to be in the same order as
the corresponding hash functions.

2 weeks agopp.c: Use PL_op_desc in pp_coreargs
Father Chrysostomos [Sun, 15 May 2016 20:59:24 +0000]
pp.c: Use PL_op_desc in pp_coreargs

OP_DESC is inconvienient here, because it expects an op, not an op
number, so we have to follow pointers to find an appropriate op.  It
is also needlessly expensive, since we do not need to check for custom
ops in pp_coreargs (which OP_DESC does).  Just access the underlying
array directly.

2 weeks agoUpgrade to threads 2.09
jdhedden [Fri, 20 May 2016 18:59:02 +0000]
Upgrade to threads 2.09

For: RT #128197

2 weeks agoUpgrade to Thread::Queue 3.11
jdhedden [Fri, 20 May 2016 18:33:31 +0000]
Upgrade to Thread::Queue 3.11

For: RT #128195

2 weeks agoIncrement $VERSION to 5.YYYYMMDD for next scheduled monthly release date.
James E Keenan [Sat, 21 May 2016 01:59:46 +0000]
Increment $VERSION to 5.YYYYMMDD for next scheduled monthly release date.

2 weeks agocorelist: update for v5.25.2
Father Chrysostomos [Sat, 21 May 2016 01:04:52 +0000]
corelist: update for v5.25.2

I really have no idea what I’m doing.  I just copied 4170737e2, sort of,
and the tests started passing.

2 weeks ago[Merge] Lexical subs are no longer experimental
Father Chrysostomos [Fri, 20 May 2016 23:00:09 +0000]
[Merge] Lexical subs are no longer experimental

2 weeks agoGive feature.pm the concept of no-op features
Father Chrysostomos [Fri, 20 May 2016 21:30:14 +0000]
Give feature.pm the concept of no-op features

2 weeks agoRemove @experimental from regen/feature.pl
Father Chrysostomos [Fri, 20 May 2016 21:17:55 +0000]
Remove @experimental from regen/feature.pl

Originally, we were going to have feature.pm warning when enabling
an experimental feature.  That changed, though, when we introduced
the :all tag, because it is unkind for :all to warn.  So in
v5.17.6-49-g64fbf0d we started warning when a feature is used,
not enabled.

It does not appear that that will ever change, so we might as well
remove the dead code (and comments) from regen/feature.pl.

2 weeks agoUpdate other docs on lexical sub acceptance
Father Chrysostomos [Fri, 20 May 2016 21:11:30 +0000]
Update other docs on lexical sub acceptance

2 weeks agoIncrease $feature::VERSION to 1.44
Father Chrysostomos [Fri, 20 May 2016 20:26:17 +0000]
Increase $feature::VERSION to 1.44

2 weeks agoUpdate feature.pm docs for lex sub acceptance
Father Chrysostomos [Fri, 20 May 2016 20:25:20 +0000]
Update feature.pm docs for lex sub acceptance

2 weeks agoUpdate perldiag for lexsub diag removals
Father Chrysostomos [Fri, 20 May 2016 19:46:07 +0000]
Update perldiag for lexsub diag removals

2 weeks agoEnable lex subs everywhere; suppress warning
Father Chrysostomos [Fri, 20 May 2016 19:45:10 +0000]
Enable lex subs everywhere; suppress warning

Adjust tests, too.

2 weeks ago[perl #128187] Forbid keys @_ in assigned lv sub
Father Chrysostomos [Fri, 20 May 2016 13:22:40 +0000]
[perl #128187] Forbid keys @_ in assigned lv sub

This is a continuation of this commit’s great grandparent, extending
the error to arrays.

2 weeks agotoke: yylex comments
Father Chrysostomos [Fri, 20 May 2016 04:32:02 +0000]
toke: yylex comments

Update; clarify; fix typo.

2 weeks agoCorrect error msg for sub:lvalue{%h{k}} in sassign
Father Chrysostomos [Fri, 20 May 2016 01:31:56 +0000]
Correct error msg for sub:lvalue{%h{k}} in sassign

This:

    sub foo : lvalue { %hash{'key'} }
    foo = 3;

was incorrectly giving ‘Can't modify key/value hash slice in list
assignment’.  There is no list assignment there.

2 weeks ago[perl #128187] Forbid sub :lvalue{keys} in aassign
Father Chrysostomos [Fri, 20 May 2016 01:27:24 +0000]
[perl #128187] Forbid sub :lvalue{keys} in aassign

This commit makes perl die when keys(%hash) is returned from an lvalue
sub and the lvalue sub call is assigned to in list assignment:

    sub foo : lvalue { keys(%INC) }
    (foo) = 3; # death

This prevents an assignment that is completely useless and probably a
mistake, and it makes the lvalue-sub use of keys behave the same way
as (keys(%INC)) = 3.

2 weeks agoNote latest stable in INSTALL:
Sawyer X [Fri, 20 May 2016 22:39:12 +0000]
Note latest stable in INSTALL:

This was in the instructions but as it appears right after bumping
the version number (which contains a note that BLEAD-POINT should
only do it later), I had missed it. Also, INSTALL is generally
updated by the bump version script, which is usually done the
version before.

Anyway, might as well fix it now.

2 weeks agoBump the perl version in various places for 5.25.2
Sawyer X [Fri, 20 May 2016 22:08:13 +0000]
Bump the perl version in various places for 5.25.2

2 weeks agonew delta for 5.25.2
Sawyer X [Fri, 20 May 2016 22:03:08 +0000]
new delta for 5.25.2

2 weeks agomark 5.25.1 release as done
Sawyer X [Fri, 20 May 2016 21:53:53 +0000]
mark 5.25.1 release as done

2 weeks agoAdd epigraph to list:
Sawyer X [Fri, 20 May 2016 21:53:16 +0000]
Add epigraph to list:

NNTP link not available yet, I'll update it in the near future
(tomorrow) when it's available.

2 weeks ago[MERGE] resolve conflicts and merge 5.25.1 release with blead
Sawyer X [Fri, 20 May 2016 21:46:30 +0000]
[MERGE] resolve conflicts and merge 5.25.1 release with blead

2 weeks agoadd new release to perlhist v5.25.1
Sawyer X [Fri, 20 May 2016 19:47:28 +0000]
add new release to perlhist

2 weeks agoupdated perldelta
Sawyer X [Fri, 20 May 2016 19:25:04 +0000]
updated perldelta

2 weeks agoUpdate Module::CoreList for 5.25.1
Sawyer X [Fri, 20 May 2016 16:08:40 +0000]
Update Module::CoreList for 5.25.1

2 weeks agoadd a change to perldelta
Sawyer X [Fri, 20 May 2016 15:20:58 +0000]
add a change to perldelta

3 weeks agoImporting not-useful POSIX subs now fails at import time.
Jarkko Hietaniemi [Fri, 20 May 2016 11:38:31 +0000]
Importing not-useful POSIX subs now fails at import time.

3 weeks agoIndirect object syntax fixed in FileHandle.pm
Chase Whitener [Wed, 18 May 2016 16:20:28 +0000]
Indirect object syntax fixed in FileHandle.pm

Increment $FileHandle::VERSION.

For: RT #128178

3 weeks agoCorrect POD for release managers document:
Sawyer X [Thu, 19 May 2016 20:01:57 +0000]
Correct POD for release managers document:

A literal / (solidus) is E<sol>.

3 weeks agoUpdate and correct release schedule:
Sawyer X [Thu, 19 May 2016 19:54:32 +0000]
Update and correct release schedule:

* The release schedule had the dates for some releases twice
  and they weren't the same. Ricardo Signes released 5.24.0 sooner
  than on the schedule (good thing, since we kept slipping away)
  so that's fixed.

* We're releasing 5.25.1 tomorrow, on May, instead of June. That
  means all numbers are bumped.

* Aaron Crane volunteered to take on the November release.
  (Joke's on him, he'll have to do it!)

3 weeks ago[perl #123367] Test my sub defined in BEGIN{eval}
Father Chrysostomos [Thu, 19 May 2016 13:08:12 +0000]
[perl #123367] Test my sub defined in BEGIN{eval}

This accidentally started working in v5.21.6-197-g0f94cb1.

3 weeks agoAllow require_error.t be run from the top level
Father Chrysostomos [Thu, 19 May 2016 04:42:03 +0000]
Allow require_error.t be run from the top level

3 weeks agoNo such thing as MACOSX_DEVELOPMENT_TARGET.
Craig A. Berry [Thu, 19 May 2016 11:35:49 +0000]
No such thing as MACOSX_DEVELOPMENT_TARGET.

This appears to be a typo that has been with us since 69625aa92a9
and the real name is MACOSX_DEPLOYMENT_TARGET.

So do the same thing the MacPorts folks have been doing, meaning
this is just the "fix-ld-modification.patch" from:

https://trac.macports.org/browser/trunk/dports/lang/perl5/files/5.24?rev=148407

3 weeks agoperldelta for 08f800f85 / #128182
Father Chrysostomos [Thu, 19 May 2016 03:14:26 +0000]
perldelta for 08f800f85 / #128182

3 weeks ago[perl #128182] Fix crash with require $nonstring
Father Chrysostomos [Thu, 19 May 2016 01:07:37 +0000]
[perl #128182] Fix crash with require $nonstring

If something other than a plain string (e.g. a reference or typeglob)
whose stringified form contains a null character is passed to require()
or do(), it crashes, as of v5.19.3-130-gc8028aa, because the code in
question that handles the error tries to read fields of the scalar
that are only valid if it is a string internally.

3 weeks agolexsub.t: Remove some unnecessary evals
Father Chrysostomos [Thu, 19 May 2016 00:54:28 +0000]
lexsub.t: Remove some unnecessary evals

These evals were originally of the form eval {...} when I added
the tests, before things were working.  When I got them working,
I left few evals by mistake, while removing the braces.  Luckily,
eval 44 produces the same thing as 44.

3 weeks agoAdd POSIX::tmpnam() removal into perldelta
Jarkko Hietaniemi [Thu, 19 May 2016 02:45:13 +0000]
Add POSIX::tmpnam() removal into perldelta

3 weeks agoperldelta update
Father Chrysostomos [Wed, 18 May 2016 20:39:22 +0000]
perldelta update

fcd1306 [perl #128106] Fix reset with non-globs
60a26c7 [perl #128086] Fix precedence in hv_ename_delete
69e7f50 [perl #127976] Restore ‘or array’ to each($s) err
94f9945 Fix crash with: undef *_; shift;
c349280 Use concat overloading for "foo$_->$*"
d674449 [perl #128171] Fix assert fail with /@0{0*->@*/*0

3 weeks agoFix POD error
Aaron Crane [Wed, 18 May 2016 13:36:18 +0000]
Fix POD error

Sigh. Sorry about that, everyone.

3 weeks agoAdd perldelta entries for my 5.25.1 changes
Aaron Crane [Wed, 18 May 2016 13:06:57 +0000]
Add perldelta entries for my 5.25.1 changes

3 weeks ago[perl #128171] Fix assert fail with /@0{0*->@*/*0
Father Chrysostomos [Wed, 18 May 2016 01:16:52 +0000]
[perl #128171] Fix assert fail with /@0{0*->@*/*0

If a syntax error such as * (multiply) followed by an arrow causes the
parser to pop scopes in trying to recover from the error, it might
exit the quote-parsing scope (for parsing the regexp) and point the
lexer’s cursor at the code following the regexp, after the lexer has
noted to itself that it is expected to parse a postfix dereference
(PL_expect==XPOSTDEREF).

The code for parsing a postfix dereference has an assertion which
ends up failing in this case, because the *0 following the regexp,
having sigil that can come after an arrow, goes through the postfix
deref function, which complains about the 0 it did not expect.

If we simply remove the assertion, the lexer will continue to emit
tokens, and we just end up dying (somewhat) gracefully because of the
syntax error, instead of crashing.

I used a ] in the test instead of a final 0, to avoid a compile-
time warning.  (Number found where operator expected.)

3 weeks agomathoms.c: Add instructions for moving code here
Karl Williamson [Wed, 18 May 2016 00:22:00 +0000]
mathoms.c: Add instructions for moving code here

Suggested by Dave Mitchell.

3 weeks agoAdd 'corpus' to the heuristic for demo or test modules
Chris 'BinGOs' Williams [Tue, 17 May 2016 23:16:35 +0000]
Add 'corpus' to the heuristic for demo or test modules

3 weeks agoremove internal test modules from Module::CoreList
Karen Etheridge [Mon, 16 May 2016 04:47:37 +0000]
remove internal test modules from Module::CoreList

These modules only ever existed as test data, and should never have entered
the PAUSE index. There is no value in listing them in historical data.

3 weeks agofix Module::CoreList::is_core bounds checking for specific module versions
Karen Etheridge [Fri, 6 May 2016 20:36:17 +0000]
fix Module::CoreList::is_core bounds checking for specific module versions

3 weeks agobisect-runner: Work around ./Configure -S bug
Father Chrysostomos [Tue, 17 May 2016 20:37:46 +0000]
bisect-runner: Work around ./Configure -S bug

v5.23.4-46-g41d7307 stopped ./Configure -S from working.
In v5.23.5-89-g7a4fcb3, it started working again.

In order to bisect in this region, copy the optdef.sh file, which
Configure was invoking from the wrong path.

This patch actually works this time (I hope).

3 weeks agoRevert "bisect-runner: Only run ./Configure -S when needed"
Father Chrysostomos [Tue, 17 May 2016 20:04:28 +0000]
Revert "bisect-runner: Only run ./Configure -S when needed"

This reverts commit 16a77b27e2d2b59233235b74ce1f2c90ac18d675.

Scratch that.  ./Configure -S *is* needed.  It’s not just related to
noextensions.

I still can’t bisect, but I need to come up with a different fix.

3 weeks agobisect-runner: Only run ./Configure -S when needed
Father Chrysostomos [Tue, 17 May 2016 20:00:08 +0000]
bisect-runner: Only run ./Configure -S when needed

We only need to run it when config.sh has been modified, which only
happens before 5.10.  From v5.23.4-46-g41d7307 onwards ./Configure -S
did not work, until v5.23.5-90-g473edb6, so we need to skip this if we
want to bisect in that region.  (Or we could just skip the die, but we
might as well skip the system call, too.)

3 weeks agomake_ext.pl: emit fewer blank lines during build
Aaron Crane [Tue, 17 May 2016 15:41:16 +0000]
make_ext.pl: emit fewer blank lines during build

I find this makes it easier rather than harder to see what's going on.

3 weeks agoUpdate Sys-Syslog to CPAN version 0.34
Chris 'BinGOs' Williams [Tue, 17 May 2016 12:37:52 +0000]
Update Sys-Syslog to CPAN version 0.34

  [DELTA]

0.34 -- 2016.05.06 -- Sebastien Aperghis-Tramoni (SAPER)
        [BUGFIX] CPAN-RT#105117: use %e where available, fall back to %d and
        a regexp where not (Markus Laker).
        [BUGFIX] CPAN-RT#98446: trailing new line with perror (Alexander Bluhm).
        [BUGFIX] CPAN-RT#105152: the noeol option was ignored (Markus Laker).
        [PORT] CPAN-RT#104710: loadable library and perl binaries are mismatched,
        because of missing CCFLAGS (CHORNY, KMX).
        [PORT] No longer inheriting from Exporter doesn't work before Perl 5.8.3.
        [BUGFIX] CPAN-RT#90538: facility from openlog() is not used (Anton Yuzhaninov).
        [PORT] CPAN-RT#90212: Support non-Windows platforms where syslog.h
        is not defined (Brian Fraser).
        [PORT] CPAN-RT#90224: setlocale() is not available everywhere, for
        example on Android (Brian Fraser).
        [PORT] CPAN-RT#90218: getproto*() and getserv*() functions are not
        available everywhere (Brian Fraser).
        [DOC] CPAN-RT#102058: mention the repository in the documentation.

3 weeks agoUpdate Term-ANSIColor to CPAN version 4.05
Chris 'BinGOs' Williams [Tue, 17 May 2016 12:35:33 +0000]
Update Term-ANSIColor to CPAN version 4.05

  [DELTA]

Term::ANSIColor 4.05 (2016-03-20)

    Color aliases are now restricted to ASCII alphanumerics, due to the
    below change.

    Delay loading of the Carp module and avoid using [:upper:], \w, and \d
    in regular expressions to reduce the amount of memory this module
    consumes.  (Normally, I wouldn't worry about this, but this module is
    very light-weight and can be useful even in highly space-constrained
    environments, and the impact is slight.)  Thanks, Nicolas R.
    (#111552)

    Provide a mailto address in bug tracking metadata, use the shorter
    form of the RT bug tracker URL, and fix the license value to match the
    new metadata specification.  Rework Makefile.PL so that the munging
    for older versions of ExtUtils::MakeMaker is less intrusive.

3 weeks agoperlbug: don't run editor when noninteractive
Aaron Crane [Tue, 17 May 2016 11:24:54 +0000]
perlbug: don't run editor when noninteractive

This fixes tests on Win32.

3 weeks agobisect-runner.pl: Don’t use /a
Father Chrysostomos [Tue, 17 May 2016 09:26:21 +0000]
bisect-runner.pl: Don’t use /a

It’s convenient to be able to run it under the system perl, which
might be too old for /a.

In this code path, the utf8 flag will be off anyway.

3 weeks agoRemove LEX_KNOWNEXT and stop using PL_lex_defer
Father Chrysostomos [Tue, 17 May 2016 08:50:45 +0000]
Remove LEX_KNOWNEXT and stop using PL_lex_defer

See these commits for the background:

    7aa8cb0dec
    f4460c6f7a
    479ae48e22

Perl’s lexer keeps an internal state (PL_lex_state), whereby it tracks
what kind of code it is parsing (normal, interpolated, etc.).

Due to the way bison works, yylex() must return exactly one token for
each call.  Since it needs to emit multiple tokens at times, it pushes
them on to a pending token stack, and then emits one for each subse-
quent yylex() call until the stack is empty.

Previously, it would record whether it needed to look at the stack by
setting PL_lex_state to LEX_KNOWNEXT.  Then, after emptying the pend-
ing token stack, it would set PL_lex_state back to its previous value,
temporarily stored in PL_lex_defer.

In some cases of syntax errors, scopes may be popped, and
PL_lex_state, which gets localised, may be unwound and set to a pre-
vious value.  The result was that PL_lex_state and the pending token
stack could get out of synch, resulting in crashes.

The commits cited above fixed things by working around the
LEX_KNOWNEXT mechanism, and checking the pending token stack itself,
rather than PL_lex_state, in determining whether it needed popping.

So we ended up with LEX_KNOWNEXT and PL_lex_defer doing nothing much
and getting in the way, requiring workarounds.

This commit just removes them.  We are already looking at the pending
token stack directly, instead of checking for LEX_KNOWNEXT.  And if
we no longer set PL_lex_state to that value, we no longer need to use
PL_lex_defer to hold the previous value, because PL_lex_state now gets
*left alone*.

I am leaving PL_lex_defer in the parser struct for now, in the hope
that it will result in fewer immediate CPAN patches.

(I intended to fix this shortly after 5.22, but Real Life got
in the way.)

3 weeks agoUse concat overloading for "foo$_->$*"
Father Chrysostomos [Tue, 17 May 2016 08:24:03 +0000]
Use concat overloading for "foo$_->$*"

This is the only discrepancy between $$_ and $_->$* that I know about.

To get ->@... interpolation to work, we have to emit a special
POSTJOIN token, which has just the right precedence to get it to apply
to the right amount of code before it, which perly.y then turns into a
regular join(...).

->$* and ->$#* were also going through that same code path, though it
turns out that simply omitting the POSTJOIN token for these dollar
tokens Just Works.  (I thought the fix would be more complicated.)

Now $_->$* within quotes becomes a direct argument to the concat ope-
rator, instead of being wrapped in a stringify(...) (what join(...)
optimises to with a single-item list).

3 weeks agoFix crash with: undef *_; shift;
Father Chrysostomos [Tue, 17 May 2016 07:03:09 +0000]
Fix crash with: undef *_; shift;

Commit v5.13.0-149-g538f575 added on optimisation to shift() that
makes pp_shift fetch @_ directly, instead of having two separate ops.

Unfortunately, it used the wrong macro, namely GvAV, instead of GvAVn.
The latter makes sure the array actually exists.

3 weeks agoRemove some autoderef leftovers
Father Chrysostomos [Tue, 17 May 2016 06:42:09 +0000]
Remove some autoderef leftovers

3 weeks agobetter glibc i_modulo bug handling
jimc [Tue, 15 Mar 2016 04:02:52 +0000]
better glibc i_modulo bug handling

pp-i-modulo code currently detects a glibc bug at runtime, at the 1st
exec of each I_MODULO op.  This is suboptimal; the bug should be
detectable early, and PL_ppaddr[I_MODULO] updated just once, before
any optrees are built.

Then, because we avoid the need to fixup I_MODULO ops in already built
optrees, we can drop the !PERL_DEBUG_READONLY_OPS limitation on the
alternative/workaround I_MODULO implementation that avoids the bug.

perl.c:

bug detection code is copied from PP(i_modulo),
into S_fixup_platform_bugs(), and called from perl_construct().
It patches Perl_pp_i_modulo_1() into PL_ppaddr[I_MODULO] when needed.

pp.c:

PP(i_modulo_0), the original implementation, is renamed to PP(i_modulo)

PP(i_modulo_1), the bug-fix workaround, is renamed _glibc_bugfix
                it is #ifdefd as before, but dropping !PERL_DEBUG_READONLY_OPS

PP(i_modulo) - the 1st-exec switcher code, is dropped

ocode.pl:

Two i_modulo entries are added to @raw_alias.
- 1st alias:  Perl_pp_i_modulo     => 'i_modulo'
- 2nd alt:    Perl_pp_i_modulo_glibc_bugfix => 'i_modulo'

1st is a restatement of the default alias/mapping that would be
created without the line.  2nd line is then seen as alternative to the
explicit mapping set by 1st.

Alternative functions are written to pp_proto.h after the standard
Perl_pp_* list, and include #if-cond, #endif wrappings, as was
specified by 2nd @raw_alias addition.

Changes tested by inserting '1 ||' into the 3 ifdefs and bug-detection code.

TODO:

In pp_proto.h generation, the #ifdef wrapping code which handles the
alternative functions looks like it should also be used for the
non-alternate functions.  In particular, there are a handful of
pp-function prototypes that should be wrapped with #ifdef HAS_SOCKET.
That said, there have been no problem reports, so I left it alone.

TonyC: make S_fixup_platform_bugs static, porting/libperl.t was failing.

3 weeks agoregen_perly.pl: Correct typo
Father Chrysostomos [Tue, 17 May 2016 04:43:27 +0000]
regen_perly.pl: Correct typo

Sorry for the noisy patch.  I can’t modify regen_perly.pl without
regenerating stuff, because the checksum changes.

3 weeks ago[perl #127976] Restore ‘or array’ to each($s) err
Father Chrysostomos [Sun, 15 May 2016 20:36:00 +0000]
[perl #127976] Restore ‘or array’ to each($s) err

This part of the message was accidentally deleted when the autoderef
feature was introduced.

This commit also emits this error in addition to the ‘Experimental
forbidden’ message in those cases where the latter occurs, since it
makes things clearer.

3 weeks ago[perl #127976] Use yyerror for each $scalar error
Father Chrysostomos [Mon, 25 Apr 2016 01:19:59 +0000]
[perl #127976] Use yyerror for each $scalar error

yyerror queues the error, allowing for multiple error messages for
syntax errors.  So at compile time it is generally better than croak.
It also provides more information about the location of the error,
with things like ‘at EOF’ and ‘near such and such’.

The hash functions each, values, and keys were using croak for the
‘Experimental forbidden’ message, unlike the array functions, which
were already using yyerror.

This commit changes the hash functions to use yyerror.

3 weeks agostartkve.t: Refactor setting of $errpat
Father Chrysostomos [Mon, 25 Apr 2016 00:21:44 +0000]
startkve.t: Refactor setting of $errpat

This will simplify things in the next commit.

3 weeks agosmartkve.t: Delete now-redundant tests
Father Chrysostomos [Sun, 24 Apr 2016 05:33:48 +0000]
smartkve.t: Delete now-redundant tests

The sole purpose of these tests was to make sure that the rvalues
and reach ops had the OA_DANGEROUS flag set and consequently behaved
correctly in list assignments that swap arguments.  (See d86b3122
for details.)

The tests were changed in commit 26230909, when the two ops in ques-
tion were removed, to use plain values and each ops (without the r-),
but those cases are already tested elsewhere by other tests that
d86b3122 added.

3 weeks ago(perl #127780) point backtick users at the open pragma
Tony Cook [Tue, 17 May 2016 01:47:07 +0000]
(perl #127780) point backtick users at the open pragma

3 weeks agoCoverity sees a path where a NULL op might be dereferenced.
Jarkko Hietaniemi [Mon, 16 May 2016 22:30:44 +0000]
Coverity sees a path where a NULL op might be dereferenced.

A very, very, very long path.  Coverity CID 104861.

3 weeks agoUpgrade to threads::shared 1.52
jdhedden [Mon, 16 May 2016 18:47:21 +0000]
Upgrade to threads::shared 1.52

3 weeks agoUpgrade to threads 2.08
jdhedden [Mon, 16 May 2016 17:41:39 +0000]
Upgrade to threads 2.08

3 weeks agoDo not dump verbose diagnostics in perl core.
Karen Etheridge [Mon, 16 May 2016 21:35:45 +0000]
Do not dump verbose diagnostics in perl core.

For:  RT # 128160

3 weeks agoPOSIX: test that all subroutines are exported
Aaron Crane [Fri, 13 May 2016 12:50:01 +0000]
POSIX: test that all subroutines are exported

3 weeks agoPOSIX: delete the L_tmpnam and L_tmpname symbols
Aaron Crane [Fri, 13 May 2016 12:10:38 +0000]
POSIX: delete the L_tmpnam and L_tmpname symbols

The history here is relatively complicated.

The L_tmpname symbol is neither specified by POSIX or defined by traditional
Unix system; it's simply a typo for L_tmpnam, first introduced in Perl 5.0.

Commit 33f01dd10fdacfa5ccb83c4f933cacb0f65b707e (part of Perl 5.6) added
support for L_tmpnam, treating L_tmpname as a back-compat synonym. However,
no version of Perl has ever made L_tmpnam exportable, even at explicit
request; using that symbol has always required using its fully-qualified
POSIX::L_tmpnam name.

During the 5.8 development cycle, an apparently-unintended consequence of
various improvements to the way that POSIX.pm generates and exports constants
meant that L_tmpname stopped working. It continued to be exportable, but
trying to use the constant yielded an exception saying "Your vendor has not
defined POSIX macro L_tmpname". (This isn't exactly incorrect, of course: no
vendor defines the macro L_tmpname!)

At this point, therefore, there seems little benefit in trying to resurrect
support for the L_tmpname typo: it's impossible for any program running on
5.8.0 or later to have successfully used it.

There's perhaps an argument for making L_tmpnam exportable at this point,
since it does work when called by its full-qualified name. One option would
be to add it to @EXPORT_OK; but that is explicitly counselled against by the
POSIX.pm comments summarising the policy on symbol exports, which recommend
adding a new export tag instead. In this case, the obvious tag to use is
:stdio_h (which already exists), since the C-level symbol is provided by the
<stdio.h> header.

However, that doesn't seem worth it to me. The only possible use of L_tmpnam
is to create a buffer of a size suitable for passing to the tmpnam() C
function (which is presumably why nobody's noticed in the last fifteen years
that the symbol isn't actually exported). Furthermore, the POSIX.pm wrapper
for tmpnam() itself was deleted by 19fc2965b60669d7bc25548edb32e3cdd86a68de,
a few days ago, so merely deleting this additional symbol seems correct.