This is a live mirror of the Perl 5 development currently hosted at
7 years agoUpdate Compress-Raw-Zlib to CPAN version 2.066
Chris 'BinGOs' Williams [Sat, 27 Sep 2014 12:03:48 +0000 (13:03 +0100)]
Update Compress-Raw-Zlib to CPAN version 2.066


  2.066 21 Sept 2014

      * Another COW violation

      * misleading nesting/indentation (found by Coverity)

7 years agoUpdate Compress-Raw-Bzip2 to CPAN version 2.066
Chris 'BinGOs' Williams [Sat, 27 Sep 2014 12:01:06 +0000 (13:01 +0100)]
Update Compress-Raw-Bzip2 to CPAN version 2.066


2.066 21 Sept 2014

      * No Changes

7 years agocpan/IO-Socket-IP: Skip a test that almost always fails on Win32.
George Greer [Sat, 27 Sep 2014 03:49:55 +0000 (23:49 -0400)]
cpan/IO-Socket-IP: Skip a test that almost always fails on Win32.

CPAN RT#98976

7 years agoMake DB_File compile under clang++.
Craig A. Berry [Sat, 27 Sep 2014 02:09:12 +0000 (21:09 -0500)]
Make DB_File compile under clang++.

Follow-up to 7f15aad6d6ce55cb.  Also noted upstream at

the necessity of, when rolling one's own dNOOP, to do everything
the core dNOOP does.

7 years agoA little help for clang++ in toke.c
Craig A. Berry [Fri, 26 Sep 2014 22:31:58 +0000 (17:31 -0500)]
A little help for clang++ in toke.c

This was failing to compile with Apple LLVM version 6.0 like so:

toke.c:6558:13: error: no member named 'Perl_rv2cv_op_cv' in 'gv';
                       did you mean simply 'Perl_rv2cv_op_cv'?
                                : (CV *)gv

7 years agoSome NV_TO_FV fixes following fdb7e3a630fea81.
Craig A. Berry [Fri, 26 Sep 2014 21:34:51 +0000 (16:34 -0500)]
Some NV_TO_FV fixes following fdb7e3a630fea81.

I had missed the case where we pull an argument off the stack with
va_arg, and in order to avoid calling va_arg twice we now have to
save the double value in a local variable.  Moved SvNV out of this
macro so it's dealing exclusively with C types.

t/op/infnan.t is now passing all tests on VMS for the ordinary
double case (not -Duselongdouble).

7 years agoperldiag typo
Father Chrysostomos [Fri, 26 Sep 2014 20:58:39 +0000 (13:58 -0700)]
perldiag typo

7 years agoAlphabetise perldiag
Father Chrysostomos [Fri, 26 Sep 2014 20:57:58 +0000 (13:57 -0700)]
Alphabetise perldiag

7 years agoConsistent spaces after dots in perldiag
Father Chrysostomos [Fri, 26 Sep 2014 20:57:32 +0000 (13:57 -0700)]
Consistent spaces after dots in perldiag

7 years agoTru64: introduce PERL_SYS_FPU_INIT, use it.
Jarkko Hietaniemi [Wed, 24 Sep 2014 20:23:11 +0000 (16:23 -0400)]
Tru64: introduce PERL_SYS_FPU_INIT, use it.

In Tru64 the cc -ieee enables the IEEE math but disables traps.
We need to reenable the "invalid" trap because otherwise generation
of NaN values leaves the IEEE fp flags in bad state, leaving any further
fp ops behaving strangely (Inf + 1 resulting in zero, for example).

7 years agoTru64: Floating-point rounding control.
Jarkko Hietaniemi [Mon, 22 Sep 2014 11:49:46 +0000 (07:49 -0400)]
Tru64: Floating-point rounding control.

7 years agoTru64: Do not undef c99_isunordered.
Jarkko Hietaniemi [Mon, 22 Sep 2014 12:29:22 +0000 (08:29 -0400)]
Tru64: Do not undef c99_isunordered.

7 years agoTru64 nan() function broken.
Jarkko Hietaniemi [Mon, 22 Sep 2014 14:49:58 +0000 (10:49 -0400)]
Tru64 nan() function broken.

Exists in libm, but no proto or man page, probably for a reason.
Return values seem to be garbage, or at least not NaN.

Also add a todo for the nan() payload.

7 years agoTru64: NaN comparison quite broken.
Jarkko Hietaniemi [Mon, 22 Sep 2014 00:21:15 +0000 (20:21 -0400)]
Tru64: NaN comparison quite broken.

Too much Microsoft compatibility?

7 years agoTru64: Skip tests that for some reason grind Tru64 to a halt.
Jarkko Hietaniemi [Sun, 21 Sep 2014 22:36:14 +0000 (18:36 -0400)]
Tru64: Skip tests that for some reason grind Tru64 to a halt.

fold_grind and pat_psycho finishe but take several minutes as opposed
to other re tests which take seconds; uniprops grinds for even longer
but eventually runs out of memory (ulimit mem ~0.5GB) (failing)

There probably should be a more centralized/general way of doing
this with the core tests: either 'on this $^O, skip these tests'
(to avoid crowding the BEGIN of each test with $^O testing),
or a more generalized watchdog system (if this test takes more
than N sec, bail out -- probably should not be a hard failure as
such by default, given slow systems), or some combination thereof.

7 years agoMention Future in perl5220delta
Father Chrysostomos [Fri, 26 Sep 2014 20:43:52 +0000 (13:43 -0700)]
Mention Future in perl5220delta

7 years agoAdd Data::Alias to known_pod_issues.dat
Father Chrysostomos [Fri, 26 Sep 2014 20:40:04 +0000 (13:40 -0700)]
Add Data::Alias to known_pod_issues.dat

7 years agoMention Data::Alias in perl5220delta
Father Chrysostomos [Fri, 26 Sep 2014 20:13:39 +0000 (13:13 -0700)]
Mention Data::Alias in perl5220delta

7 years ago[perl #122845] Crash in recursion with ‘our’ vars
Father Chrysostomos [Fri, 26 Sep 2014 19:51:06 +0000 (12:51 -0700)]
[perl #122845] Crash in recursion with ‘our’ vars

‘our’ vars don’t use their pad slots, so when a sub is cloned the
value ends up being null.  We can’t do a SvPADTMP check on null, so
the check that 14d91147 added needs to be qualified.

7 years ago9d491117 missed one spot.
Jarkko Hietaniemi [Fri, 26 Sep 2014 14:47:18 +0000 (10:47 -0400)]
9d491117 missed one spot.

7 years agoPOSIX math: FP_ROUND, not FE_ROUND.
Jarkko Hietaniemi [Fri, 26 Sep 2014 02:11:16 +0000 (22:11 -0400)]

7 years agoPOSIX math: Match FE_ and FLT_ROUNDS with the GNU defaults.
Jarkko Hietaniemi [Fri, 26 Sep 2014 01:55:02 +0000 (21:55 -0400)]
POSIX math: Match FE_ and FLT_ROUNDS with the GNU defaults.

(The C99 defines no preferred values.)

7 years agoPOSIX math: map FLT_ROUNDS to C99 values.
Jarkko Hietaniemi [Thu, 25 Sep 2014 22:32:16 +0000 (18:32 -0400)]
POSIX math: map FLT_ROUNDS to C99 values.

(And try FLT_ROUNDS last.)

7 years agoPOSIX math: default to fail, no default.
Jarkko Hietaniemi [Thu, 25 Sep 2014 22:30:43 +0000 (18:30 -0400)]
POSIX math: default to fail, no default.

7 years agoMicro-optimise some hot code
Rafael Garcia-Suarez [Fri, 26 Sep 2014 13:44:44 +0000 (15:44 +0200)]
Micro-optimise some hot code

that was pointed to me by a profile generated with Devel::NYTProf

7 years agosv.c:S_sv_setnv: Cast SvPOK to bool
Father Chrysostomos [Thu, 25 Sep 2014 20:07:40 +0000 (13:07 -0700)]
sv.c:S_sv_setnv: Cast SvPOK to bool

On older compilers that don’t have stdbool.h, SvPOK is ‘false’ because
(SVf_POK & 0xff) == 0.

7 years agoinfnan: infnan-ness is unlikely.
Jarkko Hietaniemi [Thu, 25 Sep 2014 14:51:43 +0000 (10:51 -0400)]
infnan: infnan-ness is unlikely.

7 years agoinfnan: in pack, first test for the unlikely infnan-ness.
Jarkko Hietaniemi [Thu, 25 Sep 2014 14:47:14 +0000 (10:47 -0400)]
infnan: in pack, first test for the unlikely infnan-ness.

Also make the type I32, not char.

7 years agoSpecify NI_NUMERICSERV for getnameinfo.
Craig A. Berry [Thu, 25 Sep 2014 12:25:18 +0000 (07:25 -0500)]
Specify NI_NUMERICSERV for getnameinfo.

Waiting to be merged upstream: see CPAN RT#98217.

7 years agoIn autodie's truncate.t, close $tmpfile before opening again.
Craig A. Berry [Thu, 25 Sep 2014 12:12:30 +0000 (07:12 -0500)]
In autodie's truncate.t, close $tmpfile before opening again.

Waiting to be merged upstream: see CPAN RT#96609.

7 years agoSentence a verb.
Jarkko Hietaniemi [Thu, 25 Sep 2014 13:11:23 +0000 (09:11 -0400)]
Sentence a verb.

7 years agoinfnan: perldiag entries fixing, add "in pack" to one message.
Jarkko Hietaniemi [Thu, 25 Sep 2014 12:18:23 +0000 (08:18 -0400)]
infnan: perldiag entries fixing, add "in pack" to one message.

7 years agoRMG - RCs are now listed in perlhist
Steve Hay [Thu, 25 Sep 2014 08:02:16 +0000 (09:02 +0100)]
RMG - RCs are now listed in perlhist

7 years agoRMG - Remove out-of-date instruction about epigraph link
Steve Hay [Thu, 25 Sep 2014 08:00:08 +0000 (09:00 +0100)]
RMG - Remove out-of-date instruction about epigraph link

Thanks to the revelation of the X-List-Archive header (see 70d95cc994) we
no longer need to add the epigraph link on the day after.

7 years agoRMG - Even RCs these days generally get an epigraph
Steve Hay [Thu, 25 Sep 2014 07:56:35 +0000 (08:56 +0100)]
RMG - Even RCs these days generally get an epigraph

7 years agoRMG - Note why it is that MAINT is version-bumped late rather than early
Steve Hay [Thu, 25 Sep 2014 07:53:32 +0000 (08:53 +0100)]
RMG - Note why it is that MAINT is version-bumped late rather than early

Thanks to Nicholas Clark for pulling this reasoning from his memory banks.

7 years agoregcomp.c: fix fencepost error in vFAIL at end of pattern
Yves Orton [Mon, 22 Sep 2014 23:36:34 +0000 (01:36 +0200)]
regcomp.c: fix fencepost error in vFAIL at end of pattern

If RExC_parse was after RExC_end we passed a negative length
into the UTF8f macro/format, which then triggered asserts.

As part of this we add a new diagnostic to show when a
(?(condition)...) construct has gone unterminated, and tests for
the unterminated case, thus testing that vFAIL works properly
at the end of the string at the same time.

7 years agoadd an assert that the length arg for UTF8f is non-negative
Yves Orton [Mon, 22 Sep 2014 23:34:27 +0000 (01:34 +0200)]
add an assert that the length arg for UTF8f is non-negative

If we dont we will just hit a different more confusing assert
later. In production builds we zero elen so the args is assumed

7 years agorestore color to debug diagnostics
Yves Orton [Mon, 22 Sep 2014 14:38:58 +0000 (16:38 +0200)]
restore color to debug diagnostics

7 years agort 122283 - do not recurse into GOSUB/GOSTART when not SCF_DO_SUBSTR
Yves Orton [Fri, 19 Sep 2014 17:57:34 +0000 (19:57 +0200)]
rt 122283 - do not recurse into GOSUB/GOSTART when not SCF_DO_SUBSTR

See also comments in patch. A complex regex "grammar" like that in
RT 122283 causes perl to take literally forever, and exhaust all
memory during the pattern optimization phase.

Unfortunately I could not track down exacty why this occured, but
it was very clear that the excessive recursion was unnecessary and
excessive. By simply eliminating the unncessary recursion performance
goes back to being acceptable.

I have not thought of a good way to test this change, so this patch
does not include any tests. Perhaps we can test it using alarm, but
I will follow up on that later.

7 years agoBump $Errno::VERSION for previous commits
Steve Hay [Wed, 24 Sep 2014 08:14:28 +0000 (09:14 +0100)]
Bump $Errno::VERSION for previous commits

7 years agoErrno parsing: Skip expressions containing function names etc
Steve Hay [Wed, 24 Sep 2014 08:13:26 +0000 (09:13 +0100)]
Errno parsing: Skip expressions containing function names etc

Expressions containing a function name are no more eval()able than
expressions which are just a function name, so skip them too. This also
picks up on text in the expression and stops eval()s from whining about
"String found where operator expected" on Win32 (with VC10) on expressions
like L"\\Enlistment\\" and (sizeof(L"\\Enlistment\\")+(38*sizeof(WCHAR))),
encountered when parsing ENLISTMENT_OBJECT_PATH and

7 years agoErrno parsing: Don't match hex numbers in parts of function names
Steve Hay [Wed, 24 Sep 2014 07:53:39 +0000 (08:53 +0100)]
Errno parsing: Don't match hex numbers in parts of function names

This stops __stdcall being seen as a hex number and turned into __stdca.
Also include _ in the pattern to match function names so that that gets
skipped anyway.

7 years agoTweak Errno parsing some more
Steve Hay [Wed, 24 Sep 2014 07:25:24 +0000 (08:25 +0100)]
Tweak Errno parsing some more

This requires there to be something present in the "0xcafebabe" part of
the "((type)0xcafebabe)" (et alia) pattern, otherwise it can end up
matching things that it shouldn't. (The "type" part is already required
to be non-empty.)

7 years agoImprove Errno parsing of Win32 output
Steve Hay [Tue, 23 Sep 2014 12:51:32 +0000 (13:51 +0100)]
Improve Errno parsing of Win32 output

This allows us to pluck "0xC038000FL" rather than "(0xC038000FL" out of
"(DWORD)(0xC038000FL)", which means we go into the hex case rather than
the eval case, and get the desired result (hex '0xC038000F' returns
3224895503, whereas eval '(0xC038000F' returns nothing).

Also allows for "((DWORD)(0xC038000FL))" and other existing formats.

7 years agoRemove most uses of PADMY
Father Chrysostomos [Tue, 23 Sep 2014 13:24:50 +0000 (06:24 -0700)]
Remove most uses of PADMY

SVs_PADMY is now 0, and SvPADMY means !SvPADTMP.

7 years agoPeek.t should not expect PADMY under 5.21.5
Father Chrysostomos [Tue, 23 Sep 2014 13:12:05 +0000 (06:12 -0700)]
Peek.t should not expect PADMY under 5.21.5

7 years agoStop setting PADMY; renumber PADSTALE
Father Chrysostomos [Tue, 23 Sep 2014 03:25:29 +0000 (20:25 -0700)]
Stop setting PADMY; renumber PADSTALE

The PADMY flag was originally used on values stored in pads as a way
to mark those slots ase being in use already during pad allocation.
That changed for the most part all the way back in bbce6d6978
(perl5.003_09), but vestiges still remained, because some ops used
PADMY for their targets.  I removed the last one yesterday in
14d91147.  So the PADMY flag now serves no purpose.

At run time, the sole purpose of PADMY is to determine the meaning of
the flag bit shared by PADTMP and PADSTALE.  If PADMY is set, the flag
means the latter.  Instead of that more complicated check, we can just
renumber PADSTALE to use the PADMY bit and assume that anything not

This commit changes the flags and does just enough to get
tests passing (except Peek.t).

fixup for padmy flag renumbering

7 years agoConsistent spaces after dots in perlmodstyle
Father Chrysostomos [Thu, 25 Sep 2014 04:59:58 +0000 (21:59 -0700)]
Consistent spaces after dots in perlmodstyle

7 years agoLong verbatim lines in perlmodstyle
Father Chrysostomos [Thu, 25 Sep 2014 04:52:41 +0000 (21:52 -0700)]
Long verbatim lines in perlmodstyle

7 years agoAdd Ed J to AUTHORS
Father Chrysostomos [Thu, 25 Sep 2014 04:50:53 +0000 (21:50 -0700)]

7 years agoperlmod and perlstyle improvements
Ed J [Tue, 16 Sep 2014 06:06:23 +0000 (07:06 +0100)]
perlmod and perlstyle improvements

• Outward links for perlmod
• Tweak perlmodstyle version notes
• Link perlnewmod to perlmodstyle

7 years agoUnify the nok setting for better optimizer chances.
Jarkko Hietaniemi [Thu, 25 Sep 2014 01:17:01 +0000 (21:17 -0400)]
Unify the nok setting for better optimizer chances.

Suggested by bulk88.  Also comment tweaks.

7 years agoperlpolicy: clarify that bans related to RT as well as p5p
Ricardo Signes [Thu, 25 Sep 2014 00:21:17 +0000 (20:21 -0400)]
perlpolicy: clarify that bans related to RT as well as p5p

7 years agoThreaded fix, and logic cleanup.
Jarkko Hietaniemi [Wed, 24 Sep 2014 23:48:13 +0000 (19:48 -0400)]
Threaded fix, and logic cleanup.

7 years agoIf we already know it's infnan, no need to Atof again.
Jarkko Hietaniemi [Wed, 24 Sep 2014 11:29:09 +0000 (07:29 -0400)]
If we already know it's infnan, no need to Atof again.

7 years agoinfnan: more math tests, and make int(infnan) return infnan.
Jarkko Hietaniemi [Wed, 24 Sep 2014 01:04:21 +0000 (21:04 -0400)]
infnan: more math tests, and make int(infnan) return infnan.

Though one could argue int(inf) returning nan, too.
Depends on whether you glare at the "inf" or "int".

7 years agoIncrease $XS::APItest::VERSION to 0.65
Father Chrysostomos [Wed, 24 Sep 2014 07:40:23 +0000 (00:40 -0700)]
Increase $XS::APItest::VERSION to 0.65

7 years agoAdd flags to cv_name; allow unqualified retval
Father Chrysostomos [Wed, 24 Sep 2014 07:37:58 +0000 (00:37 -0700)]
Add flags to cv_name; allow unqualified retval

One of the main purposes of cv_name was to provide a way for CPAN mod-
ules easily to obtain the name of a sub.  As written, it was not
actually sufficient, as some modules, such as Devel::Declare, need an
unqualified name.

So I am breaking compatibility with 5.21.4 (which introduced cv_name,
but is only a dev release) by adding a flags parameter.

7 years agoembed.fnc: cv_name is documented
Father Chrysostomos [Wed, 24 Sep 2014 07:22:29 +0000 (00:22 -0700)]
embed.fnc: cv_name is documented

7 years agoMention Data::Util in perl5220delta
Father Chrysostomos [Wed, 24 Sep 2014 02:57:29 +0000 (19:57 -0700)]
Mention Data::Util in perl5220delta

so that ticket #122834 can be closed.

7 years agoVMS does not have lc_monetary_2008 items in lconv.
Craig A. Berry [Wed, 24 Sep 2014 03:12:27 +0000 (22:12 -0500)]
VMS does not have lc_monetary_2008 items in lconv.

7 years agoperldelta: reword prev. commit’s entry for clarity
Father Chrysostomos [Wed, 24 Sep 2014 01:06:19 +0000 (18:06 -0700)]
perldelta: reword prev. commit’s entry for clarity

7 years agooptimize pp_length for simple PVs
Daniel Dragan [Tue, 23 Sep 2014 22:19:32 +0000 (18:19 -0400)]
optimize pp_length for simple PVs

Previously in pp_length, for non-magic, non-utf8 PVs, a number of
conditional branches based on bitfield testing had to execute, and finally
the length of a non-utf8 SVPV was fetched with sv_len_utf8_nomg.
sv_len_utf8_nomg checks SvUTF8, and if false, use the len from
SvPV_nomg_const call in sv_len_utf8_nomg. Note in pp_length,
SvPV_nomg_const already exists for the "use bytes" branch.

After this patch, a !SvGMAGICAL && (!SvUTF8  || use_bytes) SV will take
only 1 conditional branch and no func calls before reaching sv_setiv.
svflags is reused for the mg_get test since partially masked svflags will
already be in a register vs fetching the whole flags from SV head again.

SETS(TARG) was factored out from all the SETI/SETTARG macros. If targ is
not set/written to (the PL_sv_undef branch), do not check/call for
set magic on it, just return from the opcode. Also a putback was removed
since the operand SV is replaced inplace on Perl stack with a SV with IV
length in it.

For profiling info, profiling stats, and rejected implementations see
[perl #122835]

7 years agoMake pack-as-int/sprintf-%c-ing/chr-ring inf/nan fatal.
Jarkko Hietaniemi [Tue, 23 Sep 2014 17:41:08 +0000 (13:41 -0400)]
Make pack-as-int/sprintf-%c-ing/chr-ring inf/nan fatal.

In pack: No point in trying to return all-bit-off/all-bits-one
because inf/-inf/nan really don't map sensibly into integers.

In printf-%c/chr: while U+FFFD would be an option, better to die
on such weird input.

pack-as-fp still works, sprintf-numeric still works.

Make t/op/infnan.t to be less fragile about the number of expected tests.

7 years agoTighter space allocation for floating point stringify.
Jarkko Hietaniemi [Tue, 23 Sep 2014 20:07:21 +0000 (16:07 -0400)]
Tighter space allocation for floating point stringify.

7 years agogv.h: Use PERL_BITFIELD32 for the bitfield
Father Chrysostomos [Tue, 23 Sep 2014 20:09:13 +0000 (13:09 -0700)]
gv.h: Use PERL_BITFIELD32 for the bitfield

See <>.

7 years agoinfnan: set POK for inf/nan, and don't use ~50 PV bytes for inf/nan.
Jarkko Hietaniemi [Tue, 23 Sep 2014 15:27:42 +0000 (11:27 -0400)]
infnan: set POK for inf/nan, and don't use ~50 PV bytes for inf/nan.

7 years agoOPpLVAL_INTRO: not used by pos substr vec
David Mitchell [Tue, 23 Sep 2014 15:44:43 +0000 (16:44 +0100)]
OPpLVAL_INTRO: not used by pos substr vec

These three ops apparently don't use this private flag, so mark them as
such. Also add a comment explaining what OPpLVAL_INTRO means.

7 years agoConsistent spaces after dots in perlop
Father Chrysostomos [Tue, 23 Sep 2014 05:47:55 +0000 (22:47 -0700)]
Consistent spaces after dots in perlop

7 years agoAdd GPFLAGS and GPf_* to B
Father Chrysostomos [Tue, 23 Sep 2014 05:09:34 +0000 (22:09 -0700)]
Add GPFLAGS and GPf_* to B

7 years agoAIX doesn't set the length in getsockopt.
Jarkko Hietaniemi [Tue, 23 Sep 2014 12:17:47 +0000 (08:17 -0400)]
AIX doesn't set the length in getsockopt.

[perl #120835] and [rt #91183] and [rt #85570]

Seen errors in blead smoke in AIX 6.1:

cpan/IO-Socket-IP/t/18fdopen .................................. Argument
"\0\0\0^A\0\0\0r\0\0\0\0\0\0\0\0?M-^U\0\0M-^E^[^???\0^N\0..." isn't
numeric in numeric eq (==) at ../../lib/IO/Socket/ line 748.

cpan/IO-Socket-IP/t/31nonblocking-connect-internet ............ Argument
"\0\0\0\0\0\0\0\0?\0\n^B1?\0\0\0^B\0^BM-\rf?^H?\0^N\0^B?|..." isn't
numeric in scalar assignment at ../../lib/IO/Socket/ line 707.

7 years agoAvoid mixing Inf/NaN with IV/UV.
Jarkko Hietaniemi [Tue, 23 Sep 2014 01:37:38 +0000 (21:37 -0400)]
Avoid mixing Inf/NaN with IV/UV.

It really makes no sense to ask what's the IV/UV of this Inf/NaN,
or turn on the IOK/UV flags (private or public).

7 years agoMove the VC6 "broken-nan" define from win32.h to perl.h.
Jarkko Hietaniemi [Tue, 23 Sep 2014 01:18:28 +0000 (21:18 -0400)]
Move the VC6 "broken-nan" define from win32.h to perl.h.

7 years agot/re/speed.t: adjust watchdog timeout
David Mitchell [Tue, 23 Sep 2014 09:18:05 +0000 (10:18 +0100)]
t/re/speed.t: adjust watchdog timeout

Thus is based on measuring it on a raspberry pi, which is about the
slowest thing on earth.

7 years agoIncrease $B::VERSION to 1.52
Father Chrysostomos [Tue, 23 Sep 2014 04:56:15 +0000 (21:56 -0700)]
Increase $B::VERSION to 1.52

7 years agoStop flip from returning the same scalar each time
Father Chrysostomos [Tue, 23 Sep 2014 04:48:48 +0000 (21:48 -0700)]
Stop flip from returning the same scalar each time

sub f {
  for my $n (1..5) {
    my $x = \scalar($n == 2 .. $n == 4);
    $_ = $x if $n == 1;
    print "$n: $$_\n";
  print("-----\n"), f() if @_


2: 1
3: 2
4: 3E0

When f() is called, it evaluates a flipflop five times.  It takes a
reference to the return value the first time, and prints that same
scalar for each iteration.

Notice how the very same scalar is returned each time in the outer sub
call, but the recursive call hides that implementation detail.

.. should not be returning the same scalar each time, or at least that
implementation detail should not leak through.  (Most operators do
reuse the same scalar, but the scalar is flagged such that \ will copy
it, hiding that fact.)

This was happening because of the eccentric way that the flipflop
targets are allocated in the pad.  They are allocated as PADMY (i.e.,
like ‘my’ variables), but without a name.  pad_push (which creates a
new pad for recursion) assumes that anything without a name is PADTMP
instead (copy on reference).  So the recursive call behaves correctly.

I am not sure why the targets were allocated with PADMY to begin with.
(This goes back to perl 5.000.)  But now the PADMY prevents the tar-
gets from being shared with other ops under USE_PAD_RESET builds.

The better way to allocate these targets is to use PADMY as before,
but actually give those slots names.  The target that gets returned
needs to be marked PADTMP, so we also need to copy that flag
in pad_push.

7 years agogv.h: Make gp_line and gp_flags into a bitfield
Father Chrysostomos [Tue, 23 Sep 2014 04:45:26 +0000 (21:45 -0700)]
gv.h: Make gp_line and gp_flags into a bitfield

This reduces the allocated size on Windows, where an
extra header is added to what gets allocated.  See

7 years agoPeek.t: Drop 5.8 support
Father Chrysostomos [Mon, 22 Sep 2014 15:31:09 +0000 (08:31 -0700)]
Peek.t: Drop 5.8 support

There is no reason these tests need to run on such an old version
any more, and this is getting in the way of something I am trying
to do.

7 years agoPOSIX math: add todo about the macro interface emulations.
Jarkko Hietaniemi [Mon, 22 Sep 2014 13:25:42 +0000 (09:25 -0400)]
POSIX math: add todo about the macro interface emulations.

7 years agoFurther tweaking for bad skip() usage.
Jarkko Hietaniemi [Mon, 22 Sep 2014 18:51:01 +0000 (14:51 -0400)]
Further tweaking for bad skip() usage.

See also e96513a2.

7 years agoNo point in pack 'w' for inf/nan.
Jarkko Hietaniemi [Mon, 22 Sep 2014 01:53:24 +0000 (21:53 -0400)]
No point in pack 'w' for inf/nan.

(For inf, the existing code already did this, slowly.)

7 years agoPATCH: [perl #122252] international currency formatting (POSIX.1-2008)
Andrew Fresh [Wed, 9 Jul 2014 10:30:00 +0000 (03:30 -0700)]
PATCH: [perl #122252] international currency formatting (POSIX.1-2008)

Add the new portions of locale currency formatting that are specified in

The commiter (Karl Williamson) made the trivial indentation changes
asked for by H. Merijn Brand, and added a perldelta entry

7 years agoglobvar.sym: include PL_ prefix in names
David Mitchell [Mon, 22 Sep 2014 15:20:18 +0000 (16:20 +0100)]
globvar.sym: include PL_ prefix in names

By prepending 'PL_' to each line in globvar.sym, it
a) makes slightly simpler,
b) makes it easier to spot all usage of a particular var when you
   do 'git grep PL_foo'

7 years agocreate t/re/speed.t, t/re/speed_thr.t
David Mitchell [Mon, 22 Sep 2014 14:57:52 +0000 (15:57 +0100)]
create t/re/speed.t,  t/re/speed_thr.t

Some tests in re/pat.t are specifically expected to run very slowly if
certain optimisations break.

Move them into their own test file, along with a watchdog()

(There are probably some more tests that could be moved, but these are
the ones I'm aware of, principally because I wrote them.)

7 years agoSvFLAGS: informally reserve a bit
David Mitchell [Mon, 22 Sep 2014 14:19:50 +0000 (15:19 +0100)]
SvFLAGS: informally reserve a bit

SvFAKE is currently unused on HVs, so I'm marking it as mine.
Hopefully it will eventually get used for vtables on HVs.

I've also improved the description of SVs_TEMP.

7 years agoFix distclean for "pm_to_blib directly" extensions.
Craig A. Berry [Sun, 21 Sep 2014 22:36:27 +0000 (17:36 -0500)]
Fix distclean for "pm_to_blib directly" extensions.

The values of the %pm hash already have ../../ prepended, so we
were trying to remove, for example, ../../../../lib/
instead of ../../lib/

This fixes [perl #122820] wherein it was reported that a distclean
make left some build products under lib/.

7 years agoMissing "by" noticed by James Keenan.
Jarkko Hietaniemi [Mon, 22 Sep 2014 01:17:11 +0000 (21:17 -0400)]
Missing "by" noticed by James Keenan.

7 years agoNo re module if only miniperl built.
Jarkko Hietaniemi [Sun, 21 Sep 2014 23:01:22 +0000 (19:01 -0400)]
No re module if only miniperl built.

7 years agoHook::LexWrap is a valid pod link
Father Chrysostomos [Mon, 22 Sep 2014 00:21:56 +0000 (17:21 -0700)]
Hook::LexWrap is a valid pod link

7 years agoMention Hook::LexWrap in perl5220delta
Father Chrysostomos [Mon, 22 Sep 2014 00:20:59 +0000 (17:20 -0700)]
Mention Hook::LexWrap in perl5220delta

so that I can close the RT ticket (#122757).

7 years agoregen pod issues
Father Chrysostomos [Mon, 22 Sep 2014 00:17:34 +0000 (17:17 -0700)]
regen pod issues

In this case it’s fine for both to have the same title, since only
one gets installed.

7 years agoAdd perl5220delta.pod to Porting/
Father Chrysostomos [Sun, 21 Sep 2014 23:19:47 +0000 (16:19 -0700)]
Add perl5220delta.pod to Porting/

Just the template so far.  This gives us a place to accumulate a list
of broken modules (under Known Problems).

7 years agopp.h: Remove SETsv and SETsvUN
Father Chrysostomos [Sun, 21 Sep 2014 19:52:59 +0000 (12:52 -0700)]
pp.h: Remove SETsv and SETsvUN

With commit 6f1401dc2a, most of the old overload macros stopped being
used.  d4f7673c78 removed them.  SETsv and SETsvUN were only used
by the removed macros, and are now completetly unused in core
and on CPAN.

7 years agoComments on unpack 'D' and long doubles formats.
Jarkko Hietaniemi [Sun, 21 Sep 2014 20:17:06 +0000 (16:17 -0400)]
Comments on unpack 'D' and long doubles formats.

7 years agoConsistent spaces after dots in perlapi
Father Chrysostomos [Sun, 21 Sep 2014 07:29:09 +0000 (00:29 -0700)]
Consistent spaces after dots in perlapi

7 years agoGuard against bad skip() arguments, swapped (15ed07b0) or extra.
Jarkko Hietaniemi [Sun, 21 Sep 2014 00:41:31 +0000 (20:41 -0400)]
Guard against bad skip() arguments, swapped (15ed07b0) or extra.

7 years agoNegation of "-e1" no more todo.
Jarkko Hietaniemi [Sat, 20 Sep 2014 22:38:10 +0000 (18:38 -0400)]
Negation of "-e1" no more todo.

7 years agoFix -"-e1".
Jarkko Hietaniemi [Sat, 20 Sep 2014 23:45:35 +0000 (19:45 -0400)]
Fix -"-e1".

Was broken by ae776a2c.

7 years agoThe number to skip is the second argument to skip().
Craig A. Berry [Sat, 20 Sep 2014 23:01:58 +0000 (18:01 -0500)]
The number to skip is the second argument to skip().

Which is difficult to remember and impossible to verify if you
aren't actually skipping anything.