This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
8 years agoRespect hashbangs containing perl6
Leon Timmermans [Sun, 19 Apr 2015 11:03:28 +0000 (13:03 +0200)]
Respect hashbangs containing perl6

8 years agoIncrease the maximal size of the string displayed in non-numeric warnings
Rafael Garcia-Suarez [Mon, 22 Jun 2015 07:46:18 +0000 (09:46 +0200)]
Increase the maximal size of the string displayed in non-numeric warnings

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

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

8 years agoThese be the versions on CPAN now, ye scurvy dogs.
Chris 'BinGOs' Williams [Mon, 22 Jun 2015 07:25:07 +0000 (08:25 +0100)]
These be the versions on CPAN now, ye scurvy dogs.

8 years agoperlvar: fix list of defaulted array operators
Aristotle Pagaltzis [Sun, 21 Jun 2015 19:25:55 +0000 (21:25 +0200)]
perlvar: fix list of defaulted array operators

8 years agowelcome to v5.23.1, please make regen
Ricardo Signes [Sat, 20 Jun 2015 20:35:57 +0000 (16:35 -0400)]
welcome to v5.23.1, please make regen

8 years agocorelist: update for v5.23.1
Ricardo Signes [Sat, 20 Jun 2015 20:34:32 +0000 (16:34 -0400)]
corelist: update for v5.23.1

8 years agopatchlevel: we are now perl v5.23.1
Ricardo Signes [Sat, 20 Jun 2015 20:24:47 +0000 (16:24 -0400)]
patchlevel: we are now perl v5.23.1

8 years agoperldelta: correct target version v5.23.0
Ricardo Signes [Sat, 20 Jun 2015 20:13:57 +0000 (16:13 -0400)]
perldelta: correct target version

8 years agoperldelta: remove some unneeded bits
Ricardo Signes [Sat, 20 Jun 2015 19:02:46 +0000 (15:02 -0400)]
perldelta: remove some unneeded bits

8 years agoperlhist: v5.23.0 will be today
Ricardo Signes [Sat, 20 Jun 2015 18:51:41 +0000 (14:51 -0400)]
perlhist: v5.23.0 will be today

8 years agoperldelta: update for v5.23.0
Ricardo Signes [Sat, 20 Jun 2015 18:31:04 +0000 (14:31 -0400)]
perldelta: update for v5.23.0

8 years agoCoreList: update corelist for release of v5.23.0
Ricardo Signes [Sat, 20 Jun 2015 17:45:56 +0000 (13:45 -0400)]
CoreList: update corelist for release of v5.23.0

8 years agopartially revert 'silence gcc -pendantic warnings'
David Mitchell [Sat, 20 Jun 2015 01:56:03 +0000 (02:56 +0100)]
partially revert 'silence gcc -pendantic warnings'

The GCC_DIAG_IGNORE(-Wpedantic) stuff added by me to
STATIC_ASSERT_GLOBAL() by ac892e4a230de5b was causing some smoke failures.

I don't yet understand why.

8 years agoperlebcdic: Fix typo
Karl Williamson [Fri, 19 Jun 2015 19:40:33 +0000 (13:40 -0600)]
perlebcdic: Fix typo

8 years agosilence some gcc -pendantic warnings
David Mitchell [Fri, 19 Jun 2015 13:52:17 +0000 (14:52 +0100)]
silence some gcc -pendantic warnings

8 years agosilence some -Wc++-compat warnings
David Mitchell [Fri, 19 Jun 2015 12:41:42 +0000 (13:41 +0100)]
silence some -Wc++-compat warnings

The initialisers for PL_inf and PL_nan disabled -Wc++-compat warnings for
some ifdef branches but not others. Expand the scope of the
GCC_DIAG_IGNORE() to all cases.

8 years agoremove deprecated /\C/ RE character class
David Mitchell [Fri, 19 Jun 2015 11:47:05 +0000 (12:47 +0100)]
remove deprecated /\C/ RE character class

This horrible thing broke encapsulation and was as buggy as a very buggy
thing. It's been officially deprecated since 5.20.0 and now it can finally
die die die!!!!

8 years ago[MERGE] refactor sub returns (pp_return etc)
David Mitchell [Fri, 19 Jun 2015 08:51:10 +0000 (09:51 +0100)]
[MERGE] refactor sub returns (pp_return etc)

This series of commits attempts to reduce duplication and partially unify
the code that handles subroutine exit, in places like pp_leavesub,
pp_return etc.  In particular, pp_return has been heavily modified so that
it is now only responsible for doing any extra work required above and
beyond that done by pp_leavesub et al (popping contexts and removing junk
left on the stack). It now tail calls pp_leavesub / pp_leaveeval/ etc to
do the remaining heavy lifting. This reduces the code size of pp_return to
about a quarter of what it was previously, and ensures that exactly the
same processes happen regardless of whether an explicit return is is done
or not.

It also fixes using return in list context in a MULTICALL, e.g.

    use List::Util qw(pairmap);
    @a = pairmap { for (1,2) { return (3,4)} } qw(a b);

formerly returned (1,2,3,4) and now returns (3,4).

It also simplifies S_sortcv() et al which are responsible for calling
a sort sub.

8 years agosinplify Perl_block_gimme()
David Mitchell [Fri, 19 Jun 2015 08:45:54 +0000 (09:45 +0100)]
sinplify Perl_block_gimme()

The switch statement was fairly pointless, as it was just a bunch of

    case G_VOID:
       return G_VOID;

so replace the switch with a simple "croak if 0, otherwise return the
value".

8 years agopp_return: optimise a couple of conditions
David Mitchell [Thu, 11 Jun 2015 10:11:19 +0000 (11:11 +0100)]
pp_return: optimise a couple of conditions

Change:

    if (cxix < 0) {
        A; return;
    }
    if (cxix < cxstack_ix)
        B;

to

    if (cxix < cxstack_ix) {
        if (cxix < 0) {
            A; return;
        }
        B;
    }

This is functionally the same, since cxstack_ix is always positive at
this point, and makes for a quicker code path (one less test and branch)
in the reasonably common case of a return from a sub which doesn't
have any extra nested contexts to pop.

8 years agopp_return: reindent
David Mitchell [Thu, 11 Jun 2015 10:05:50 +0000 (11:05 +0100)]
pp_return: reindent

Re-indent a code block that got stranded after the previous commit.
Whitespace-only change.

8 years agopp_return(): tail call pp_leavewrite()
David Mitchell [Thu, 11 Jun 2015 09:54:12 +0000 (10:54 +0100)]
pp_return(): tail call pp_leavewrite()

When 'return'ing from a format, rather than handling it ourselves, fall
through to pp_leavewrite(). pp_return() is now only responsible for
popping any extra contexts and junk from the stack.

With this commit, *all* types of return are now handled by tail-calling
the appropriate pp_leaveFOO() function, so this commit also cuts out big
chunks of dead code.

Note that the behaviour on using 'return' in a format is completely
undocumented, and almost completely untested. In fact there is only a
single format in the test suite that does a return, and the tests which
use that are mainly there to ensure that extra stuff on the stack doesn't
leak into the value(s) returned by write().

In particular, its not clear whether a return half-way through a format
should cause the lines processed so far to be output, or to be discarded;
currently it discards. Also, its not clear what (if anything) should be
done with any args to the 'return' call. Currently they're just discarded.
Also, the format in the test suite which does a return only does a
'return;', not a 'return x,y,z'. So that's still untested.

So I decided to keep the current behaviour of return in format as close
as possible rather than trying to change of fix anything.

8 years agopp_return(): tail call pp_leaveeval()
David Mitchell [Thu, 11 Jun 2015 09:30:48 +0000 (10:30 +0100)]
pp_return(): tail call pp_leaveeval()

When 'return'ing from an eval STRING, rather than handling it
ourselves, fall through to pp_leaveeval(). pp_return() is now only
responsible for popping any extra contexts and junk from the stack.

This helps avoid two different blocks of code doing roughly the same
thing.

The functional changes caused by this commit signify the divergence over
time between pp_leaveeval and the try-ish parts of pp_return. After this
commit, a return will:

    * now do an PERL_ASYNC_CHECK();
    * be smarter about not unnecessarily creating mortal copies
      of returned args;
    * restore PL_curpm *before* the LEAVE() rather than after.

The first two are probably good things; I'm not sure about the latter; it
may well be a regression, but nothing tests for it. At least it's
consistent now.

8 years agopp_return: set eval CV depth to 0
David Mitchell [Thu, 11 Jun 2015 09:06:02 +0000 (10:06 +0100)]
pp_return: set eval CV depth to 0

In pp_leaveval, the CvDEPTH of the eval is set to 0. This doesn't
seem to be actually necessary (no tests fail if its removed),
but for consistency, add the same step to pp_return, which currently
doesn't do this. This is so that shortly we can make pp_return tail call
pp_leaveval.

8 years agopp_return: move 'die on require fail' later
David Mitchell [Thu, 11 Jun 2015 08:57:43 +0000 (09:57 +0100)]
pp_return: move 'die on require fail' later

In pp_leaveeval the test to die on require not returning a true value
is done late, after the return args have been processed, while in
pp_return it is checked *before* the args are processed. Move the test in
pp_return to after the args to make it more like pp_leaveeval. This is a
preparatory step in making pp_return eventually tail call pp_leaveeval.

It probably doesn't make any difference whether it's done early or late
(although arguably dying early is infinitesimally more efficient); but
since pp_leaveeval is going to be overwhelmingly a more common way of
returning from a require than pp_return, its seems prudent to to not mess
with the most widely used code path.

8 years agopp_leaveeval: use EVAL_KEEPERR
David Mitchell [Tue, 9 Jun 2015 16:11:06 +0000 (17:11 +0100)]
pp_leaveeval: use EVAL_KEEPERR

In order shortly to allow pp_return to tail call pp_leaveval,
make pp_leaveval use the EVAL_KEEPERR flag bit of PL_in_eval
to decide whether to call CLEAR_ERRSV() rather than testing the
OPf_SPECIAL flag bit on the OP_LEAVEEVAL op (since we may no longer be
that op).

The two are equivalent (I checked this by running test test suite with
an assert that they were the same).

Note that pp_return already uses the EVAL_KEEPERR flag test, so this
commit makes the pp_return and pp_leavesub code blocks more similar.

I've also added some more tests, as I initially got the logic of this
wrong, and no core tests failed - only cpan/ ones.  In particular, no core
tests checked whether eval-string actually cleared $@ on success!

8 years agoXS-APItest/t/call.t: make loops more flexible
David Mitchell [Wed, 10 Jun 2015 15:20:00 +0000 (16:20 +0100)]
XS-APItest/t/call.t: make loops more flexible

There's a loop which tests eval_pv, eval_sv, call_sv with various
types of argument. Currently the argument is determined by an integer
in a loop (0..3) with various values derived on an ad-hoc basis
from that index. Instead put all the data into an array of arrays
and iterate over that instead.

Similarly for the function names (eval_pv et al), loop over the names
rather than over 0..2.

This should make no functional change to what is tested, but makes the
test code clearer and more expandable.

8 years agopp_return(): tail call pp_leavetry()
David Mitchell [Tue, 9 Jun 2015 14:48:15 +0000 (15:48 +0100)]
pp_return(): tail call pp_leavetry()

When 'return'ing from an eval { BLOCK }, rather than handling it
ourselves, fall through to pp_leavetry(). pp_return() is now only
responsible for popping any extra contexts and junk from the stack.

This helps avoid two different blocks of code doing roughly the same
thing.

The functional changes caused by this commit signify the divergence over
time between pp_leavetry and the try-ish parts of pp_return. After this
commit, a return will:

    * now do an PERL_ASYNC_CHECK();
    * be smarter about not unnecessarily creating mortal copies
      of returned args;
    * restore PL_curpm *before* the LEAVE() rather than after.

The first two are probably good things; I'm not sure about the latter; it
may well be a regression, but nothing tests for it. At least it's
consistent now.

8 years agomake MULTICALL handle list context
David Mitchell [Tue, 9 Jun 2015 10:17:44 +0000 (11:17 +0100)]
make MULTICALL handle list context

Currently in something like

    for (1,2) { return 3,4 }

the user of MULTICALL will see 1,2,3,4 returned, because in pp_return,
MULTICALL is handled as a special case, and that special-case code doesn't
handle list context.

A simple fix is just to remove the special handling in pp_return.
Allow a MULTICALL return to pass through the normal pp_return stack
manging code, then tail call pp_leavesub or pp_leavesublv as approriate.
Both those subs do an immeidate 'return 0' if CxMULTICALL().

As well as fixing list context MULTICALL, it removes one extra condition
in the path of a normal return.

8 years agoeliminate S_return_lvalues()
David Mitchell [Tue, 9 Jun 2015 09:59:52 +0000 (10:59 +0100)]
eliminate S_return_lvalues()

After the previous commit, pp_leavesublv was just an empty wrapper
around S_return_lvalues() (which is also called from pp_return).

So just rename S_return_lvalues to pp_leavesublv, and make pp_return
call pp_leavesublv directly.

8 years agomove multicall check to S_return_lvalues
David Mitchell [Tue, 9 Jun 2015 09:51:15 +0000 (10:51 +0100)]
move multicall check to S_return_lvalues

Currently pp_leavesublv has a check at the top:

    if (CxMULTICALL(&cxstack[cxstack_ix]))
       return 0;

Move this instead into S_return_lvalues(), which pp_leavesublv immediately
calls. This has no effect on the pp_leavesublv code path, and also
has no effect on the pp_return code path, because although pp_return
calls S_return_lvalues, it doesn't in the case of MULTICALL, which it has
already checked for earlier.

So it shouldn't change anything functionally.

This will allow us to eliminate S_return_lvalues in the next commit.

8 years agoreindent code block in pp_return
David Mitchell [Tue, 9 Jun 2015 09:46:17 +0000 (10:46 +0100)]
reindent code block in pp_return

Just a whitespace change.

8 years agoSimplify S_return_lvalues()
David Mitchell [Tue, 9 Jun 2015 09:31:10 +0000 (10:31 +0100)]
Simplify S_return_lvalues()

S_return_lvalues() was written to handle both pp_leavesublv and pp_return;
in the latter case there could be junk on the stack that needs skipping;
e.g.

    for (1,2) { return 3,4 }

leaves 1,2,3,4 on the stack, and in list context the 3,4 needs shifting
down two places. After the previous commit, any return-specific processing
is now handled by pp_return itself, so S_return_lvalues only has to
worry about mortalising its args and grabbing the last arg in scalar
context.

Formerly there were two vars: newsp, which pointed to the slot before the
'1', and MARK, which pointed to the slot before the '3'. They now both
point to just before the '1'. So we only need to use one of them. Here
I've standardised on MARK, to make the code as similar as possible to that
in pp_leavesub, from which this code was forked back in 1999. For the same
reason I've set MARK to point to the '1' slot rather than the slot before
it, since that's what pp_leavesub does.

8 years agolval subs: do arg shifting in pp_return
David Mitchell [Tue, 9 Jun 2015 07:23:18 +0000 (08:23 +0100)]
lval subs: do arg shifting in pp_return

When an lvalue sub does an explicit return, currently pp_return
doesn't touch the args stack and instead tail calls S_return_lvalues()
which does both the leavesuby stuff (e.g. mortalise args) and the returny
stuff (e.g. shift the args down in list context).

Move the call to S_return_lvalues() further down in pp_return so that
the arg shifty stuff is done in pp_return now (like it is for non-lvalue
returns). This will allow us shortly to simply S_return_lvalues.

8 years agopp_return: simplify arg handling code
David Mitchell [Mon, 8 Jun 2015 17:46:50 +0000 (18:46 +0100)]
pp_return: simplify arg handling code

pp_return() only needs to do the extra arg handling associated
with the args not being at the base of the stack frame. For example

    for (1,2) { return 3,4 }

has to cope with 1,2,3,4 being on the stack.
Apart from handling junk, everything else  - in particular pushing
&PL_sv_undef in scalar context if there are no return args - is already
done by Perl_pp_leavesub, which pp_return tail calls.

So reduce what pp_return does to the bare minimum. This makes one less
conditional branch in a few cases.

8 years agosimplify sort sub return arg processing
David Mitchell [Mon, 8 Jun 2015 10:53:38 +0000 (11:53 +0100)]
simplify sort sub return arg processing

This commit:

1) makes the  gimme of sort blocks, as specified by the pushed cx_gimme,
be G_SCALAR. Formerly it was likely to be G_ARRAY, as it inherited
whatever sort() was called as, and sort doesn't bother calling a sort
block unless sort was called in list context.

This change is largely cosmetic, as
    a) the sort block is already compiled in scalar context; and
    b) the code in S_sortcv() etc does its own return arg context
       processing anyway, and assumes scalar context.
But it makes it consistent with sort SUB, which *does* set gimme to
G_SCALAR.

2) Makes use of the fact that a sort sub or block will always be
called as the first context in a new stackinfo, and such stackinfos always
have PL_stack_base[0] set to &PL_sv_undef as a guard.
So handling scalar context return (where zero args returned needs to be
converted into 1 PL_sv_undef arg) can be simplified by just always
accessing the last arg, *PL_stack_sp, regardless of whether 0,1,2+ args
were returned.
Note that some code making use of MULTICALL (e.g. List::Util) has already
been (possibly inadvertently) relying on this fact.

3) Remove the "Sort subroutine didn't return single value" fatal error.
This croak was removed from the sort BLOCK and sort NON-XS-SUB variants
in v5.15.5-82-g1715fa6, but the croak was left for XS sort subs.
That commit incorrectly asserted that for "sort BLOCK" and "sort
NON-XS-SUB", more than 1 arg could never be returned, but:

    $ perl -e'sub f { return (1,2) } @a = sort f 1,2,3'
    perl: pp_sort.c:1789: S_sortcv: Assertion `PL_stack_sp ==
        PL_stack_base' failed.

That has been fixed by (2) above. By removing the croak from the XS branch
too, we make things consistent. This means that an XS sub which returns
more than 1 arg will just gets its return args be evaluated in scalar
context (so @return_args[-1] will be used), rather than being handled
specially.

8 years agosort fns: simplify handing uninit warnings
David Mitchell [Tue, 2 Jun 2015 13:59:46 +0000 (14:59 +0100)]
sort fns: simplify handing uninit warnings

When a sort function or code block returns an undef value (rather than the
typical -1,0,-1), you get the usual "Use of uninitialized value" warning.

Originally the message didn't say " ... in sort" because at the end of
running a sort sub, PL_op is NULL rather rather than pointing at the sort
op.

v5.15.3-364-gd4c6760 changed the sort sub return code in S_sortcv() et al
to temporarily set PL_op to point to the sort OP, which made
Perl_report_uninit() emit the desired " in sort" suffix.

However, this meant that PL_op and PL_curpad briefly referenced two
different CVs; since Perl_report_uninit() rummages around in pads looking
for lexicals, consts etc, this could lead to SEGVs.

v5.15.3-372-g1aa032b fixed that by temporarily setting PL_curpad to NULL
at the same time. However that then caused problems if the code dies
(e.g. if warnings are upgraded to errors) since the old PL_curpad value
wasn't being restored.

v5.17.6-7-g2f43ddf fixed that by wrapping the PL_curpad=NULL with
appropriate ENTER/SAVEVPTR(PL_curpad)/..../LEAVE where necessary.

However, this is starting to get quite complex, and in a hot piece of
code, and the 3 sort functions S_sortcv/S_sortcv_stacked/S_sortcv_xsub
are all diverging from each other in subtle and confusing ways.

This commit takes a different approach. It effectively reverts those three
commits (apart from the tests) and instead updates Perl_report_uninit()
to say "if PL_op is NULL, but the context stack indicates that we're
currently in a sort, then append " in sort" to the warning.

This is a lot less messy, and moves all the clutter from the two hot
functions S_sortcv/S_sortcv_stacked into a function that is only called
when we're emitting warnings.

8 years agoPerl_report_uninit(): simplify code
David Mitchell [Tue, 2 Jun 2015 12:50:06 +0000 (13:50 +0100)]
Perl_report_uninit(): simplify code

Simplify the code in this function a bit.
It should have no functional effect, but will make the next commit
easier.

8 years agoadd PERLSI_MULTICALL
David Mitchell [Tue, 2 Jun 2015 10:51:44 +0000 (11:51 +0100)]
add PERLSI_MULTICALL

Currently when MULTICALL pushes a new stackinfo, it uses the si_type
PERLSI_SORT. This is probably just a hangover from when the MULTICALL code
was created from similar code used to implement sort.

Change it to use the new PERLSI_MULTICALL si_type.

The si_type value is mainly used for debugging/dumping purposes,
apart from a few places where we check for whether this is
the top stack (PERLSI_MAIN); or check for a sort BLOCK (cxix = 0,
CXt_NULL, PERLSI_SORT).

So this commit should have no immediate effect. It will in future
however allow us to detect whether we have a sort or a true MULTICALL.

8 years agoS_return_lvalues(): merge two similar blocks
David Mitchell [Sun, 24 May 2015 15:53:05 +0000 (16:53 +0100)]
S_return_lvalues(): merge two similar blocks

Two blocks of error-reporting code both clean up the context state and
then croak with a similar message. Make the second block just goto the
first block instead.

8 years agoS_return_lvalues(): consistent cxstack_ix--
David Mitchell [Sun, 24 May 2015 15:42:29 +0000 (16:42 +0100)]
S_return_lvalues(): consistent cxstack_ix--

After merging in the functionality from pp_leavesublv and pp_return
into S_return_lvalues(), there were two context stack pointer decrement
conventions: before or after the POPSUB(). Both are wrong in different
ways, and will be more generally fixed up in later commits. For now,
standardise on a single form: that used by pp_leavesub and pp_leavesublv.

8 years agopp_return: re-indent after last commit
David Mitchell [Sun, 24 May 2015 08:53:37 +0000 (09:53 +0100)]
pp_return: re-indent after last commit

whitespace-only change.

8 years agohandle most of lvalue return in single place
David Mitchell [Sun, 24 May 2015 08:48:53 +0000 (09:48 +0100)]
handle most of lvalue return in single place

Currently about half the work involved in returning from an lvalue sub
call is done by the shared sub S_return_lvalues() function, while the
other half is duplicated in pp_leavesublv() and pp_return(). Move most of
that duplicated code into S_return_lvalues().

8 years agopp_return: tail call pp_leavesub
David Mitchell [Sat, 23 May 2015 10:12:18 +0000 (11:12 +0100)]
pp_return: tail call pp_leavesub

For returns within normal (rvalue) subs, handle the bulk of of the work by
falling through into pp_leavesub, rather than repeating most of the code.
So pp_return is now just responsible for popping any extra contexts and
shifting any return args back down to the base of the stack.

Return in lvalue subs, evals etc is unaffected.

8 years agopp_last: only handle loop context types
David Mitchell [Sat, 23 May 2015 19:25:45 +0000 (20:25 +0100)]
pp_last: only handle loop context types

pp_last pops to the next relevant loop context type, or croaks.
Yet once it does this, it attempts to handle *all* context types
(subs, evals etc), even those which can never be the current
context.

Rip all this dead code out, and replace with an assertion that the
context is one of the loop types.

This dead code has been there since 5.000.

8 years agomktables: Fix logic error
Karl Williamson [Fri, 19 Jun 2015 00:45:05 +0000 (18:45 -0600)]
mktables: Fix logic error

When I wrote this some years ago, I committed a logic error, so that a
constraint I thought applied was in fact somewhat different than what I
thought.  The new comments give the proper constraint.

The code is taking the data furnished by unicode.org and massaging it
into tables usable by the perl interpreter.  This bug can cause wrong
tables to be generated.  Fortunately, this bug does not arise with
typical unicode.org data sets, so it hasn't shown up as a problem.
Fixing it makes no difference in the current Unicode version.  I
discovered it only in compiling Unicode 1.1.5, somewhat tweaked by me,
so not the official data there either.

8 years agoautodie/t/mkdir.t: escape build dir path
David Mitchell [Thu, 18 Jun 2015 16:51:40 +0000 (17:51 +0100)]
autodie/t/mkdir.t: escape build dir path

This test file creates a regex which includes the path of the build
directory. If that path includes regex metachars (e.g. blead_g++_quick)
then the test fails. Easily fixed with \Q...\E.

Monkey-patching here rather than waiting for upstream, since this is
currently breaking blead g++ smokes.

8 years agoPorting/release_schedule.pod: add july 2015 volunteer
Ricardo Signes [Thu, 18 Jun 2015 13:16:07 +0000 (09:16 -0400)]
Porting/release_schedule.pod: add july 2015 volunteer

8 years agoensure chdir('') sets $! to ENOENT on non-IMP_SYS Win32 builds
Tony Cook [Thu, 18 Jun 2015 04:08:48 +0000 (14:08 +1000)]
ensure chdir('') sets $! to ENOENT on non-IMP_SYS Win32 builds

8 years agostart fleshing out the 5.23 release schedule
Ricardo Signes [Thu, 18 Jun 2015 01:39:07 +0000 (21:39 -0400)]
start fleshing out the 5.23 release schedule

8 years agoSwitch to Unicode Version 8
The Unicode Consortium [Wed, 1 Apr 2015 16:35:39 +0000 (10:35 -0600)]
Switch to Unicode Version 8

8 years agoAdd unicode.org to the AUTHOR file
Karl Williamson [Wed, 17 Jun 2015 22:27:08 +0000 (16:27 -0600)]
Add unicode.org to the AUTHOR file

8 years agoregexec.c: Change \b{sb} rule in prep for Unicode 8.0
Karl Williamson [Wed, 17 Jun 2015 22:25:48 +0000 (16:25 -0600)]
regexec.c: Change \b{sb} rule in prep for Unicode 8.0

Unicode 8 version modifies this rule.

8 years agoPorting/release_schedule.pod: Fix wrong year in dates
Karl Williamson [Wed, 17 Jun 2015 21:46:02 +0000 (15:46 -0600)]
Porting/release_schedule.pod: Fix wrong year in dates

8 years agoMicrooptimize some matches in utf8_heavy.pl
Rafael Garcia-Suarez [Wed, 17 Jun 2015 11:18:59 +0000 (13:18 +0200)]
Microoptimize some matches in utf8_heavy.pl

8 years ago[perl #125305] chdir("") no longer behaves like chdir()
Tony Cook [Wed, 17 Jun 2015 01:10:18 +0000 (11:10 +1000)]
[perl #125305] chdir("") no longer behaves like chdir()

8 years ago[perl #123264] explicitly document the return value of sysopen
Tony Cook [Wed, 17 Jun 2015 00:55:19 +0000 (10:55 +1000)]
[perl #123264] explicitly document the return value of sysopen

8 years agoPerl example style nit in docs for sort()
Rafael Garcia-Suarez [Tue, 16 Jun 2015 10:21:04 +0000 (12:21 +0200)]
Perl example style nit in docs for sort()

Declare both arrays, no need to clear them.

8 years agoadd Martijn Lievaart as a perl author
Tony Cook [Tue, 16 Jun 2015 00:17:47 +0000 (10:17 +1000)]
add Martijn Lievaart as a perl author

8 years agoAvoid gcc warning "‘start’ may be used uninitialized in this function"
Martijn Lievaart [Mon, 15 Jun 2015 07:04:56 +0000 (17:04 +1000)]
Avoid gcc warning "‘start’ may be used uninitialized in this function"

8 years agoperldelta for 1b3ab82cb4bc
Tony Cook [Mon, 15 Jun 2015 01:35:55 +0000 (11:35 +1000)]
perldelta for 1b3ab82cb4bc

8 years agobump $UNIVERSAL::VERSION
Tony Cook [Mon, 15 Jun 2015 01:19:21 +0000 (11:19 +1000)]
bump $UNIVERSAL::VERSION

8 years agoUNIVERSAL no longer exports anything
Karen Etheridge [Sun, 14 Jun 2015 23:24:25 +0000 (16:24 -0700)]
UNIVERSAL no longer exports anything

so switch to documenting something that would still work

8 years agoAdd empty expresion to cpan/.dir-locals.el
Dagfinn Ilmari Mannsåker [Sun, 14 Jun 2015 21:48:40 +0000 (22:48 +0100)]
Add empty expresion to cpan/.dir-locals.el

Without it, loading any file under the directory gives the message
"Error reading dir-locals: (end-of-file)", which is not fatal, but
annoying.

8 years agoUpdate for Pod-Simple customisations
Chris 'BinGOs' Williams [Sat, 13 Jun 2015 19:51:16 +0000 (20:51 +0100)]
Update for Pod-Simple customisations

8 years agoUpdate Pod-Simple to CPAN version 3.30
Chris 'BinGOs' Williams [Sat, 13 Jun 2015 19:45:09 +0000 (20:45 +0100)]
Update Pod-Simple to CPAN version 3.30

  [DELTA]

2015-02-23   David E. Wheeler <david@justatheory.org>
  * Release 3.30
  No changes since 3.29_6.

2015-02-19   David E. Wheeler <david@justatheory.org>
  * Release 3.29_6
  The survey() method in Pod::Simple::Search now ignores duplicat
  files with varying lettercasing on case-insensitive file systems.
  This allows

  When pondering files in a given directory, the survey() method in
  Pod::Simple::Search now prefers files with extensions in the
  following order: no extension, .pod, .pm, .plx, .pl.

  The find() method in Pod::Simple::Search now records the './pod'
  subdirectory of each directory it considers in such a way as to
  preserve its case on the file system.

  The find() method in Pod::Simple::Search now tries harder to find
  the proper file on case-insensitive file systems when searching
  for modules starting with "Pod". For example, when searching for
  'Pod::Perldoc' it now returns a file ending in 'Pod/Perldoc.pm'
  instead of 'Pod/perldoc.pod', as the latter is actually the
  documention for the 'perldoc' program.

2015-02-17   David E. Wheeler <david@justatheory.org>
  * Release 3.29_5
  No changes except that the release tarball should no longer be empty.

2015-02-16   David E. Wheeler <david@justatheory.org>
  * Release 3.29_4
  Removed "Caveats" from the docs. Pod::Simple has been out of beta
  for years.

  The survey() method in Pod::Simple::Search no longer assumes that
  files ending in '.pod' are actually Pod. Like .pm and .pl files,
  .pod files must contains at least one valid POD command, as
  documented. This brings the behavior in line with find(), which
  already required that .pod files contain Pod.

  The survey() method in Pod::Simple::Search now prefers files
  ending in .pod over those ending in .pm, and .pm over those ending
  in .pl, when it finds duplicate pod files for a given name.

2015-02-11   David E. Wheeler <david@justatheory.org>
  * Release 3.29_3
  Tightened up the first pass at recognizing a Pod command so that
  fewer invalid Pod lines will be recognized. Suggested by Randy
  Stauner.

  Fixed bug where Pod::Simple would attempt to call
  utf8::unicode_to_native on Perl 5.6, where that function does not
  exist.

  Typos and minor wordsmithing changes in Pod::Simple::Subclassing,
  thanks to Randy Stauner.

  The Pod::Simple::Search survey() and find() methods now use the same
  code for determining @INC directories to search. The only difference
  is that find() also includes $Config::Config{'scriptdir'}.

8 years agoFix @INC so that "make test" in ext/POSIX passes.
Jarkko Hietaniemi [Sat, 13 Jun 2015 16:07:18 +0000 (12:07 -0400)]
Fix @INC so that "make test" in ext/POSIX passes.

8 years agoTest these functions in more than one spot.
Jarkko Hietaniemi [Sat, 13 Jun 2015 15:47:23 +0000 (11:47 -0400)]
Test these functions in more than one spot.

erf/erfc/tgamma/lgamma are quite complex functions
(and often estimated by polynomials), test them with
more than one value.

8 years agoApparently ldblsize=10 is a real thing.
Jarkko Hietaniemi [Sat, 13 Jun 2015 15:40:00 +0000 (11:40 -0400)]
Apparently ldblsize=10 is a real thing.

(also fix an error in an #error)

8 years agoUpdate autodie to CPAN version 2.27
Chris 'BinGOs' Williams [Fri, 12 Jun 2015 10:58:41 +0000 (11:58 +0100)]
Update autodie to CPAN version 2.27

  [DELTA]

2.27      2015-06-10 19:19:49+10:00 Australia/Melbourne

        * DEPRECATION: Deprecate the use of "Fatal qw(:lexcial)".  It
          is an implementation detail of autodie and is about to
          change.

        * SPEED: Allow wrappers for CORE::exec and CORE::system to be
          reused as they are not dependent on the calling package.

        * TEST: Avoid hard-coded directory separator in t/system.t.
          Thanks to A. Sinan Unur for reporting it and providing a
          patch.  (GH#62)

        * TEST: Add missing "require autodie" in import-into test and
          ensure Import::Into remains an optional test dependency.

        * TEST / INTERNAL / TRAVIS: Set "sudo: false" to gain access
          to the Travis container based infrastructure.

        * TEST: Bump version of Import::Into to 1.002004 as older
          versions are insufficient for our test.  Thanks to
          Olivier Mengué for reporting it.  (RT#101377)

8 years agoUpgrade to threads::shared 1.48
Jerry D. Hedden [Thu, 11 Jun 2015 03:25:20 +0000 (23:25 -0400)]
Upgrade to threads::shared 1.48

8 years agoUpgrade to threads 2.02
Jerry D. Hedden [Thu, 11 Jun 2015 03:03:10 +0000 (23:03 -0400)]
Upgrade to threads 2.02

8 years agoinfnan: Implement NaN payload APIs.
Jarkko Hietaniemi [Tue, 2 Jun 2015 22:09:54 +0000 (18:09 -0400)]
infnan: Implement NaN payload APIs.

Based on the latest ISO/IEC WG draft:
http://www.open-std.org/JTC1/sc22/wg14/www/docs/n1778.pdf
(section 14.10, pp 42,45-47).  There isn't yet an official C1X effort
(these weren't part of C11) so there's no C1X to refer to.

8 years agoinfnan: Notes on the nan payload.
Jarkko Hietaniemi [Thu, 4 Jun 2015 12:09:49 +0000 (08:09 -0400)]
infnan: Notes on the nan payload.

8 years agoinfnan: define NV_NAN_PAYLOAD_MASK and NV_NAN_PAYLOAD_PERM
Jarkko Hietaniemi [Sun, 1 Mar 2015 21:19:13 +0000 (16:19 -0500)]
infnan: define NV_NAN_PAYLOAD_MASK and NV_NAN_PAYLOAD_PERM

MASK: how to mask the nan payload bytes
PERM: how to order the nan payload bytes (0x0 = LSB)

8 years agoinfnan: move the mantbits definitions from perl.h to Configure
Jarkko Hietaniemi [Mon, 2 Mar 2015 01:16:02 +0000 (20:16 -0500)]
infnan: move the mantbits definitions from perl.h to Configure

(this way they will be available via %Config)

8 years agoinfnan: macros for testing and setting nan quiet/signaling
Jarkko Hietaniemi [Sat, 28 Feb 2015 18:04:38 +0000 (13:04 -0500)]
infnan: macros for testing and setting nan quiet/signaling

8 years agoinfnan: introduce NV_NAN_PAYLOAD_BITS
Jarkko Hietaniemi [Fri, 27 Feb 2015 22:17:48 +0000 (17:17 -0500)]
infnan: introduce NV_NAN_PAYLOAD_BITS

8 years agoinfnan: introduce NV_MANT_BITS
Jarkko Hietaniemi [Fri, 27 Feb 2015 21:57:52 +0000 (16:57 -0500)]
infnan: introduce NV_MANT_BITS

(the real bits, not including possible implicit bit)

8 years agoinfnan: new logic for NV_INF and NV_NAN
Jarkko Hietaniemi [Fri, 27 Feb 2015 01:20:41 +0000 (20:20 -0500)]
infnan: new logic for NV_INF and NV_NAN

The global const PL_inf and PL_nan have dual nature:
the .nv has the NV, the .u8 has the bytes.

8 years agoinfnan: Configure scan for fp mantissa bytes
Jarkko Hietaniemi [Thu, 11 Jun 2015 02:05:48 +0000 (22:05 -0400)]
infnan: Configure scan for fp mantissa bytes

8 years agoinfnan: Configure scan for infnan bytes
Jarkko Hietaniemi [Sat, 28 Feb 2015 15:23:06 +0000 (10:23 -0500)]
infnan: Configure scan for infnan bytes

8 years agosv.h: document additional use of SVp_SCREAM flag
David Mitchell [Fri, 12 Jun 2015 11:22:20 +0000 (12:22 +0100)]
sv.h: document additional use of SVp_SCREAM flag

8 years agoUpdate Pod-Usage to CPAN version 1.67
Chris 'BinGOs' Williams [Fri, 12 Jun 2015 08:43:13 +0000 (09:43 +0100)]
Update Pod-Usage to CPAN version 1.67

  [DELTA]

1.67 (marekr)
- added options -perlcmd and -perldoc to allow for non-standard installations
  of perl and the perldoc script. Thanks to Markus Jansen for the patch

1.66 (marekr)
- CPAN#102116: pod2usage() -sections omits section with subsection specified
    added more precise documentation about the -section syntax and semantics
- CPAN#102117: pod2usage() changes formatting
    added documentation to describe what formatting changes pod2usage applies
- CPAN#102101: New tests fail when in core
    changed the way the tests find their dependencies. Thanks to BINGOS for
    the patch, applied in slightly modified way

1.65 (marekr)
- CPAN#81059: [RT #115534]: Pod::Usage Failes to Select -sections with Negation
    fixed a specific corner case for section selection
- CPAN#101538: Pod::Usage doesn't handle E<copy> correctly
    introduced a utf8 option; this may actually not solve the problem, but
    it is the best we can do for the moment
- CPAN#101581: pod2usage() -sections omits marked-up text from =head lines
    make sure that marked-up text is not skipped

8 years agoExporter-5.72 is now on the CPAN
Chris 'BinGOs' Williams [Fri, 12 Jun 2015 08:31:58 +0000 (09:31 +0100)]
Exporter-5.72 is now on the CPAN

8 years agoUpdate Parse-CPAN-Meta to CPAN release 1.4417
Chris 'BinGOs' Williams [Thu, 11 Jun 2015 15:38:00 +0000 (16:38 +0100)]
Update Parse-CPAN-Meta to CPAN release 1.4417

  [DELTA]

1.4417    2015-06-09 16:19:41-06:00 America/Denver

    - No changes from 1.4416

1.4416    2015-05-19 11:11:47-04:00 America/New_York (TRIAL RELEASE)

    [FIXED]

    - Minimum Perl was inadvertently set to v5.10.0.  Now back to v5.8.1.

1.4415    2015-04-28 11:29:52-04:00 America/New_York (TRIAL RELEASE)

    [TESTS]

    - Outputs the version of backends used

    [META]

    - Updated repo metadata and boilerplate files

    - Pointed issue tracker to the Perl-Toolchain-Gang Github repo

8 years agoRegen META files after CPAN-Meta update
Chris 'BinGOs' Williams [Thu, 11 Jun 2015 15:34:35 +0000 (16:34 +0100)]
Regen META files after CPAN-Meta update

Note for future:

Looks like there is an x_serialization now, so if CPAN::Meta::YAML
and/or JSON::PP get updated then these META files will need regenerating
too.

8 years agoUpdate CPAN-Meta to CPAN release 2.150005
Chris 'BinGOs' Williams [Thu, 11 Jun 2015 15:28:11 +0000 (16:28 +0100)]
Update CPAN-Meta to CPAN release 2.150005

  [DELTA]

2.150005  2015-06-09 19:08:44-06:00 America/Denver

  [TESTING]

  - Changed some test data from UTF-8 to ASCII

2.150004  2015-05-19 11:25:53-04:00 America/New_York (TRIAL RELEASE)

  [DOCUMENTED]

  - Noted explicitly that historical META spec files are licensed under
    the same terms as Perl

  [TESTING]

  - Added test for 'x_deprecated' field in "provides"

  [META]

  - declared extra developer prereq

2.150003  2015-04-21 19:41:15-04:00 America/New_York (TRIAL RELEASE)

  [CHANGED]

  - Serialized CPAN::Meta objects now include a x_serialization_backend
    entry

2.150002  2015-04-19 01:00:10+02:00 Europe/Berlin (TRIAL RELEASE)

  [CHANGED]

  - Metadata merging now does deep hash merging as long as keys
    don't conflict

8 years ago[perl #125381] fix -Cnn parsing
Hugo van der Sanden [Thu, 11 Jun 2015 11:25:40 +0000 (12:25 +0100)]
[perl #125381] fix -Cnn parsing

Commit 22ff313068 for [perl #123814] inadvertently changed the logic when
parsing a numeric parameter to the -C option, such that the successfully
parsed number was not saved as the option value if it parsed to the end
of the argument.

8 years agoclean up sv_isobject usage
Daniel Dragan [Sun, 13 Jul 2014 12:20:31 +0000 (08:20 -0400)]
clean up sv_isobject usage

-previous usage proves getmagic is unnecessary or ignored or already called
  S_do_smartmatch
  Perl_sv_does_sv

-in pp_dbmopen dont call sv_isobject twice in a row on the same SV in 1
 permutation

8 years agoUpdate release schedule
Steve Hay [Wed, 10 Jun 2015 07:49:04 +0000 (08:49 +0100)]
Update release schedule

5.22.0 is out; development is now 5.23, leading towards 5.24.0 next May.
5.22.1 is expected sometime around August/September (around the same time
as 5.20.1 was last year).
5.20.3 is expected sometime before then, probably July.

8 years agoperldelta for d484df69ed26
Tony Cook [Wed, 10 Jun 2015 00:23:19 +0000 (10:23 +1000)]
perldelta for d484df69ed26

8 years ago[perl #125347] allow truncate to work on large files on Win32
Tony Cook [Tue, 9 Jun 2015 23:48:09 +0000 (09:48 +1000)]
[perl #125347] allow truncate to work on large files on Win32

truncate($filename, $size) was using a simple PerlIO_open() to open
the file, which on Win32 defaults to a text mode open.

Unfortunately, on a text mode open(), MSVCRT attempts to seek to the
end of file using only 32-bit offsets, which fails.

For good measure, add in O_LARGEFILE if it's available, which may
prevent similar issues on other platforms.

Also, remove the erroneous SETERRNO() added by 375ed12a to the open
failure branch, PerlLIO_open() should already set errno on failure, so
we get sane error messages when the open fails.

8 years agoadd warnings 7fatal testcase for #123398
Reini Urban [Thu, 23 Apr 2015 11:04:05 +0000 (13:04 +0200)]
add warnings 7fatal testcase for #123398

8 years ago[perl #125369] - Set correct flags for smartmatch in certain cases
Matthew Horsfall [Tue, 9 Jun 2015 20:27:40 +0000 (16:27 -0400)]
[perl #125369] - Set correct flags for smartmatch in certain cases

Previously the aslice flags would end up as 255 in this case:

  $ perl -MO=Concise,-debug -e '@nums[0..1] ~~ []' | grep OP_ASLICE -A 2
  Smartmatch is experimental at -e line 1.
  -e syntax OK
   op_ppaddr PL_ppaddr[OP_ASLICE]
   op_type 131
   op_flags 255

Now:

  $ perl -MO=Concise,-debug -e '@nums[0..1] ~~ []' | grep OP_ASLICE -A 2
  Smartmatch is experimental at -e line 1.
  -e syntax OK
   op_ppaddr PL_ppaddr[OP_ASLICE]
   op_type 139
   op_flags 55

8 years agoGCC doesn't understand the -subsystem:console option
Jan Dubois [Tue, 9 Jun 2015 17:56:55 +0000 (10:56 -0700)]
GCC doesn't understand the -subsystem:console option

This issue was introduced in commit 269713a1

Ref https://rt.perl.org/Ticket/Display.html?id=125217

8 years agoPorting/checkAUTHORS.pl: Sort author names using Unicode collation rules
Thomas Sibley [Sun, 15 Feb 2015 19:25:18 +0000 (11:25 -0800)]
Porting/checkAUTHORS.pl: Sort author names using Unicode collation rules

This ensures that authors like Ævar Arnfjörð Bjarmason sort with the As
in perldelta ACKNOWLEDGEMENTS sections.  Previously Ævar appeared at the
end.

8 years agoperldelta for 46b27d2f2c37
Tony Cook [Tue, 9 Jun 2015 02:19:23 +0000 (12:19 +1000)]
perldelta for 46b27d2f2c37

8 years agodon't fatalize warnings during unwinding (#123398)
Lukas Mai [Thu, 12 Feb 2015 12:29:29 +0000 (13:29 +0100)]
don't fatalize warnings during unwinding (#123398)

8 years agoDetect broken AIX fmodl.
Jarkko Hietaniemi [Mon, 8 Jun 2015 23:51:00 +0000 (19:51 -0400)]
Detect broken AIX fmodl.

(observed at least in AIX 6.1)