This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
8 years agopp_entersub(): simplify autoload logic
David Mitchell [Sat, 11 Jul 2015 14:37:11 +0000 (15:37 +0100)]
pp_entersub(): simplify autoload logic

eliminate a label and goto by by just setting cv to null on failure,
and have a single "if (!cv) croak()" test at the end of the loop.

8 years agopp_entersub(): eliminate a label
David Mitchell [Sat, 11 Jul 2015 14:30:38 +0000 (15:30 +0100)]
pp_entersub(): eliminate a label

replace:

  retry:
    if (A) die;
    if (B) {
        ...;
        goto retry;
    }

with

    while (B) {
        ...;
    }

    if (A) die;

it's functionally equivalent except that the A test is now only
tried after we have been successful at B. This is ok, because
A is testing for an uncloned closure prototype, while B is looking
for a CV stub which needs autoloading,and it doesn't rally matter
which we test for first.

8 years agoadd old_tmpsfloor field to CXt_SUB context frame
David Mitchell [Sat, 11 Jul 2015 13:42:56 +0000 (14:42 +0100)]
add old_tmpsfloor field to CXt_SUB context frame

Rather than saving and restoring PL_tmps_floor on subroutine entry/exit
by using SAVETMPS and the save stack, store the old value directly
in the context struct and make PUSHSUB/POPSUB handle the saving and
restoring.

8 years agoPUSH_MULTICALL: move SAVETMPS later
David Mitchell [Sat, 11 Jul 2015 13:16:29 +0000 (14:16 +0100)]
PUSH_MULTICALL: move SAVETMPS later

Move the SAVETMPS to just after the PUSHSUB. This should make no
functional difference, because nothing should have affected the TMPS stack
between the old and the new code positions.

8 years agopp_dbstate: do SAVETMPS etc in both branches
David Mitchell [Sat, 11 Jul 2015 13:04:59 +0000 (14:04 +0100)]
pp_dbstate: do SAVETMPS etc in both branches

pp_dbstate() does an XS or non-XS subroutine call to &DB::DB;
move the SAVETMPS from before the (if CvISXSUB(cv)) test to the head of
both branches. This duplication of code is currently a noop, but will
shortly allow us to handle things differently in the two branches.

8 years agopp_sort: move SAVETMPS later
David Mitchell [Sat, 11 Jul 2015 12:58:47 +0000 (13:58 +0100)]
pp_sort: move SAVETMPS later

Move the SAVETMPS to just after the PUSHSUB. This should make no
functional difference, because nothing should have affected the TMPS stack
between the old and the new code positions.

For the OPf_SPECIAL/ CXt_NULL case, which doesn't do a PUSHSUB,
do another SAVETMPS there too.

8 years agopp_goto: do SAVETMPS etc in XS and non-XS branches
David Mitchell [Sat, 11 Jul 2015 12:45:01 +0000 (13:45 +0100)]
pp_goto: do SAVETMPS etc in XS and non-XS branches

Move a SAVETMPS;SAVEFREESV(cv); from before the "if (CvISXSUB(cv))" test
to the head of both branches. This duplication of code is currently
a NOOP, but will shortly allow us to handle things differently in the two
branches.

8 years agopp_entersub(): move SAVETMPS next to PUSHSUB
David Mitchell [Sat, 11 Jul 2015 12:32:03 +0000 (13:32 +0100)]
pp_entersub(): move SAVETMPS next to PUSHSUB

It it intended that eventually PUSHSUB() will do the SAVETMPS itself,
so move the SAVETMPS up so that it's next to the PUSHSUB.
There should be nothing between those two points that use the TEMPS stack,
so this commit should have no functional effect.

8 years agopp_entersub(): remove an unnecessary condition
David Mitchell [Sat, 11 Jul 2015 12:10:00 +0000 (13:10 +0100)]
pp_entersub(): remove an unnecessary condition

The code that scans the args list making mortal copies is protected by an

    if (LIKELY(hasargs)) {

However, a sub called as "&foo;" (which is how hasargs is determined)
won't have pushed anything on the stack, so the first part of that code
block, "while (svp < SP)", will drop out immediately.

So skip doing the hasargs test.

NB - it's possible in theory for XS code to call call_sv() jn such a way
as to both have !hasargs but with stuff on the stack; in this worst case,
we just waste a bit of time making some mortal copies of those args.

8 years agopp_entersub(): mortal-copy args earlier
David Mitchell [Sat, 11 Jul 2015 11:43:43 +0000 (12:43 +0100)]
pp_entersub(): mortal-copy args earlier

Move the code earlier which makes a mortal copy of any PADTMP args.
This should make no functional difference, but will shortly allow
us to move the SAVETMPS earlier too (while still coming after the
mortal copying).

8 years agopp_leavesub: simplify recursion test
David Mitchell [Sat, 11 Jul 2015 10:49:13 +0000 (11:49 +0100)]
pp_leavesub: simplify recursion test

Part of pp_leavesub() tests whether we're in recursion by looking
at CvDEPTH(cx->blk_sub.cv). Instead, just directly check
cx->blk_sub.olddepth, which is equivalent (allowing for an offset of 1)
but faster.

8 years agoclear_defarray(): clear @_ if possible
David Mitchell [Sat, 11 Jul 2015 10:05:55 +0000 (11:05 +0100)]
clear_defarray(): clear @_ if possible

clear_defarray() is called during sub exit to clean up @_ in the
less common case where @_ has somehow gotten reified.

At the moment it just frees the old @_, then creates a new AV and
sticks it in pad[0].

This commit changes it so that for the reasonably common case of a reified
@_ where it's not magical and only has a reference count of 1, just call
av_clear() on it, rather than freeing and recreating.

Typical code that will benefit from this change is be something like:

    sub f { push @_, ...; ... }

which causes the AV to be reified, but not to become otherwise visible.

8 years agopp_goto(): use clear_defarray()
David Mitchell [Sat, 11 Jul 2015 09:52:49 +0000 (10:52 +0100)]
pp_goto(): use clear_defarray()

In pp_goto(), use the newly-added clear_defarray() function
to the clear the old @_. This ensures that POPSUB() and pp_goto()
do the same thing. Note that clear_defarray() is actually better than
the old pp_goto() code, in that it pre-sizes the newly-created array
to match the size of the array being abandoned.

8 years agoadd Perl_clear_defarray()
David Mitchell [Sat, 11 Jul 2015 09:40:23 +0000 (10:40 +0100)]
add Perl_clear_defarray()

This function implements the less commonly used branch in the POPSUB()
macro that clears @_ in place, or abandons it and creates a new array
in pad slot 0 of the function (the common branch is where @_ hasn't been
reified, and so can be clered simply by setting fill to -1).

By moving this out to a separate function we can avoid repeating the same
code everywhere the POPSUB macro is used; but since its only used
in the less frequent cases, the extra overall of a function call doesn't
matter.

It has a currently unused arg, 'abandon', which will be used shortly.

8 years agoavoid leaking @_ in goto
David Mitchell [Sat, 11 Jul 2015 09:06:39 +0000 (10:06 +0100)]
avoid leaking @_ in goto

pp_goto temporarily bumps the reference count of @_ while doing
LEAVE_SCOPE(), to stop it getting prematurelly freed. If something
dies during the save stack unwinding, it will leak.
Instead, make it mortal.

8 years agogoto.t: add freeing CV test
David Mitchell [Thu, 9 Jul 2015 08:22:38 +0000 (09:22 +0100)]
goto.t: add freeing CV test

This code SEGVed in a cpan/ module while I was messing with pp_goto.
Add it to t/op/goto.t so that it can SEGV there instead.

8 years agopp_goto: do the DIEing before the POPing
David Mitchell [Sun, 5 Jul 2015 09:21:14 +0000 (10:21 +0100)]
pp_goto: do the DIEing before the POPing

Rearrange the beginning of the 'goto &func' part of pp_goto so that it
does most of its error checks (e.g. "Can't goto subroutine from an eval")
before it starts doing "return-ish" stuff. This makes the code slightly
cleaner, especially as it doesn't have to undo the SvREFCNT_inc(cv) guard
in every die branch.

8 years agoeliminate a goto in pp_goto (!)
David Mitchell [Sun, 5 Jul 2015 09:08:25 +0000 (10:08 +0100)]
eliminate a goto in pp_goto (!)

Replace a C-level goto with a while loop: logically equivalent,
but doesn't use a goto. (I know, I know, this is in pp_goto, but even
so...)

8 years agopp_goto: a couple of cosmetic changes
David Mitchell [Fri, 3 Jul 2015 10:40:01 +0000 (11:40 +0100)]
pp_goto: a couple of cosmetic changes

had a lable outdented 2, not 4 chars, and move a comment describing
what a branch does from before to after the 'if'.

8 years agomake POP_SAVEARRAY() safe
David Mitchell [Fri, 3 Jul 2015 10:14:30 +0000 (11:14 +0100)]
make POP_SAVEARRAY() safe

POP_SAVEARRAY() frees the current @_ and restores it to the callers value.
As currently defined, it frees the old AV then updates GvAV(PL_defgv). If
the free old the old AV triggers a destructor for example, then in
theory something bad could happen.

I couldn't actually find a simple failure case, but I suspect that
something like

    sub f { *_ = bless [], 'Foo' }

where Foo::DESTROY is an XS sub that messes with GvAV(PL_defgv), could do
it.

Anyway to play safe, this commit updates the GvAV() slot and *then* frees
the old AV. This our normal modus operandi in other places anyway.

The equivalent code in pp_goto already does this the safe way. This commit
also updates pp_goto to use the (now equivalent) POP_SAVEARRAY() macro.

8 years agot/perf/benchmarks: add a few sub and goto tests
David Mitchell [Thu, 2 Jul 2015 09:14:14 +0000 (10:14 +0100)]
t/perf/benchmarks: add a few sub and goto tests

8 years agopp_entersub: skip resetting @_
David Mitchell [Wed, 1 Jul 2015 19:19:23 +0000 (20:19 +0100)]
pp_entersub: skip resetting @_

Whenever we leave a sub by whatever means (pp_leavesub, pp_return,
pp_goto, die etc) it is the responsibility of the code that pops
the SUB context to clean up the private @_ of that sub (i.e pad[0])
so that it's empty and not real.

There's some code in pp_entersub that duplicates this check. I believe
this check is unnecessary and so this commit removes it and replaces it
with an assert. It was added by 221373f04 in 1999 to fix the issue
described in

    Subject: [ID 19991015.010] [BUG 5.005_62 Assertation failed:
            "pp_ctl.c" line 2443]
    Message-Id: <19991016024500.A32541@athens.aocn.com>

There were two fixes applied for this issue; the other was
0253cb4. I think the second commit actually fixed the issue and the
first fix was a red herring.

If my newly-added assert fails, it implies that something needs fixing in
the context-popping code, rather than in pp_entersub.

In fact the new assert showed up one issue: the special-case handling
of @_ for &CORE::undef in pp_coreargs wasn't emptying the array,
so I added a CLEAR_ARGARRAY().

8 years agoimprove @_ commentary in pp_goto
David Mitchell [Wed, 1 Jul 2015 15:50:53 +0000 (16:50 +0100)]
improve @_ commentary in pp_goto

Following on from the previous commit which removed cx.argarray,
remove 'argarray' from the comments about @_, and at the same time
generally overhaul those comments; in particular, explaining how
it's a two part process of donating the current @_ to the new sub.

8 years agoeliminate the argarray field from the CX struct
David Mitchell [Wed, 1 Jul 2015 12:37:32 +0000 (13:37 +0100)]
eliminate the argarray field from the CX struct

At the end of a normal sub call there are often 3 AVs of interest
associated with @_; these are:

    cx->blk_sub.savearray  the caller's @_
    GvAV(PL_defgv)         the current sub's current @_
    cx->blk_sub.argarray   the current sub's original @_

Note that those last two can differ: if for example the sub does

    local *_ = [];

Each sub's arg array is created and stored in pad slot 0 at the time
the sub is created. When a sub is called, pp_entersub() does

    cx->blk_sub.argarray = PL_curpad[0]

The argarray field is used in two main places:

* at subroutine exit, to clear/abandon the sub's original @_;
* in pp_caller, to set @DB::args to the caller(n)'s args.

In the first case, the last few commits have arranged things so that at
that point, PL_curpad always points to the current pad of the sub being
exited from. So we can just use PL_curpad[0] rather than
cx->blk_sub.argarray.

In the second case (which is not performance critical), we can just use
    cx->blk_sub.cv
and
    cx->blk_sub.olddepth+1
to find the pad of that call frame's CV.

So we can eliminate the argarray field. This saves a write during
a sub call, and potentially reduces the size of the context struct.

It also makes the code marginally less confusing: there are now 3 arrays
pointed to from 3 places, rather than 3 arrays pointed to from 4 places.

The asserts added in the previous commit confirmed that using argarray
is the same as using PL_curpad[0]; They also confirmed that the current
PL_curpad matches the current CV at the current depth. Those latter
asserts are kept for now.

8 years agoassert that it's safe to remove CX.argarray field
David Mitchell [Wed, 1 Jul 2015 11:21:06 +0000 (12:21 +0100)]
assert that it's safe to remove CX.argarray field

This commit adds assertions that demonstrate that the next commit is safe.
See the description of that commit for details.

8 years agoUnwind save stack in sync with POPEVAL
David Mitchell [Wed, 1 Jul 2015 08:57:51 +0000 (09:57 +0100)]
Unwind save stack in sync with POPEVAL

During normal exit from an eval, both POPEVAL and LEAVE are done,
meaning that the context stack and save stack are unwound in lockstep.

However, during an exception, dounwind() does the POPEVAL but not the
LEAVE, leaving them temporarily out of step.

About a 2 years ago, with v5.19.3-139-g2537512, subs and formats were
changed so that the save stack popping was done in sync in dounwind.

This commit extends that to evals too.

I'm doing this principally so that PL_compad will always be restored at
the correct moment, which will shortly allow me to eliminate the argarray
field from the context struct.

NB: unlike POPSUB and POPFORMAT, I've added the LEAVE_SCOPE to dounwind
rather than directly adding to the POPEVAL macro - this is because the
various places that use POPEVAL typically use it earlier than the
comparable places with POPSUB, which means they aren't ready to pop the
save stack yet.

NNB: The LEAVE_SCOPE can't be extended to all context types in dounwind(),
only to sub-ish types - specifically the types that can be 'return'ed from.
This is because if you 'return' from a sub or eval, pp_return will
unwind all contexts down to the next sub or eval (discarding all the loops
etc that it escaping out of), but the args it is returning shouldn't
be prematurely freed.

8 years agopp_goto: skip restoring PL_comppad
David Mitchell [Wed, 1 Jul 2015 06:56:39 +0000 (07:56 +0100)]
pp_goto: skip restoring PL_comppad

Now that PL_comppad is saved in the context struct rather than on the save
stack, we can better control when and how it is restored. In the case of
pp_goto, there's no need to restore the caller's PL_comppad in the non-XS
case, since we will be immediately setting it to the new function's pad.

AS well as being slightly more efficient, this avoids restoring PL_comppad
too early, where if we subsequently croak we re-process the CXt_SUB block
in dounwind, but this time with the wrong pad.

In particular, by having always PL_curpad[0] == cx.argarray at sub exit
time, we can shortly eliminate the argarray field.

8 years agoundef *_; goto &f: update cx.argarray
David Mitchell [Tue, 30 Jun 2015 07:03:43 +0000 (08:03 +0100)]
undef *_; goto &f: update cx.argarray

In something like

    sub f { goto &g }

normally g's pad[0] is updated to hold the passed-across @_, and the
context block's argarray field is updated to point to g's @_ too.

However in the case of

    sub f { undef *_; goto &g }

cx.argarray isn't being updated. This is probably harmless (I couldn't
come up with a test case that fails), but for consistency, update it too.

This is mainly so that over the next few commits, this condition will come
to apply consistently:

    cx.argarray == PL_curpad[0]

and so the argarray field can be eliminated.

8 years agomake "for my $lex {}" faster under ITHREADS
David Mitchell [Mon, 29 Jun 2015 11:33:35 +0000 (12:33 +0100)]
make "for my $lex {}" faster under ITHREADS

Normally at the start of a 'for' iteration (pp_enteriter), we store the
address of the GV or the address of the pad slot of the iteration variable
in the CX struct, so we can quickly access and update it in pp_iter.  For
the ITHREADS case however, the pad may change if the thread is cloned, so
instead the address of PL_comppad was stored, and then updated during
cloning. This meant that on each iter, we would have to retrieve the saved
PL_comppad address from the ctx struct, retrieve the targ from the saved
my_op, and do a (perlish) array indexing.

Thuis commit makes this faster by, for the ITHREADS case, storing both
PL_comppad and svp = &PLcurpad[targ]. In pp_iter(), we're fast by directly
accessing *svp; while storing PL_comppad allows us to update both it and
svp during thread cloning.

This requires one extra pointer in the block_loop part of the context
union under threads, but this is already smaller than some other parts of
the union, so has no effect.

Note that the oldcomppad field was formerly part of the itervar_u union,
but is now a separate field within the larger block_loop struct (but only
on threaded builds).

Note also that the tests I've added I retrieved from an old WIP private
branch that contained a forerunner of this commit, so they may not be
entirely relevant to the current form of this commit. But extra tests
can never hurt, so I've included them.

8 years agoeliminate cx->blk_sub.oldcomppad
David Mitchell [Mon, 29 Jun 2015 11:02:18 +0000 (12:02 +0100)]
eliminate cx->blk_sub.oldcomppad

In the CXt_SUB sub-struct of the context struct, there is a field
called oldcomppad. Despite the "old" in its name, this field actually
stores the value of PL_comppad of the new sub, not of the caller.

It's only use currently is in POPSUB() when abandoning a reified @_, to
locate PL_curpad[0] of the current sub in order to stick a new empty AV
there.  This is a relatively rare occurrence, and the pad slot can be
found (slightly less efficiently) from the saved CV and its depth.

8 years agodocument unrolled PUSHSUB/POPSUB
David Mitchell [Mon, 29 Jun 2015 10:36:27 +0000 (11:36 +0100)]
document unrolled PUSHSUB/POPSUB

some places in the code do some or all of the same activities as
PUSHSUB() and POPSUB(). Add comments in those places pointing out that
it's a partially unrolled PUSH/POPSUB(). This will also help if someone
greps the code looking for all the places in core that supposedly does
a PUSH/POPSUB.

8 years agosave old PL_comppad in CXt_SUB/FORMAT block
David Mitchell [Mon, 29 Jun 2015 10:27:36 +0000 (11:27 +0100)]
save old PL_comppad in CXt_SUB/FORMAT block

Currently when we call a sub, the old value of PL_comppad is
saved on the save stack using SAVECOMPPAD(). Instead, save it in
a new field in the context struct, called prevcomppad. This is simpler
and more efficient.

Note that there is already a confusingly-named field in the CXt_SUB
context struct called oldcomppad, which holds the value of PL_comppad for
the *current* sub, not for its caller. So the new field had to be called
something else.

One side effect of this is that an existing bug  - which causes too much
to be popped off the savestack when dieing while leaving a sub scope - is
now more noticeable, since PL_curpad and SAVEt_CLEARSV are now out of
sync: formerly, the unwinding of the save stack restored PL_curpad in
lockstep. The fix for this will come later in this branch, when the whole
issue of context stack popping order and reentrancy is addressed; for
now, a TODO test has been added.

8 years agopp_entersub: remove extraneous SAVETMPS
David Mitchell [Fri, 26 Jun 2015 11:17:59 +0000 (12:17 +0100)]
pp_entersub:  remove extraneous SAVETMPS

The branch that handles "no cv, try autoload" does a SAVETMPS.
This serves no purpose, since we will shortly be doing another SAVETMPS
anyway with no intervening ENTER.

8 years agopp_goto: SvREFCNT_dec(oldcv) *after* undef test
David Mitchell [Thu, 25 Jun 2015 15:08:02 +0000 (16:08 +0100)]
pp_goto: SvREFCNT_dec(oldcv) *after* undef test

pp_goto does a LEAVE, then checks that the new CV hasn't been undefed
by the LEAVE. If it has, it croaks.

Move the decrementing of the old CV's ref count and depth to *after*
this check, since the POPSUB done during the croak unwind will do the
decrement also. Otherwise the old sub will be doubly freed.

8 years agopp_goto(): reorder LEAVE_SCOPE for consistency
David Mitchell [Thu, 25 Jun 2015 14:18:25 +0000 (15:18 +0100)]
pp_goto(): reorder LEAVE_SCOPE for consistency

pp_leavesub (via POPSUB()) does a LEAVE_SCOPE before decrementing the CV's
ref count and depth; pp_goto does it after. Reorder it for consistency
with leavesub.

At this point I make no assertion as to which way round is the most
correct.

8 years agopp_goto: use cx->blk_oldscopesp
David Mitchell [Thu, 25 Jun 2015 14:08:37 +0000 (15:08 +0100)]
pp_goto: use cx->blk_oldscopesp

POPSUB() does:

    LEAVE_SCOPE(PL_scopestack[cx->blk_oldscopesp - 1])

while pp_goto(), which manually does the relevant actions from POPSUB(),
does:

    LEAVE_SCOPE(PL_scopestack[PL_scopestack_ix - 1])

For consistency, make pp_goto() use cx->blk_oldscopesp instead.  In fact
at that point they should both hold the same value (and I've added an
assert to that effect), since we should have just popped any nested
scopes.

8 years agoSvREFCNT_inc(cv) recursive subs
David Mitchell [Thu, 25 Jun 2015 11:05:50 +0000 (12:05 +0100)]
SvREFCNT_inc(cv) recursive subs

A CXt_SUB context frame owns 1 reference count to the CV being called,
but only if it's the bottom-level call to that CV; recursive calls don't
count.

This commit changes it so that every CXt_SUB frame owns a reference count.

This removes a lot of "if (CvDEPTH(cv) < 2)" type tests from the code and
makes things generally simpler and less bug-prone.

For ordinary (non-recursive) sub calls it will now be slightly faster, as
it no longer has to do the CvDEPTH check on sub entry and exit; for subs
being recursed into, it will probably be slightly slower, as although it
no longer has to the CvDEPTH check on entry and exit, it now has to do a
refcnt ++/-- instead.

This also means that a deeply recursing sub will have a very high ref
count; but there is no new additional danger of overflow, as sv_refcnt is
U32 while xcv_depth is I32: so the latter will still overflow earlier
anyway.

8 years agoeliminate an SAVEFREESV(cv) from PUSHSUB
David Mitchell [Thu, 25 Jun 2015 09:48:58 +0000 (10:48 +0100)]
eliminate an SAVEFREESV(cv) from PUSHSUB

When a CXt_SUB context is pushed, the reference count of the CV is
increased (and is effectively owned by that context frame). It is
decremented when the context frame is popped.

There was an issue in that the POPSUB was done before the LEAVE,
which meant that at sub exit, the sub could be freed before stuff that
referred to that sub was done (such as lexicals being cleaned up by
SAVEt_CLEARSV).

This was fixed by perl-5.005_02-2095-gb0d9ce3, which split POPSUB
into POPSUB and LEAVESUB with the latter responsible for the decrement.
So for example code might do POPSUB; LEAVE; LEAVSUB.

However this wasn't sufficient, because a similar thing happened during
die, for example

    sub d {die}
    my $f;
    $f = sub {my $x=1; $f = 0; d};
    eval{ $f->() };

since all *all* the CXt_SUB contexts were popped with POPSUB/LEAVSUB
*before* LEAVE was called.

I fixed this with perl-5.8.0-3206-gb36bdec, by adding another increment to
the CV and doing a SAVEFREESV(cv), both in PUSHSUB. This meant that
the save stack would hold at least one reference to the CV while being
unwound.

However, v5.19.3-139-g2537512 then changed things so that POPSUB also
did a LEAVE. This means that now, die unwinds the context stack and the
save stack in lockstep, so my second fix is now redundant. So this commit
undoes it, saving an rc++/-- and SAVEFREE(cv) per sub call.

8 years ago[perl #126544] correct the first example in the fcntl documentation
Tony Cook [Wed, 3 Feb 2016 04:23:19 +0000 (15:23 +1100)]
[perl #126544] correct the first example in the fcntl documentation

8 years agoperldelta for 23c4e91245a4
Tony Cook [Wed, 3 Feb 2016 03:52:00 +0000 (14:52 +1100)]
perldelta for 23c4e91245a4

8 years ago[perl #125540] handle already being at EOF while not finding a heredoc terminator
Tony Cook [Wed, 20 Jan 2016 04:35:13 +0000 (15:35 +1100)]
[perl #125540] handle already being at EOF while not finding a heredoc terminator

In some cases, S_scan_heredoc() can already be at end of file and
PL_rsfp is NULL.  If we're on the final line and that line has no
newline we'd assert or crash.

Now, if we don't find that newline, we obviously can't find the
terminator, so go straight to reporting the missing terminator.

I considered setting s to PL_bufend, but that would just be more
work to print the same message.

8 years agoClarify sprintf() handling of + and space flags
Tony Cook [Wed, 3 Feb 2016 00:35:28 +0000 (11:35 +1100)]
Clarify sprintf() handling of + and space flags

Also with contribution by Chas. Owens.

For: RT #125471

8 years agoperldelta for 8452c1a03e174
Tony Cook [Tue, 2 Feb 2016 06:04:17 +0000 (17:04 +1100)]
perldelta for 8452c1a03e174

8 years ago[perl #127351] add isaelem magic on *Foo::ISA = arrayref
Tony Cook [Tue, 26 Jan 2016 04:53:34 +0000 (15:53 +1100)]
[perl #127351] add isaelem magic on *Foo::ISA = arrayref

8 years ago[perl #127351] TODO tests for arrayref assigned to *Foo::ISA issues
Tony Cook [Tue, 26 Jan 2016 04:22:46 +0000 (15:22 +1100)]
[perl #127351] TODO tests for arrayref assigned to *Foo::ISA issues

8 years agoop.c: update comment about compiler warnings
Lukas Mai [Mon, 1 Feb 2016 22:42:08 +0000 (23:42 +0100)]
op.c: update comment about compiler warnings

8 years agoREADME.android: make the POD a bit nicer
Lukas Mai [Mon, 1 Feb 2016 22:11:57 +0000 (23:11 +0100)]
README.android: make the POD a bit nicer

8 years ago[perl #127426] fixes for 126045 patch, restrict to MSVC, add casts
Tony Cook [Mon, 1 Feb 2016 02:22:53 +0000 (13:22 +1100)]
[perl #127426] fixes for 126045 patch, restrict to MSVC, add casts

8 years agoperldelta for 6f6d1bab334
Tony Cook [Mon, 1 Feb 2016 00:43:50 +0000 (11:43 +1100)]
perldelta for 6f6d1bab334

8 years ago[perl #126045] part revert e9b19ab7 for vc2003 and earlier
Tony Cook [Thu, 28 Jan 2016 04:08:01 +0000 (15:08 +1100)]
[perl #126045] part revert e9b19ab7 for vc2003 and earlier

This avoids an internal compiler error on VC 2003 and earlier

8 years agoPerlIO::encoding: explicitly cast char * to STDCHAR *
Lukas Mai [Sun, 31 Jan 2016 12:14:29 +0000 (13:14 +0100)]
PerlIO::encoding: explicitly cast char * to STDCHAR *

This should avoid the "pointer targets in assignment differ in
signedness" warning that pops up in some configurations.

8 years agoTweaks to podlators integration.
Craig A. Berry [Sat, 30 Jan 2016 23:25:05 +0000 (17:25 -0600)]
Tweaks to podlators integration.

It's only perlpodstyle that we can't build the man page for since
it lives in the top-level pod/ directory. Plus there was a new test
that I had missed in the integration.

8 years agoensure isASCII argument is an integer
Lukas Mai [Fri, 29 Jan 2016 23:46:59 +0000 (00:46 +0100)]
ensure isASCII argument is an integer

This catches bugs such as the one fixed in commit dcf88e34.

8 years agoperlop: fix broken example by deleting it [perl #119667]
Lukas Mai [Sat, 30 Jan 2016 23:40:36 +0000 (00:40 +0100)]
perlop: fix broken example by deleting it [perl #119667]

8 years agoutil.c: fix/simplify unused arg logic in my_vsnprintf
Lukas Mai [Sat, 30 Jan 2016 23:16:53 +0000 (00:16 +0100)]
util.c: fix/simplify unused arg logic in my_vsnprintf

8 years agomg.c: move declaration of i closer to its use
Lukas Mai [Sat, 30 Jan 2016 23:14:11 +0000 (00:14 +0100)]
mg.c: move declaration of i closer to its use

This should avoid the "unused variable 'i'" warning that pops up in some
configurations.

8 years agoVMS does have the siginfo_si_* fields.
Craig A. Berry [Sat, 30 Jan 2016 20:37:01 +0000 (14:37 -0600)]
VMS does have the siginfo_si_* fields.

At least they are in the siginfo struct, though oddly, SA_SIGINFO
doesn't exist so they won't do much good.  However, adding them
now means that if SA_SIGINFO shows up in the future they will be
tested immediately and not overlooked.

8 years agoUpdate utils commands in configure.com.
Craig A. Berry [Sat, 30 Jan 2016 20:34:25 +0000 (14:34 -0600)]
Update utils commands in configure.com.

We don't have psed any more but we do have json_pp and perlthanks.

8 years agoIntegrate podlators 4.05.
Craig A. Berry [Thu, 28 Jan 2016 19:44:07 +0000 (13:44 -0600)]
Integrate podlators 4.05.

8 years agoEscape t/test.pl got vs expected strings
Karl Williamson [Fri, 11 Sep 2015 18:37:27 +0000 (12:37 -0600)]
Escape t/test.pl got vs expected strings

This is so that controls, etc. are visible.

See http://nntp.perl.org/group/perl.perl5.porters/230927

8 years agoAdd STATICs to S_ functions.
Jarkko Hietaniemi [Fri, 29 Jan 2016 23:33:47 +0000 (18:33 -0500)]
Add STATICs to S_ functions.

8 years agoDo not export no text symbols starting with S_.
Jarkko Hietaniemi [Fri, 29 Jan 2016 23:24:51 +0000 (18:24 -0500)]
Do not export no text symbols starting with S_.

8 years agoperlhacktips: fix / properly break example of bad pointer access
Lukas Mai [Sat, 30 Jan 2016 00:02:03 +0000 (01:02 +0100)]
perlhacktips: fix / properly break example of bad pointer access

8 years agoFix umask for mkstemp(3) calls
Niko Tyni [Thu, 21 Jan 2016 16:17:32 +0000 (18:17 +0200)]
Fix umask for mkstemp(3) calls

With commit v5.21.0-67-g60f7fc1, perl started setting umask to 0600
before calling mkstemp(3), and then restoring it afterwards. This is
wrong as it tells open(2) to strip the owner read and write bits from
the given mode before applying it, rather than the intended negation of
leaving only those bits in place.

On modern systems which call open(2) with mode 0600 in mkstemp(3),
this clears all the created temporary file permissions. However,
any systems that use mode 0666 in mkstemp(3) (like ancient versions
of glibc) now create a file with permissions 0066, leaving world
read and write permission regardless of current umask.

Using umask 0177 instead fixes this.

Bug: https://rt.perl.org/Ticket/Display.html?id=127322

8 years agoregexec.c: Macro needs param to be dereferenced
Karl Williamson [Fri, 29 Jan 2016 18:53:10 +0000 (11:53 -0700)]
regexec.c: Macro needs param to be dereferenced

This is a potential bug, but didn't show up, as real addresses are
always going to be larger than 128, and hence the macro here would show
false, and the code only used true to short circuit some other code, so
it always would take the long way.

8 years agoutf8.c: Add cast to suppress a warning message
Karl Williamson [Fri, 29 Jan 2016 17:32:26 +0000 (10:32 -0700)]
utf8.c: Add cast to suppress a warning message

This is showing up in HP-UX, e.g.
http://perl5.test-smoke.org/report/43423

8 years agoSkip SA_SIGINFO uid/pid test on POSIX-deficient OS X versions
Dagfinn Ilmari Mannsåker [Fri, 29 Jan 2016 10:39:31 +0000 (10:39 +0000)]
Skip SA_SIGINFO uid/pid test on POSIX-deficient OS X versions

8 years agoperlretut: typo correction
Herbert Breunung [Thu, 28 Jan 2016 23:07:23 +0000 (18:07 -0500)]
perlretut: typo correction

8 years agofix op/infnan.t test fails with NAN conversion on VC 6
Daniel Dragan [Tue, 26 Jan 2016 07:27:49 +0000 (02:27 -0500)]
fix op/infnan.t test fails with NAN conversion on VC 6

fixes
ok 443 - NAN is NaN numerically (by not being NaN)
ok 444 - NAN value stringifies as NaN
ok 445 - nan is NaN numerically (by not being NaN)
not ok 446 - nan value stringifies as NaN
ok 447 - qnan is NaN numerically (by not being NaN)
not ok 448 - qnan value stringifies as NaN
ok 449 - SNAN is NaN numerically (by not being NaN)
not ok 450 - SNAN value stringifies as NaN
ok 451 - NanQ is NaN numerically (by not being NaN)
not ok 452 - NanQ value stringifies as NaN
ok 453 - NANS is NaN numerically (by not being NaN)
not ok 454 - NANS value stringifies as NaN
ok 455 - 1.\#QNAN is NaN numerically (by not being NaN)
not ok 456 - 1.\#QNAN value stringifies as NaN
ok 457 - +1\#SNAN is NaN numerically (by not being NaN)
not ok 458 - +1\#SNAN value stringifies as NaN
ok 459 - -1.\#NAN is NaN numerically (by not being NaN)
not ok 460 - -1.\#NAN value stringifies as NaN
ok 461 - 1\#IND is NaN numerically (by not being NaN)
not ok 462 - 1\#IND value stringifies as NaN
ok 463 - 1.\#IND00 is NaN numerically (by not being NaN)
not ok 464 - 1.\#IND00 value stringifies as NaN
ok 465 - NAN(123) is NaN numerically (by not being NaN)
not ok 466 - NAN(123) value stringifies as NaN
ok 467 - NaN is not lt zero
ok 468 - NaN is not == zero
ok 469 - NaN is not gt zero
ok 470 - NaN is not lt NaN
ok 471 - NaN is not gt NaN

Caused by commit 230ee21f3e from ~5.23.5. Add special casing for VC6.

The NV to IV casts on VC are a function call called __ftol, skip executing
the NV to IV casts if the logic test tests will follow "TARGn" branch
because the NV and IV values are !=.

8 years agoUpgrade Encode from version 2.79 to 2.80
Steve Hay [Wed, 27 Jan 2016 08:28:33 +0000 (08:28 +0000)]
Upgrade Encode from version 2.79 to 2.80

8 years agoext/POSIX/lib/POSIX.pod: Make verbatim line fit in 79 cols
Karl Williamson [Thu, 28 Jan 2016 02:49:44 +0000 (19:49 -0700)]
ext/POSIX/lib/POSIX.pod: Make verbatim line fit in 79 cols

8 years agoutf8.c: Add missing 'STATIC' to declaration
Karl Williamson [Thu, 28 Jan 2016 02:38:57 +0000 (19:38 -0700)]
utf8.c: Add missing 'STATIC' to declaration

8 years ago[perl #127183] Non-canonical hexadecimal floats are parsed prematurely
Jarkko Hietaniemi [Tue, 26 Jan 2016 03:17:09 +0000 (22:17 -0500)]
[perl #127183] Non-canonical hexadecimal floats are parsed prematurely

5.22.1 regression from 5.22.0.

Rewriting the hexfp fractional digits parsing to handle the
trickiness of having to ignore both the leading and trailing
zero bits when determining how many bits were actually given.

8 years agofix a race condition in parallel builds with Visual C
Daniel Dragan [Tue, 26 Jan 2016 10:24:07 +0000 (05:24 -0500)]
fix a race condition in parallel builds with Visual C

On older VCs a "gmake -j2 ..\generate_uudmap.exe ..\perlglob.exe" will
generate warnings, on newer VCs, a fatal error in 1 or the other cl.exe
process. This is because both cl.exes are trying to lock and write to
vc*0.pdb, the same file. Add PDBOUT option so uudmap and perlglob have
their own pdb files named after themselves and they cant conflict in a
parallel build.

8 years agofix link failure of APItest.dll on VC 6
Daniel Dragan [Tue, 26 Jan 2016 05:02:56 +0000 (00:02 -0500)]
fix link failure of APItest.dll on VC 6

alloca is the newer "standardized" name which modern VCs support.
In VC 6, only _alloca exists, which is the prestandardized name, use it to
fix a linker failure.

8 years agoRevert "[perl #126632] more diagnostics"
Tony Cook [Tue, 26 Jan 2016 21:54:15 +0000 (08:54 +1100)]
Revert "[perl #126632] more diagnostics"

This reverts commit ef18391745841fb1df298cec3a3001be4237fb3d.

This commit was intended only to diagnose Jenkins build issues, I now
have better access to Jenkins (and the new diagnostics didn't tell me
much anyway.)

8 years agoProbe for and expose more fields for SA_SIGINFO
Dagfinn Ilmari Mannsåker [Tue, 12 Jan 2016 14:47:07 +0000 (14:47 +0000)]
Probe for and expose more fields for SA_SIGINFO

These are all specified by POSIX/SUSv3, but not all platforms have them,
as mentioned in POSIX.pm.

We can only test the pid, uid and code fields, since they are the only
ones that are defined for a user-sent signal.

8 years agoAdd SA_SIGINFO 'code' constants to POSIX
Dagfinn Ilmari Mannsåker [Fri, 15 Jan 2016 14:45:01 +0000 (14:45 +0000)]
Add SA_SIGINFO 'code' constants to POSIX

Mention them in the sigaction documentation, and document the 'addr'
field.

8 years agoperlipc.pod: Fix typo
Steve Hay [Tue, 26 Jan 2016 08:43:06 +0000 (08:43 +0000)]
perlipc.pod: Fix typo

8 years agoUse vmstrnenv() to look up PERL5LIB/PERLLIB on VMS.
Craig A. Berry [Tue, 26 Jan 2016 02:45:39 +0000 (20:45 -0600)]
Use vmstrnenv() to look up PERL5LIB/PERLLIB on VMS.

We have, for a long time, only considered logical names when
looking for values of PERL5LIB. However, this makes us miss values
stored in the environ array (such as when happens when Perl is
invoked from bash) or as DCL symbols.

So make looking up PERL5LIB and PERLLIB use the lower level routine
that will look up values using the same search order as all other
environment handling in Perl, while still handling a list of paths
as a search list logical if that's where the value is stored.

N.B.  There is no change to the default path separator here, only
to lookup method.

8 years agoLimit index arg to logicals in vmstrnenv().
Craig A. Berry [Tue, 26 Jan 2016 02:19:55 +0000 (20:19 -0600)]
Limit index arg to logicals in vmstrnenv().

vmstrnenv looks in the environ array, the DCL symbol table, and/or
the logical names pointed to by LNM$FILE_DEV, depending on the
setting of PERL_ENV_TABLES.  Its index parameter, however, only
makes sense with logical names, and when returning one element of
a search list logical. So return 0 indicating a failed lookup when
passed a non-zero index and what we found is not a logical name.

Without this, the natural idiom of iterating over index values to
get the elements of a search list could get us stuck in an endless
loop if the item we are looking for does exist but is not a
logical name.

8 years ago[perl #126632] more diagnostics
Tony Cook [Mon, 25 Jan 2016 21:37:37 +0000 (08:37 +1100)]
[perl #126632] more diagnostics

Some of this will be removed once we work out what's going on.

8 years agoMove email alias from AUTHORS to checkAUTHORS.pl
Dagfinn Ilmari Mannsåker [Mon, 25 Jan 2016 16:29:25 +0000 (16:29 +0000)]
Move email alias from AUTHORS to checkAUTHORS.pl

Ed J is already in AUTHORS with a real email address, mark the
noreply.github.com one as an alias of that.

8 years ago[perl #121351] Remove non-doio.c uses of PL_statbuf
Dagfinn Ilmari Mannsåker [Sun, 17 Jan 2016 15:52:30 +0000 (15:52 +0000)]
[perl #121351] Remove non-doio.c uses of PL_statbuf

These are the last remaining uses outside the interwoven mess in
S_openn_cleanup, openn_setup, and their callers in doio.c.

8 years agoPorting/Miantainers.pl update following changes in 273df2b189...538ad527dc
Steve Hay [Mon, 25 Jan 2016 13:47:54 +0000 (13:47 +0000)]
Porting/Miantainers.pl update following changes in 273df2b189...538ad527dc

(ExtUtils::CBuilder was also modified, but we probably don't need to keep
tabs on the changes there since it's upstream => blead anyway:
t/porting/customized.dat only lists changed files under cpan/, and EU::CB
already had (unlisted) modified files.)

8 years agoUpgrade Encode from version 2.78 to 2.79
Steve Hay [Mon, 25 Jan 2016 08:49:24 +0000 (08:49 +0000)]
Upgrade Encode from version 2.78 to 2.79

This removes two of the blead "customizations", which were actually only
differences in the "$Id:" line, but the third (encoding.pm) has to stay
because the file hasn't otherwise changed so removing the "customization"
would be a change with no $VERSION bump, which causes
t/porting/cmp_version.t to fail. Sigh.

8 years ago[perl #126632] improve diagnostics for the comctl32 test
Tony Cook [Mon, 25 Jan 2016 10:18:16 +0000 (21:18 +1100)]
[perl #126632] improve diagnostics for the comctl32 test

8 years agoperldelta for 273df2b1892a ... 273df2b1892
Tony Cook [Mon, 25 Jan 2016 01:21:48 +0000 (12:21 +1100)]
perldelta for 273df2b1892a ... 273df2b1892

8 years agoAdd parallel build and MSVC support for the gmake makefile
Tony Cook [Mon, 25 Jan 2016 01:05:26 +0000 (12:05 +1100)]
Add parallel build and MSVC support for the gmake makefile

8 years agobump $XS::APItest::VERSION
Tony Cook [Mon, 25 Jan 2016 01:00:53 +0000 (12:00 +1100)]
bump $XS::APItest::VERSION

8 years agoXS DLLs shouldn't have comctl32.dll manifest in them, they dont link to it
Daniel Dragan [Wed, 20 Jan 2016 15:38:21 +0000 (10:38 -0500)]
XS DLLs shouldn't have comctl32.dll manifest in them, they dont link to it

The manifestdependency flag caused on VC 2005 and up for all XS DLLs to
include a manifest that references common controls v6 DLL, even though
nothing but perl5**.dll and perl-static.exe would ever link to
comctl32.dll. VC 2005 to VC 2008 put manifests in all DLLs since those
VC version's CRTs require manifests to load, all other VCs generate
.rsrc section free, and manifest free, DLLs by default. The
/manifestdependency flag passed to VC linker for all XS DLL, was causing
52 KB of bloat in disk size of the DLLs, and perhaps a little bit of CPU
to parse the manifest XML when the XS DLL is loaded.

Add a test to make sure the manifest for V6 isn't accidentally broken and
V5 gets loaded instead.

Note this commit leaves a little bit of unequal handling of the comctl
manifest between VC and GCC builds. VC >= 2005 builds with this patch will
add a manifest to perl523.dll and build helpers (not installed)
perlglob.exe and generate_uudmap.exe while GCC builds only manifest
perl.exe and wperl.exe.

With a VC 2013 32b build, before
C:\p523\src>dir /s *.dll
              55 File(s)      7,858,688 bytes

After
C:\p523\src>dir /s *.dll
              55 File(s)      7,805,440 bytes

8 years agowin32/GNUmakefile collapse shell echos into one liners
Daniel Dragan [Mon, 4 Jan 2016 19:20:14 +0000 (14:20 -0500)]
win32/GNUmakefile collapse shell echos into one liners

Previously each line was 1 shell process launch. By grouping all the echos
together, CPU and IO are saved by doing alot less cmd.exe process launches.
makefile.mk does the same thing already. See #126632 for benchmark details.

8 years agoadd MSVC support to win32/GNUmakefile
Daniel Dragan [Wed, 20 Jan 2016 17:03:32 +0000 (12:03 -0500)]
add MSVC support to win32/GNUmakefile

-copy things from makefile.mk to GNUmakefile
-rework CFG_VARS to escape "s. Previously on gmake GCC builds, all "s
 inside the CFG_VARS vars were dropped from Config_heavy.pl due to
 command line parsing (dmake uses --cfgsh-option-file and a temp file,
 nmake escapes). Due to gmake's very poor temp file handling, keep it as
 a cmd line and dont convert it to a temp file. What vars to escape was
 modeled on the nmake makefile.

8 years agoadd parallelness to win32/GNUmakefile
Daniel Dragan [Tue, 5 Jan 2016 11:05:32 +0000 (06:05 -0500)]
add parallelness to win32/GNUmakefile

-.UPDATEALL is dmake only, doesn't exist in gmake, create more targets
 instead
GNUmakefile:1319: warning: overriding recipe for target '.UPDATEALL'
GNUmakefile:1024: warning: ignoring old recipe for target '.UPDATEALL'
-fix ok/nok targets on dmake and gmake
-dont delete old mini config.h, the copy overwrites it, for dmake and gmake
 1 less process to run this way
-modify whitespace and comments between 2 makesfiles so there are less
 delta lines if the 2 are diffed, this aids in diagnostics
-remove perlmainst.c/perlmain.c build products, just use runperl.c directly
 1 less disk file to create and later clean and git status and 2 less nodes
 in the make graph to traverse, also better for C debugger, since
 "runperl.c" is around after a git clean of the source tree, and runperl.c
 is in every single callstack in perl.
-remove copying mini config.h to CORE dir, pointless since (mini) config.h
 isn't an input to config_h.PL, remove the exit 1 from commit 137443ea0a
 from 5.003, rewriting config.h is not a reason to stop the build with a
 fatal error, vivify CORE dir or else sub copy() fails
-deshell UNIDATAFILES/mktables, 1 less cmd.exe process and 1 less .bat file
 written to disk for gmake (dmake always uses cmd.exe ATM)
-combining mini config.h AKA $(MINIDIR)\.exists shell append lines is for
 another commit
-perlglob.exe is not installed, it doesn't need to be rebased, it is only
 needed for module building, removing the dep makes the dep graph simpler
-rename PERLIMPLIB so the lib is built in its final location in CORE dir
 this removes an extra xcopy process run. Since perl dll's .a/.lib
 is not longer in the root of the source tree, change the 2 tests and
 ExtUtils::CBuilder::Platform::Windows to look at the uninstalled final
 location dir, not the root dir
-fix typo 0.282224->0.280224 in dist/ExtUtils-CBuilder/Changes
-for GCC PERLEXPLIB must be used, passing "perldll.def" on cmd line to g++
 means all data globals with EXTCONST are exported (which have dllexport
 on their declaration) instead of just what is in perldll.def and
 globvar.sym, INTERN/EXTERN.h could be revised to fix that, but I am not
 doing that at this time. Also drop linking GCC perl523.dll from 3
 processes to just 1 process like with VC builds. Removing 2nd run of
 dlltool fixes a race condition where libperl523.a was generated twice.
 This caused a race condition failure where linking a XS DLL failed
 because the GCC linker of the XS DLL saw a partially written
 libperl523.a.
-Relocation was tested with $(LINK32) -v -mdll -o $@
 -Wl,--disable-auto-image-base -Wl,--image-base -Wl,0x400000
 $(BLINK_FLAGS) $(PERLDLL_OBJ) $(shell @type Extensions_static)
 $(LIBFILES) $(PERLEXPLIB)
 to g++ linker to force an address conflict and verified with VMMap
 (unrelocated perl523.dll has ~40KB private memory, relocated has ~240KB
 private memory on Win 7 32b), historically there are problems with
 dllexport and dlltool and relocation problems with mingw
-$(COREDIR)\ppport.h in gmake is separate lines since gmake normally
 launches processes directly, not through the shell, so it is more
 efficent to keep it as multiple lines for gmake, while dmake likes to
 burn CPU and IO between each line, and runs each line through cmd.exe
-disable parallel building in make_ext.pl by not passing MAKEFLAGS env
 var to any subprocess, EUMM is not ready for parallelness inside a module
 building on Win32
-have harness proc and child .t procs share same disk perl.exe and
 perl523.dll files, this way they share memory pages, makefile.mk does
 the same thing

8 years agobackport EUMM commits
Daniel Dragan [Wed, 23 Dec 2015 06:10:59 +0000 (01:10 -0500)]
backport EUMM commits

-commit "Cache is_make_type" and "Optimise is_make_type RE" stops 40
 executions of "gmake.exe -v" process for each Makefile.PL run, these 40
 make process launches make it it very difficult to debug make_ext.pl
 and the make tool with a system call logger, see Perl RT #123440 ticket
 for details

-commit "Win32 gmake needs SHELL to be specified" allows Win32 perl to be
 built with gmake, if msysgit is in the PATH env var, without this patch
 gmake will use bash as the shell instead of cmd.exe and no EUMM modules
 can be built during a Win32 perl build, since bash and cmd.exe command
 line strings are not compatible with each other, see Perl RT #123440
 ticket for details

8 years agot/echo.t needs SHELL env for Win32 gmake
bulk88 [Sun, 27 Dec 2015 20:31:13 +0000 (15:31 -0500)]
t/echo.t needs SHELL env for Win32 gmake

Win32 gmake prefers "sh.exe" (IE bash) over "cmd.exe" if it finds sh.exe
in PATH. Win32 Git usually comes with sh.exe. Running sh.exe causes
problems and isn't a supported build config for native (not Cygwin)
Win32 perl. See also
https://rt.perl.org/Public/Bug/Display.html?id=123440#txn-1374997

Fixes
---------------------------------
ok 8 - something.txt exists
not ok 9 - contents#   Failed test 'contents'
#   at t/echo.t line 69.
#          got: '$
# '
#     expected: '$something$
# '
# Testing variables escaped
# Temp dir: C:\Users\Owner\AppData\Local\Temp\gGwL2kl3Oh
ok 10 - make: variables escaped

8 years agoWin32 gmake needs SHELL to be specified
Sisyphus [Tue, 30 Dec 2014 01:56:58 +0000 (12:56 +1100)]
Win32 gmake needs SHELL to be specified

Signed-off-by: Ed J <mohawk2@users.noreply.github.com>
8 years agoOptimise is_make_type RE
Ed J [Mon, 19 Jan 2015 13:09:09 +0000 (13:09 +0000)]
Optimise is_make_type RE

8 years agoCache is_make_type
Ed J [Mon, 19 Jan 2015 00:17:31 +0000 (00:17 +0000)]
Cache is_make_type

8 years agoPutting the core into corelist
Chris 'BinGOs' Williams [Sun, 24 Jan 2016 00:27:45 +0000 (00:27 +0000)]
Putting the core into corelist