This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
7 years agoAdd perldelta for POSIX memory leak fix
Yves Orton [Mon, 20 Jun 2016 20:43:11 +0000 (22:43 +0200)]
Add perldelta for POSIX memory leak fix

7 years agoperldelta for Unicode 9.0
Karl Williamson [Tue, 21 Jun 2016 15:39:59 +0000 (09:39 -0600)]
perldelta for Unicode 9.0

7 years agoUse Unicode 9.0
Unicode Consortium [Thu, 9 Jun 2016 22:28:27 +0000 (16:28 -0600)]
Use Unicode 9.0

This includes regenerating the files that depend on the Unicode 9 data
files

7 years agoPrepare for Unicode 9.0
Karl Williamson [Thu, 16 Jun 2016 17:59:24 +0000 (11:59 -0600)]
Prepare for Unicode 9.0

The major code changes needed to support Unicode 9.0 are to changes in
the boundary (break) rules, for things like \b{lb}, \b{wb}.
regen/mk_invlists.pl creates two-dimensional arrays for all these
properties.  To see if a given point in the target string is a break or
not, regexec.c looks up the entry in the property's table whose row
corresponds to the code point before the potential break, and whose
column corresponds to the one after.  Mostly this is completely
determining, but for some cases, extra context is required, and the
array entry indicates this, and there has to be specially crafted code
in regexec.c to handle each such possibility.  When a new release comes
along, mk_invlists.pl has to be changed to handle any new or changed
rules, and regexec.c has to be changed to handle any changes to the
custom code.

Unfortunately this is not a mature area of the Standard, and changes are
fairly common in new releases.  In part, this is because new types of
code points come along, which need new rules.  Sometimes it is because
they realized the previous version didn't work as well as it could.  An
example of the latter is that Unicode now realizes that Regional
Indicator (RI) characters come in pairs, and that one should be able to
break between each pair, but not within a pair.  Previous versions
treated any run of them as unbreakable.  (Regional Indicators are a
fairly recent type that was added to the Standard in 6.0, and things are
still getting shaken out.)

The other main changes to these rules also involve a fairly new type of
character, emojis.  We can expect further changes to these in the next
Unicode releases.

\b{gcb} for the first time, now depends on context (in rarely
encountered cases, like RI's), so the function had to be changed from a
simple table look-up to be more like the functions handling the other
break properties.

Some years ago I revamped mktables in part to try to make it require as
few manual interventions as possible when upgrading to a new version of
Unicode.  For example, a new data file in a release requires telling
mktables about it, but as long as it follows the format of existing
recent files, nothing else need be done to get whatever properties it
describes to be included.

Some of changes to mktables involved guessing, from existing limited
data, what the underlying paradigm for that data was.  The problem with
that is there may not have been a paradigm, just something they did ad
hoc, which can change at will; or I didn't understand their unstated
thinking, and guessed wrong.

Besides the boundary rule changes, the only change that the existing
mktables couldn't cope with was the addition of the Tangut script, whose
character names include the code point, like CJK UNIFIED IDEOGRAPH-3400
has always done.  The paradigm for this wasn't clear, since CJK was the
only script that had this characteristic, and so I hard-coded it into
mktables.  The way Tangut is structured may show that there is a
paradigm emerging (but we only have two examples, and there may not be a
paradigm at all), and so I have guessed one, and changed mktables to
assume this guessed paradigm.  If other scripts like this come along,
and I have guessed correctly, mktables will cope with these
automatically without manual intervention.

7 years agoTell mktables what Unicode version mk_invlist.pl handles
Karl Williamson [Thu, 16 Jun 2016 17:48:28 +0000 (11:48 -0600)]
Tell mktables what Unicode version mk_invlist.pl handles

A downside of supporting the Unicode break properties like \b{gcb},
\b{lb} is that these aren't very mature in the Standard, and so code
likely has to change when updating Perl to support a new version of the
Standard.

And the new rules may not be backwards compatible.  This commit creates
a mechanism to tell mktables the Unicode version that the rules are
written for.  If that is not the same version as being compiled, the
test file marks any failing boundary tests as TODO, and outputs a
warning if the compiled version is later than the code expects, to
alert you to the fact that the code needs to be updated.

7 years agoregexec.c: Add a const to a function parameter
Karl Williamson [Thu, 9 Jun 2016 21:55:39 +0000 (15:55 -0600)]
regexec.c: Add a const to a function parameter

This value isn't changed by the function

7 years agot/re/uniprops.t: Add more description for \b{} tests
Karl Williamson [Thu, 9 Jun 2016 21:35:15 +0000 (15:35 -0600)]
t/re/uniprops.t: Add more description for \b{} tests

mktables generates a file of tests used in t/re/uniprops.t.
The tests furnished by Unicode for the boundaries like \b{gcb} have
comments that indicate the rules each test is testing.  These are useful
in debugging.  This commit changes things so the generated file that
includes these Unicode-supplied tests also has the corresponding
comments which are output as part of the test descriptions.

7 years agoRT now imports new tags automatically
Alex Vandiver [Sat, 21 May 2016 08:21:29 +0000 (01:21 -0700)]
RT now imports new tags automatically

New perl releases are detected via an every-hour cron job, which will
update the relevant custom fields.  This step is thus now unnecessary.

7 years agoSort @def before generating $warnings::DEFAULT.
Matthew Horsfall [Tue, 21 Jun 2016 17:31:37 +0000 (13:31 -0400)]
Sort @def before generating $warnings::DEFAULT.

This makes the comment easier to read.

7 years agoonly treat stash entries with .*:: as sub-stashes
David Mitchell [Tue, 21 Jun 2016 16:06:52 +0000 (17:06 +0100)]
only treat stash entries with  .*:: as sub-stashes

RT #128238

%: = 0 would cause an assertion failure in Perl_gv_check(), since when
it searched a stash for substashes, it assumed anything ending in ':' was
a substash, whereas substashes end in '::'. So check for a double colon
before recursing.

7 years agoRevert "Update Time-HiRes to CPAN version 1.9735"
David Mitchell [Tue, 21 Jun 2016 14:48:57 +0000 (15:48 +0100)]
Revert "Update Time-HiRes to CPAN version 1.9735"

This reverts commit e6da2a9c4c0cecea6bf21f8ae47d78bdbe8bcbce.

This was hanging parallel testing on my Linux box.
Cause not yest investigated, but revert for now.

7 years agouninit warning from $h{\const} coredumped
David Mitchell [Tue, 21 Jun 2016 14:23:20 +0000 (15:23 +0100)]
uninit warning from $h{\const} coredumped

The code that printed the the name and subscript of a hash element
in an "uninitialized variable" warning assumed that a constant
hash subscript would be SvPOK. Something like \1 is a constant,
but is ROK, not POK. SEGVs ensured.

7 years agoUpdate Time-HiRes to CPAN version 1.9735
Chris 'BinGOs' Williams [Tue, 21 Jun 2016 13:59:03 +0000 (14:59 +0100)]
Update Time-HiRes to CPAN version 1.9735

  [DELTA]

1.9735 [2016-07-21]
  - Time::HiRes should override `utime` to allow setting hires
    (use futimens and utimensat to implement subsecond utime)
    [rt.perl.org #114809]
  - the utime patch uses IS_SAFE_PATHNAME() which isn't available in
    too old Perls, so emulate (in case the Devel::PPPort is too old)
  - make it so that only one value is set for -DTIME_HIRES_STAT
    even on systems that support many options

1.9734 [2016-07-17]
  - fix Darwins with clock_gettime: blead 2d41a263
    [rt.perl.org #128427]

7 years agoFix Maintainers.pl after 94e22bd6
Chris 'BinGOs' Williams [Tue, 21 Jun 2016 13:57:44 +0000 (14:57 +0100)]
Fix Maintainers.pl after 94e22bd6

7 years agoCorrect comment in t/porting/manifest.
Matthew Horsfall [Tue, 21 Jun 2016 13:33:24 +0000 (09:33 -0400)]
Correct comment in t/porting/manifest.

There is no 'make manifest' but there is a 'make manisort'.

7 years agoUpdate Devel-PPPort to CPAN version 3.35
Matthew Horsfall [Tue, 21 Jun 2016 12:21:32 +0000 (08:21 -0400)]
Update Devel-PPPort to CPAN version 3.35

    [DELTA]

  3.35 - 2016-06-17

      * Fix compilation in bleadperl by removing a bad test.

  3.34 - 2016-06-04

      * Fix compilation on Windows with certain compilers.
        (__attribute__ not recognized. (#GH 36))

7 years agoPerl_my_vsnprintf: avoid compiler warning
David Mitchell [Tue, 21 Jun 2016 13:22:16 +0000 (14:22 +0100)]
Perl_my_vsnprintf: avoid compiler warning

in the usequadmath branch, gcc is too clever for its own good:

    PERL_UNUSED_ARG(ap);

gives:

util.c:5299:18: warning: ‘sizeof’ on array function parameter ‘ap’ will
return size of ‘__va_list_tag *’ [-Wsizeof-array-argument]

Stick in a void* cast to shut it up.

7 years agoPerlIO-encoding/t/fallback.t: test for warning
David Mitchell [Tue, 21 Jun 2016 12:28:19 +0000 (13:28 +0100)]
PerlIO-encoding/t/fallback.t: test for warning

The previous commit fixed a typo that had been present since this test
script was created: WARN_ON_ERR misspelt as WARN_ON_ERROR.  This means
that one of the tests is now (correctly) issuing a warning.  Rather than
that spilling out onto STDERR, capture it and test it instead.

7 years agoFix Encode constant name usage: WARN_ON_ERROR --> WARN_ON_ERR
Salvador Fandino [Thu, 12 May 2016 12:40:24 +0000 (14:40 +0200)]
Fix Encode constant name usage: WARN_ON_ERROR --> WARN_ON_ERR

7 years ago(perl #128359) prevent a const-ness warning on Cygwin
Tony Cook [Tue, 21 Jun 2016 04:23:16 +0000 (14:23 +1000)]
(perl #128359) prevent a const-ness warning on Cygwin

7 years agoBump Module::CoreList version for 5.25.3
Matthew Horsfall [Mon, 20 Jun 2016 21:51:31 +0000 (17:51 -0400)]
Bump Module::CoreList version for 5.25.3

7 years agoBump the perl version in various places for 5.25.3
Matthew Horsfall [Mon, 20 Jun 2016 21:39:46 +0000 (17:39 -0400)]
Bump the perl version in various places for 5.25.3

7 years agoAdd new perldelta
Matthew Horsfall [Mon, 20 Jun 2016 21:29:25 +0000 (17:29 -0400)]
Add new perldelta

7 years agoUpdate release announcement template for 5.26 in 2017.
Matthew Horsfall [Mon, 20 Jun 2016 21:24:38 +0000 (17:24 -0400)]
Update release announcement template for 5.26 in 2017.

7 years agoTick off release in release_schedule.pod
Matthew Horsfall [Mon, 20 Jun 2016 21:19:19 +0000 (17:19 -0400)]
Tick off release in release_schedule.pod

7 years agoUpdate epigraphs.pod after release
Matthew Horsfall [Mon, 20 Jun 2016 21:18:40 +0000 (17:18 -0400)]
Update epigraphs.pod after release

7 years agoFinalize perldelta v5.25.2
Matthew Horsfall [Mon, 20 Jun 2016 20:30:49 +0000 (16:30 -0400)]
Finalize perldelta

7 years agoadd new release to perlhist
Matthew Horsfall [Mon, 20 Jun 2016 20:21:35 +0000 (16:21 -0400)]
add new release to perlhist

7 years agoUpdate module versions in perldelta
Matthew Horsfall [Mon, 20 Jun 2016 20:20:40 +0000 (16:20 -0400)]
Update module versions in perldelta

7 years agoUpdate Module::CoreList for 5.25.2
Matthew Horsfall [Mon, 20 Jun 2016 20:10:00 +0000 (16:10 -0400)]
Update Module::CoreList for 5.25.2

7 years agoAdd acknowledgements to perldelta
Matthew Horsfall [Mon, 20 Jun 2016 19:57:14 +0000 (15:57 -0400)]
Add acknowledgements to perldelta

7 years agoperldelta for 323565712651fc (RT #128200)
Lukas Mai [Mon, 20 Jun 2016 18:55:37 +0000 (20:55 +0200)]
perldelta for 323565712651fc (RT #128200)

7 years agoRemove references to USENET from ext/
Dan Collins [Wed, 8 Jun 2016 19:42:11 +0000 (15:42 -0400)]
Remove references to USENET from ext/

7 years agoRemove most references to USENET from docs
Dan Collins [Wed, 8 Jun 2016 19:41:34 +0000 (15:41 -0400)]
Remove most references to USENET from docs

7 years agoPrep perldelta for release
Matthew Horsfall [Mon, 20 Jun 2016 13:22:18 +0000 (09:22 -0400)]
Prep perldelta for release

7 years agoUpdate INSTALL to mention correct versions.
Matthew Horsfall [Mon, 20 Jun 2016 12:48:27 +0000 (08:48 -0400)]
Update INSTALL to mention correct versions.

7 years agot/harness: avoid tests outside the src tree
David Mitchell [Mon, 20 Jun 2016 10:48:35 +0000 (11:48 +0100)]
t/harness: avoid tests outside the src tree

[perl #124050] t/harness can mistakenly run tests outside of the perl
    source tree

cfa562529cf24 made t/harness prepend '../' to test filenames if such a
file existed. This allowed things like

    ./perl t/harness cpan/foo/t/foo.t

to work even after harness had done a chdir("t").  However, it was then
picking up a ../cpan/foo/t/foo.t file outside the src tree in preference
to the one inside.

Add belt-and-brace conditions: only modify the filename if the unmodified
file doesn't exist, and only only if it doesn't already start with ../.

Based on an earlier patch by Matthew Horsfall

7 years agoupdate AUTHORS
David Mitchell [Mon, 20 Jun 2016 07:20:12 +0000 (08:20 +0100)]
update AUTHORS

7 years agoTime::HiRes: fix Darwins with clock_gettime
Misty De Meo [Fri, 17 Jun 2016 19:49:44 +0000 (12:49 -0700)]
Time::HiRes: fix Darwins with clock_gettime

Not all of the Darwin time code was guarded by the same set of #ifdefs,
leading to bugs on Darwin platforms with clock_gettime where a struct
would not be defined but would still be used elsewhere.

7 years agoregexes, Slight refactor, but mostly fix comments,
Karl Williamson [Tue, 14 Jun 2016 20:05:49 +0000 (14:05 -0600)]
regexes, Slight refactor, but mostly fix comments,

Also some white space changes.

This reinstates some refactoring that was done in the reverted commit
c29dfc6a6c45f86648c51f961304254cc3c449b9.  This was the part of the
commit that didn't lead to problems.  Instead, it makes the code
slightly simpler, with fewer instructions needed (disregarding any
compiler optimizations).

But mostly this commit rewords and amplifies some comments.  I
discovered I didn't fully understand things (as the algorithm was taken
from a book), and wrote the comments to be wrong or at least misleading.

7 years agoperldelta entry for 0bac45c8ec730e2f
David Mitchell [Sun, 19 Jun 2016 19:57:51 +0000 (20:57 +0100)]
perldelta entry for 0bac45c8ec730e2f

7 years agoperldelta for 79409ac835 / #128260
Father Chrysostomos [Sun, 19 Jun 2016 07:46:15 +0000 (00:46 -0700)]
perldelta for 79409ac835 / #128260

7 years agoperldelta for e4fc70828
Father Chrysostomos [Sun, 19 Jun 2016 07:43:28 +0000 (00:43 -0700)]
perldelta for e4fc70828

7 years agoperldelta for e7127e21a1 / #128307
Father Chrysostomos [Sun, 19 Jun 2016 07:40:14 +0000 (00:40 -0700)]
perldelta for e7127e21a1 / #128307

7 years agoperldelta for 76734a3218e / #128204
Father Chrysostomos [Sun, 19 Jun 2016 07:36:27 +0000 (00:36 -0700)]
perldelta for 76734a3218e / #128204

7 years agoperldelta for ffd2521e4c1d
Father Chrysostomos [Sun, 19 Jun 2016 07:33:29 +0000 (00:33 -0700)]
perldelta for ffd2521e4c1d

7 years agoperldelta for a50cb9d2d (lex sub acceptance)
Father Chrysostomos [Sun, 19 Jun 2016 07:27:54 +0000 (00:27 -0700)]
perldelta for a50cb9d2d (lex sub acceptance)

mostly based on 1c2511e0acc.

7 years agoperldelta for a061ab0bf and 738155d2f
Father Chrysostomos [Sun, 19 Jun 2016 07:24:21 +0000 (00:24 -0700)]
perldelta for a061ab0bf and 738155d2f

7 years agoperldelta for a061ab0bf
Father Chrysostomos [Sun, 19 Jun 2016 07:19:36 +0000 (00:19 -0700)]
perldelta for a061ab0bf

7 years agoAdd tests for regex recursion
Dan Collins [Fri, 17 Jun 2016 23:40:57 +0000 (19:40 -0400)]
Add tests for regex recursion

d5a00e4af introduced a bug in reginsert that was fixed by da7cf1cc7,
originally documented in [perl #128109]. This patch adds two
regression tests for the testcase reported by Jan Goyvaerts in
[perl #128420].

7 years agoRevert "regcomp.c: Add shortcuts to some inversion list ops"
Karl Williamson [Fri, 17 Jun 2016 21:17:43 +0000 (15:17 -0600)]
Revert "regcomp.c: Add shortcuts to some inversion list ops"

This reverts commit c29dfc6a6c45f86648c51f961304254cc3c449b9.

But it also removes the XXX suggesting that the things that commit did
should be  done.  It turns out that I didn't fully understand this, that
the shortcuts weren't found as frequently as I expected, and in fact
happened when they shouldn't have, creating bugs.  The only bugs I found
had to do with displaying what the regex compiled into under -Dr, but I
imagine there are others out there.  I did try to create some test cases
that showed the bugs, based on understanding how the code works, but
various things prevented them from actually being bugs.

To correctly decide to take the shortcut requires adding tests inside a
loop, and the shortcut is just to possibly save some work after the
loop.  That isn't a good tradeoff.

7 years agoRegen podcheck.t db following perlmodlib fixes
Karl Williamson [Fri, 17 Jun 2016 18:02:13 +0000 (12:02 -0600)]
Regen podcheck.t db following perlmodlib fixes

Commit 9ed2d9d9590c246380663caa818775c693b29fb0 fixed some over-long
verbatime lines.

7 years agoAdd missing deprecation message for unescaped '{' in regexes
Karl Williamson [Fri, 10 Jun 2016 03:25:46 +0000 (21:25 -0600)]
Add missing deprecation message for unescaped '{' in regexes

The use of literal '{' without being escaped has been deprecated since
5.16, and warned on since 5.20.  In 5.24, this has been made illegal,
with a bunch of CPAN modules broken by it, in spite of the long
deprecation period.  See
https://rt.perl.org/Ticket/Display.html?id=128139

Unfortunately, I overlooked a code path, and not all instances that
should have warned did so in fact.  This was spotted by Tom Wyant in
https://rt.perl.org/Ticket/Display.html?id=128213

This commit adds that warning, and rewords the fatal one slightly, and
clarifies the whole thing in perldiag.

7 years agodiagnostics.pm; Enhance to accept nested lists
Karl Williamson [Wed, 15 Jun 2016 18:51:39 +0000 (12:51 -0600)]
diagnostics.pm; Enhance to accept nested lists

Prior to this patch, this module assumed every =item was for a
diagnostic.  Now it keeps track, and so a given diagnostic can have a
list within it.

7 years agoop/stat.t: Skip test if environment not suitable.
Karl Williamson [Fri, 10 Jun 2016 03:22:34 +0000 (21:22 -0600)]
op/stat.t: Skip test if environment not suitable.

Subtly, if this test is run in a directory containing a file named '2',
it will fail.  It's simplest to just skip the test for this rare event.

7 years agoMention 9ed2d9d9 in perldelta
Chris 'BinGOs' Williams [Fri, 17 Jun 2016 18:10:16 +0000 (19:10 +0100)]
Mention 9ed2d9d9 in perldelta

7 years agoSome perldelta updates for the upcoming release.
Matthew Horsfall [Fri, 17 Jun 2016 16:52:30 +0000 (12:52 -0400)]
Some perldelta updates for the upcoming release.

7 years agoperl.c: comment that it's also perlmini.c
David Mitchell [Fri, 17 Jun 2016 16:53:00 +0000 (17:53 +0100)]
perl.c: comment that it's also perlmini.c

7 years agobetter document Miniperl.pm, (mini)perlmain.c
David Mitchell [Fri, 17 Jun 2016 16:27:31 +0000 (17:27 +0100)]
better document Miniperl.pm, (mini)perlmain.c

ExtUtils::Miniperl is used to generate both miniperlmain.c and perlmain.c,
but in different ways (via regen and via make respectively).

Update the pod in Miniperl.pm to explain this more clearly, and
imporve the header comment it emits in miniperlmain.c and perlmain.c.

7 years agoMakefile.SH: -Ilib is already in $MINIPERL's defn
Ivan Pozdeev [Fri, 17 Jun 2016 15:11:34 +0000 (16:11 +0100)]
Makefile.SH: -Ilib is already in $MINIPERL's defn

So '$(MINIPERL) -Ilib' is redundant.

7 years agodocs: clarify flag constants in File::Glob
Ed Avis [Fri, 17 Jun 2016 14:01:06 +0000 (15:01 +0100)]
docs: clarify flag constants in File::Glob

See [perl #126239].

7 years agoperl -V: make configuration one per line
David Mitchell [Fri, 17 Jun 2016 12:28:11 +0000 (13:28 +0100)]
perl -V:  make configuration one per line

For improved readability, change:

  Platform:
    osname=linux, osvers=4.4.11-200.fc22.x86_64, archname=x86_64-linux-thread-multi
    ...

to

  Platform:
    osname=linux
    osvers=4.4.11-200.fc22.x86_64
    archname=x86_64-linux-thread-multi
    ....

7 years agoperl -V: make 'Compile-time options' one per line
David Mitchell [Fri, 17 Jun 2016 12:42:36 +0000 (13:42 +0100)]
perl -V:  make 'Compile-time options' one per line

For improved readability, change:

  Compile-time options: DEBUGGING MULTIPLICITY PERLIO_LAYERS
                        PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV
                        PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
                        ...

To:

  Compile-time options:
    DEBUGGING
    HAS_TIMES
    MULTIPLICITY
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
    ....

7 years agotweak code comment for PL_bincompat_options
David Mitchell [Fri, 17 Jun 2016 12:42:42 +0000 (13:42 +0100)]
tweak code comment for PL_bincompat_options

7 years ago[perl #128422] Refactor mirror list generation script
Chris 'BinGOs' Williams [Fri, 17 Jun 2016 12:21:37 +0000 (13:21 +0100)]
[perl #128422] Refactor mirror list generation script

As per [perl #128422] the mirror list in perlmodlib is out of date
with regards the master list.

The master list is no longer a text file so refactored generator to
parse JSON mirror list.

Updated perlmodlib in the process.

7 years agoperldiag: add "command not found" entries for bash/zsh
Lukas Mai [Thu, 16 Jun 2016 18:17:08 +0000 (20:17 +0200)]
perldiag: add "command not found" entries for bash/zsh

7 years agoUpdate Pod-Checker to CPAN version 1.73
Chris 'BinGOs' Williams [Thu, 16 Jun 2016 12:37:21 +0000 (13:37 +0100)]
Update Pod-Checker to CPAN version 1.73

  [DELTA]

 30-May-2016           Marek Rouchal                        <marekr@cpan.org>
 -----------------------------------------------------------------------------
 Version 1.73
 + CPAN#114623: Changes file gives wrong date for 1.72
   fix for typo in this file, do it right this time for 1.73
 + CPAN#113846: 1.71 broke core t/porting/podcheck.t
   removed spurious "use Data::Dumper"

7 years agoUpdate Pod-Usage to CPAN version 1.69
Chris 'BinGOs' Williams [Thu, 16 Jun 2016 12:33:45 +0000 (13:33 +0100)]
Update Pod-Usage to CPAN version 1.69

  [DELTA]

1.69 (marekr)
- CPAN#111313: Makefile creation issue with Pod-Usage-1.68
  thanks to H M Brand for the suggestion on how to create a more portable
  tar.gz distribution file
- CPAN#109830: Tests fail
  bundle some old Pod::Parser modules in the test so that there is no more
  dependency. This has to refactored one day to entirely get rid of that

7 years agoperldelta for 3f6b66c14467
Tony Cook [Thu, 16 Jun 2016 05:12:46 +0000 (15:12 +1000)]
perldelta for 3f6b66c14467

7 years ago(perl #128316) preserve errno from failed system calls origin/tonyc/128316-errno-sanity
Tony Cook [Thu, 16 Jun 2016 04:08:18 +0000 (14:08 +1000)]
(perl #128316) preserve errno from failed system calls

7 years ago[perl #127885] enhancements to bench.pl
Tony Cook [Wed, 15 Jun 2016 01:58:52 +0000 (11:58 +1000)]
[perl #127885] enhancements to bench.pl

7 years agoPorting/bench.pl --grindargs can be abused, usefully.
Jim Cromie [Tue, 12 Apr 2016 22:59:37 +0000 (16:59 -0600)]
Porting/bench.pl --grindargs can be abused, usefully.

Add an example where --grindargs='3>foobar' opens an extra file
descriptor for writing, and PERL_MEM_LOG=3 causes perl to log to the
file instead of STDERR, so that the output doesnt cause
parse_cachegrind() to choke, which would abort the test.

The example also demonstrates overriding default grind options, ie
--cachegrind-out-file=junk.$$.  This has no obvious utility at
present, and perhaps buries the lead.

7 years agoprovide per-PUT environment
Jim Cromie [Sun, 10 Apr 2016 22:43:46 +0000 (16:43 -0600)]
provide per-PUT environment

This patch lets user specify ENVAR=value pairs for individual PUTs,
thereby altering runtime behavior.  For some combination of module and
ENVAR, this should result in measurable benchmark differences.

This example benchmarks a PERL_MEM_LOG configured perl, 1st PUT with
PERL_MEM_LOG disabled, but enabled in the 2nd:

 $ perl Porting/bench.pl --jobs=2 \
   --verbose --debug --tests=/loop::for::pkg_/ \
   -- \
   perl5.23.9:+bare \
   perl5.23.9=+full:PERL_MEM_LOG=3mst,PERLIO=:stdio -MData::Dumper

this will run:

Command: PERL_HASH_SEED=0 PERLIO=:stdio PERL_MEM_LOG=3mst valgrind --tool=cachegrind  --branch-sim=yes --cachegrind-out-file=/dev/null  perl5.23.9  -MData::Dumper - 20 2>&1

Note that ':' is now a valid separator between the perl & label, but
not between ENVAR=value pairs, where a ',' is required.

7 years agoadd =+label feature, which appends the label to perl-name
Jim Cromie [Sun, 10 Apr 2016 17:58:11 +0000 (11:58 -0600)]
add =+label feature, which appends the label to perl-name

Using this reduces the burden of keeping each label unique,
simplifying the use of labels to name varying workloads created by
-Mfoo -M<something-heavy>

This enables an invocation like the following to run -DDEBUGGING
perls-A,B in bare mode, and heavily encumbered by -Dflag induced
overhead:

 $] perl Porting/bench.pl --jobs=2 \
    --tests=/loop::for::my/ \
    -- \
    perl-A=+bare perl-A=+workload -DpsltocPmfr \
    perl-B=+bare perl-B=+workload -DpsltocPmfr

Unfortunately, that example falls over, because the -D<blah> output
upsets cachegrind_parser.  That might be fixable by removing the
'2>&1' in the $cmd.  Nonetheless, workloads are constructible.

more prosaically:

 $] perl Porting/bench.pl --jobs=2 \
    --tests=/loop::for::my/ \
    -- perl5.18.2=+strict -Mstrict perl5.18.0=+dumper -MData::Dumper

yields:

Got eof for pid 11377 (loop::for::my_array4/perl5.18.0+dumper active/long loop)
...

loop::for::my_array4
empty for loop with my var and 4 integer array

       perl5.18.2+strict perl5.18.0+dumper
       ----------------- -----------------
    Ir            100.00            114.20
    Dr            100.00            119.35
    Dw            100.00            135.03
  COND            100.00             99.71
   IND            100.00            100.00

COND_m            100.00            119.64
 IND_m            100.00             92.31

 Ir_m1            100.00            100.00
 Dr_m1            100.00            100.00
 Dw_m1            100.00            100.00

 Ir_mm            100.00                 -
 Dr_mm            100.00                 -
 Dw_mm            100.00            100.00

AVERAGE

       perl5.18.2+strict perl5.18.0+dumper
       ----------------- -----------------
    Ir            100.00            114.56
    Dr            100.00            118.87
    Dw            100.00            133.30
  COND            100.00            100.41
   IND            100.00            100.00

COND_m            100.00             69.14
 IND_m            100.00             89.95

 Ir_m1            100.00            100.00
 Dr_m1            100.00            100.00
 Dw_m1            100.00            100.00

 Ir_mm            100.00            100.00
 Dr_mm            100.00            100.00
 Dw_mm            100.00            100.00

7 years agos/@results/@res_puts/ in process_puts
Jim Cromie [Sun, 10 Apr 2016 17:50:13 +0000 (11:50 -0600)]
s/@results/@res_puts/ in process_puts

7 years agoadd pod for PUT
Jim Cromie [Sun, 10 Apr 2016 13:46:40 +0000 (07:46 -0600)]
add pod for PUT

7 years agogrind_print: adjust for labels
Jim Cromie [Sun, 10 Apr 2016 06:15:31 +0000 (00:15 -0600)]
grind_print: adjust for labels

since HEAD~1, data is stored by the label, not the perlname.
simplify grind-print based upon this.

7 years agostore data using unique label, not perl-exe, which may be used 2x
Jim Cromie [Sun, 10 Apr 2016 06:06:50 +0000 (00:06 -0600)]
store data using unique label, not perl-exe, which may be used 2x

Since we want that a perl-name can be used in 2 separate PUTs, we
cannot use it alone to store PUT results.  Instead, use the PUTs
labels, which are enforced unique.

And use "$test/$label" instead of "$test/$perl" in debug msg, since
thats how we store it now.

This change has downstream data-indexing ramifications, which are not
fully understood yet, and which are NOT handled here.

7 years agoPorting/bench.pl: allow per-PUT (perl under test) options and modules
Jim Cromie [Sun, 10 Apr 2016 05:20:10 +0000 (23:20 -0600)]
Porting/bench.pl: allow per-PUT (perl under test) options and modules

Rework process_perls() to give a richer usage / API, allowing
additional command-line options, specific to each Perl-Under-Test.
For example:

  bench.pl -- perl=plain perl=slower -Mstrict -DmpMA

The above runs the same perl-exe for 2 different tests (PUTS), but
adds expensive debugging options to only the 2nd PUT.

Do this by changing strategy; we scan the list backwards, and
test/treat each item as a perlexe (ie qx/$perlexe -e 'print "ok"/).
Instead of dieing on a not-perl, they're collected and submitted as a
PUT once a $perlexe is found.

Added 'require_order' to terminate arg processing when '--' is
encountered on cmdline; without it the PUT options are in-validated by
GetOptions.

7 years agoPorting/bench.pl: protect against data loss
Jim Cromie [Sun, 10 Apr 2016 04:51:48 +0000 (22:51 -0600)]
Porting/bench.pl: protect against data loss

Due to %data storage using $perl_name (rather than $label),
blead silently loses data when running like so:

   perl Porting/bench.pl -- perl perl

patch complains about above, but allows following:

   perl Porting/bench.pl -- perl=FOO perl=BAR

With this 1/2 fix, we can further probe the underlying key probs,
evident in the results from above

   ...
   loop::for::lex_range4
   empty for loop with lexical var and 4 integer range

         BAR    BAR
      ------ ------
   Ir 100.00 100.00
   Dr 100.00 100.00

7 years agoprep grind-run to accept args from PUTs
Jim Cromie [Sun, 10 Apr 2016 04:45:25 +0000 (22:45 -0600)]
prep grind-run to accept args from PUTs

7 years agoPorting/bench.pl: --verbose assist on tests failure
Jim Cromie [Sun, 10 Apr 2016 04:33:10 +0000 (22:33 -0600)]
Porting/bench.pl: --verbose assist on tests failure

with --verbose, --tests=foo will fail loudly, so user can pick a test.

7 years ago(perl #128199) rmscopy() is VMS specific and not exported
Tony Cook [Wed, 15 Jun 2016 00:11:26 +0000 (10:11 +1000)]
(perl #128199) rmscopy() is VMS specific and not exported

The first is kind of implied by the text, but make it explicit.

Added minor punctuation fixes suggested by Reuben Thomas.

7 years agoFix customised for Encode
Chris 'BinGOs' Williams [Tue, 14 Jun 2016 17:19:40 +0000 (18:19 +0100)]
Fix customised for Encode

7 years agoUpdate META.json after JSON-PP update
Chris 'BinGOs' Williams [Tue, 14 Jun 2016 16:42:32 +0000 (17:42 +0100)]
Update META.json after JSON-PP update

7 years ago[PATCH] Bump Locale-Codes from 3.38 to 3.39
Sullivan Beck [Tue, 14 Jun 2016 16:33:26 +0000 (17:33 +0100)]
[PATCH] Bump Locale-Codes from 3.38 to 3.39

Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
7 years agoUpdate JSON-PP to CPAN version 2.27400
Chris 'BinGOs' Williams [Tue, 14 Jun 2016 16:26:00 +0000 (17:26 +0100)]
Update JSON-PP to CPAN version 2.27400

  [DELTA]

2.27400  2016-04-23
  [JSON::PP] appleid and merged long term neglected patches & PRs.
             thanks to charsbar

  - document patches
    by AM909, leon[at]astray.com, dsteinbrunner, jwilk, alfiedotwtf
  - modified Makefile.PL to set UNINST=1 if needed on old perls
    by dagolden
  - decode decimals to Perl's internal NV type
    by dagolden

  see to https://github.com/makamaka/JSON-PP/commits/master

7 years agoUpdate HTTP-Tiny to CPAN version 0.058
Chris 'BinGOs' Williams [Tue, 14 Jun 2016 16:24:30 +0000 (17:24 +0100)]
Update HTTP-Tiny to CPAN version 0.058

  [DELTA]

0.058     2016-05-03 11:29:57-04:00 America/New_York

    - No changes from 0.057

0.057     2016-04-18 10:17:00-04:00 America/New_York (TRIAL RELEASE)

    [ADDED]

    - Added support for the SSL_CERT_FILE environment variable.

    - Added 'peer' attribute to force a connection to a particular
      server.

    - Added 'connected' method to allow introspection of persistent
      connections.

    - An array reference of redirection result hash references is included
      in the final response hash reference (but only if redirects occur).

    [CHANGED]

    - Because folded headers are obsoleted in the revised RFCs, if CRLF is
      found in header values followed by one or more spaces, they are all
      replaced by a single space.

    [FIXED]

    - Per the RFC, control headers are now sent first before other headers
      (which are sent in arbitrary order).

    - Only well-known headers have their case canonicalized; all other
      headers are sent in the case provided by the user.

    - The 'keep_alive' option now also sets the SO_KEEPALIVE option
      on the underlying socket to help with long-lived, idle connections.

    - Request header field values are now validated against the RFC rules
      (i.e. empty or else space-or-tab separated tokens of printable
      characters).

7 years agoUpdate Getopt-Long to CPAN version 2.49
Chris 'BinGOs' Williams [Tue, 14 Jun 2016 16:22:41 +0000 (17:22 +0100)]
Update Getopt-Long to CPAN version 2.49

[DELTA]

Changes in version 2.49
-----------------------

* Fix bug https://rt.cpan.org/Ticket/Display.html?id=114999

  Thanks Roy Ivy III for finding and fixing this.

* Fix bug https://rt.cpan.org/Ticket/Display.html?id=113748

  Thanks Tom Wyant for finding and fixing this.

7 years agoAPItest.xs: silence compiler warning
David Mitchell [Tue, 14 Jun 2016 09:34:12 +0000 (10:34 +0100)]
APItest.xs: silence compiler warning

7 years agoperlio.c: silence a couple of warnings
David Mitchell [Tue, 14 Jun 2016 09:24:30 +0000 (10:24 +0100)]
perlio.c: silence a couple of warnings

7 years ago[perl #128313] test for memory leak in POSIX classes
Dan Collins [Wed, 8 Jun 2016 20:26:07 +0000 (16:26 -0400)]
[perl #128313] test for memory leak in POSIX classes

7 years agoPOSIX.xs: avoid "defined but not used" warning
David Mitchell [Mon, 13 Jun 2016 10:36:06 +0000 (11:36 +0100)]
POSIX.xs: avoid "defined but not used" warning

The static function not_here() is used for any methods that aren't
implemented. On Linux at least, *all* methods are implemented, so you get:

POSIX.xs:1639:1: warning: ‘not_here’ defined but not used [-Wunused-function]
 not_here(const char *s)

Ensure at least one use of this function to avoid that warning.
A bit hacky, but I couldn't think of a better way.

7 years agoperldelta for 31b6f23ed55c
Tony Cook [Mon, 13 Jun 2016 01:12:47 +0000 (11:12 +1000)]
perldelta for 31b6f23ed55c

7 years ago[perl #126710] only touch pm_to_blib if files are copied
Tony Cook [Tue, 1 Dec 2015 05:10:55 +0000 (16:10 +1100)]
[perl #126710] only touch pm_to_blib if files are copied

Add checks similar to what the Makefile would do: only copy the
files if the source file is newer than pm_to_blib

7 years ago[perl #128260] Fix \substr %h
Father Chrysostomos [Sun, 12 Jun 2016 13:19:47 +0000 (06:19 -0700)]
[perl #128260] Fix \substr %h

This is a follow-up to 79409ac8, which propagated substr’s own lvalue
context to the first argument only if it was one that would not croak
at compile time.

We can’t propagate OP_REFGEN lvalue context to the first argument,
as it causes the same bug for which #128260 was originally reported;
namely, that it prevents a hash or array from being flattened, causing
an unflattened aggregate to follow code paths that expect only sca-
lars, resulting in assertion failures:

$ ./perl -Ilib -e '%h=1..100; print ${\substr %h, 0}'
Assertion failed: (SvTYPE(sv) != SVt_PVAV && SvTYPE(sv) != SVt_PVHV && SvTYPE(sv) != SVt_PVFM), function Perl_sv_2pv_flags, file sv.c, line 2924.
Abort trap: 6
$ ./perl -Ilib -e '@h=1..100; print ${\vec @a, 0, 1}'
Assertion failed: (SvTYPE(sv) != SVt_PVAV && SvTYPE(sv) != SVt_PVHV && SvTYPE(sv) != SVt_PVFM), function Perl_sv_2pv_flags, file sv.c, line 2924.
Abort trap: 6

7 years agoUpdate the notes on Synology/DSM
H.Merijn Brand [Sun, 12 Jun 2016 09:37:03 +0000 (11:37 +0200)]
Update the notes on Synology/DSM

7 years ago[perl #128260] Fix lvalue cx for substr and vec
Father Chrysostomos [Sat, 11 Jun 2016 01:08:50 +0000 (18:08 -0700)]
[perl #128260] Fix lvalue cx for substr and vec

When lvalue context was applied to the substr and vec at compile time,
that context was propagated to the first argument.  That meant that

    substr %foo, 1, = 3;

would correctly die, but give the wrong op in the error message, say-
ing ‘in scalar assignment’ whereas ‘in substr’ is more appropriate.

Contrariwise,

    (substr %foo, 1) = 3;

would apply list lvalue context to %foo, which does not die at compile
time and prevents flattening (that’s what allows %foo=... to work).

The unflattened hash would be passed to internal functions that only
expect scalars, resulting in assertion failures.

The fix is to introduce two new types of scalar lvalue context, namely
OP_SUBSTR and OP_VEC, and apply those to the first argument, causing
both the examples above to die at compile time with ‘Can't modify hash
dereference in substr’.

If the surrounding context is only potential modifiable context (such
as \substr), then that same non-fatal context is applied to the
first argument.

7 years agoop.c: Factor out common code for potential lv cx
Father Chrysostomos [Fri, 10 Jun 2016 15:54:56 +0000 (08:54 -0700)]
op.c: Factor out common code for potential lv cx

7 years agoMake lv keys distinguish scalar/list cx properly
Father Chrysostomos [Fri, 10 Jun 2016 15:49:59 +0000 (08:49 -0700)]
Make lv keys distinguish scalar/list cx properly

keys(%h) was special in that it did not use the same code path as
other ops that distinguish between scalar and list lvalue context.
Consequently, some scalar lvalue contexts worked:

    keys %h = 3;
    ${\scalar keys %h} = 3;
    sub { $_[0] = 3 }->(scalar keys %h);
    foreach(scalar keys %h) { $_ = 3 }
    grep { $_ = 3 } scalar keys %h;
    substr keys %h, 0, = 3;

while others did not:

    keys %h .= 0;
    read FH, keys %h, 0;

Fixing other bugs in the same code paths without breaking keys (or
adding *more* exceptions) is harder to do if keys is not consistent.
So this commit allows .= and read to assign to keys, by using the same
internal code (scalar_mod_type) that determines whether %h assignment
is allowed.  The logic is reversed (since %h is list-only and keys %h
is scalar-only), so where %h is a valid lvalue keys %h is not, and
vice versa.