This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Nicolas R [Wed, 15 Nov 2017 17:23:18 +0000 (11:23 -0600)]
IO::Handle - fix precedence issue
This commits fixes remarks raised
during the 2017 p5h in Amsterdam.
- fix precedence issue with '=~'
- stop using indirect new calls for SelectSaver.
Karen Etheridge [Sat, 4 Nov 2017 18:29:25 +0000 (11:29 -0700)]
spelling
Karen Etheridge [Wed, 1 Nov 2017 21:26:44 +0000 (14:26 -0700)]
tabs to spaces in RMG
Zefram [Wed, 15 Nov 2017 17:41:29 +0000 (17:41 +0000)]
fix handling of registered warning categories
There were some problems arising from some warning bitsets being shorter
than others, which happens when registration of a new warning category
makes new bitsets longer. Most obviously, if a scope used "use warnings
'all'" to turn on all warnings and then turned off some specific warnings,
then that scope wouldn't get warnings for subsequently-registered warning
categories, because its bitset doesn't extend to the bit controlling
the new category. (If just "use warnings 'all'" was used, without any
customisation, then a special hack made that work for new categories.)
It was also possible for a longer bitset to get truncated by a warnings
pragma, because the bitset editing code assumed that all bitsets are
the same length.
To fix this, first the warning bits for the "all" category have to change
meaning. Unlike all other warning categories, the bits for "all" used to
be set only when there were no warning categories disabled; disabling any
would also clear the "all" bits. That was supporting the special hack
mentioned above that the all-warnings bitset work for new categories.
This exception is now removed, so the meaning of the "all" bits is now the
more obvious meaning, of indicating the default treatment that the scope
wants for warnings not falling into any category known to the bitset.
In warnings::warnif() et al, if the caller's bitset is found to be too
short to have a bit for the relevant category, then the setting for the
"all" category is used instead.
Because the length of a bitset is an integral number of bytes, but
only two bits are used per category, the length of a bitset doesn't
precisely indicate which categories had been registered by the time it
was constructed. So the standard bitsets for the "all" category are
now always filled to their byte length, with bits set preemptively for
categories not yet registered that fall within the current bitset length.
When a warnings pragma operates on a bitset, it first expands it to the
preferred length, by duplicating the "all" bits for the categories covered
by the new length. It is careful to maintain the length when combining
the bitset with the standard bitsets for categories. When a bitset is
read from ${^WARNING_BITS} or from caller(), the standard pWARN_ALL
setting is no longer expanded by the core to $warnings::Bits{all},
because the core's short WARN_ALLstring will now be expanded correctly
just like any other bitset.
Fixes [perl #108778].
Steve Hay [Wed, 15 Nov 2017 18:17:17 +0000 (18:17 +0000)]
Provide option to build with -D__USE_MINGW_ANSI_STDIO
This commit adapts and extends a patch from sisyphus1@optusnet.com.au on
perl #130447.
Note for the future: One of the MinGW/gcc developers has said that
explicitly defining __USE_MINGW_ANSI_STDIO in this way is not guaranteed
to work in the future, so we may have to pursue other options instead one
day: https://rt.perl.org/Ticket/Display.html?id=130447#txn-1461711
However, we already do this for "nvtype=long double" builds and it's
working fine so far, so it seems acceptable to allow the same thing for
"nvtype=double" builds for now.
Nicolas R [Wed, 15 Nov 2017 16:04:29 +0000 (10:04 -0600)]
DynaLoader simplify parsing option rule
After review, comments & dumb benchmark.
Simply using a substitute for these two
'-L' and '-l' options parsing makes the code
easier to maintain.
The benchmark difference is pretty close, for
matching, non matching (short or long) strings.
Todd Rinaldo [Sat, 11 Nov 2017 05:01:27 +0000 (23:01 -0600)]
Remove use vars from B::Deparse
RT 132429: This causes a slight change to the output value of ${^WARNING_BITS} due to
warnings::register not polluting introspection for B::Deparse.
Steve Hay [Wed, 15 Nov 2017 17:27:38 +0000 (17:27 +0000)]
perldelta for commit
43b354f1e1
David Mitchell [Wed, 15 Nov 2017 15:25:08 +0000 (15:25 +0000)]
lib/perl5db.pl: don't dump argless args
dump_trace() prints a stack backtrace - including caller args - by using
caller() and @DB::args.
However, if a sub is called using the '&foo;' argless mechanism, caller()
doesn't populate @DB::args, so it continues to hold whatever it was set
to previously. This might include SVs which have since been freed or
re-allocated.
So only display args for a particular caller depth if that sub was called
with args.
This was causing smoke failures in lib/perl5db.t when TERM was unset.
It only started failing recently, due I guess to subtle changes in what
SVs were left hanging about in @DB::args from a previous use of caller().
See http://nntp.perl.org/group/perl.perl5.porters/247032
Subject: Smoke FAIL's for lib/perl5db.t
David Mitchell [Wed, 15 Nov 2017 15:19:51 +0000 (15:19 +0000)]
lib/perl5db.t: remove debugging code
A spurious printf was inadvertently added by me with
e05a85b2.
Steve Hay [Wed, 15 Nov 2017 14:07:42 +0000 (14:07 +0000)]
Improve cl version detection
Drop the use of the word "Version" so it works on non-English systems.
Instead, simply look for a number of the form X.Y (or X.Y.Z etc) with word
boundaries around it. Thus, we can find numbers like 12.00.8804 or
19.00.24213.1, but not accidentally pick up things like x86 or 1984-1998.
Also, drop the "--version" argument since it doesn't really exist and
causes warnings/errors to be output. A bare "cl" command suffices to get a
usage message including the version number to be output.
Finally, the Windows version detection can be similarly improved.
This fixes perl #132421.
Zefram [Wed, 15 Nov 2017 08:17:30 +0000 (08:17 +0000)]
perldelta for stat(CLOSED) fix
Zefram [Wed, 15 Nov 2017 08:11:37 +0000 (08:11 +0000)]
set $! when statting a closed filehandle
When a stat fails because it's on a closed or otherwise invalid
filehandle, $! was often not being set, depending on the operation
and the nature of the invalidity. Consistently set it to EBADF.
Fixes [perl #108288].
Karl Williamson [Wed, 15 Nov 2017 04:33:43 +0000 (21:33 -0700)]
POSIX.pod: Add cautions about locale use
Karl Williamson [Mon, 13 Nov 2017 05:29:58 +0000 (22:29 -0700)]
locale.c: Use mnemonic
Replace this number by an already existing mnemonic
Father Chrysostomos [Wed, 15 Nov 2017 02:58:12 +0000 (18:58 -0800)]
perldelta for the prev. commit
Father Chrysostomos [Wed, 15 Nov 2017 02:55:55 +0000 (18:55 -0800)]
[perl #132442] Fix stack with do {my sub l; 1}
A block in perl usually compiles to a leave op with an enter inside
it, followed by the statements:
leave
enter
nextstate
... expr ...
nextstate
... expr ...
If a block contains only one statement, and that statement is suffic-
iently innocuous, then the enter/leave pair to create the scope at run
time get skipped, and instead we have a simple scope op which is not
even executed:
scope
ex-nextstate
... expr ...
The nextstate in this case also gets nulled.
In the case of do { my sub l; 1 } we were getting a variation of the
latter, that looked like this:
scope
introcv
clonecv
nextstate
... expr ...
The problem here is that nextstate resets the stack, even though a new
scope has not been pushed, so we end up with all existing stack items
from the *outer* scope getting clobbered.
One can have fun with this and erase everything pushed on to the stack
so far in a given statement:
$ ./perl -le 'print join "-", 1..10, do {my sub l; ","}, 11..20'
11,12,13,14,15,16,17,18,19,20
Here I replaced the first argument to join() from within the do{}
block, after having cleared the stack.
Why was the op tree was getting muddled up like this? The ‘my sub’
declaration does not immediately add any ops to the op tree; those ops
get added when the current scope finishing compiling, since those ops
must be inserted at the beginning of the block.
I have not fully looked into the order that things happen, and why the
nextstate op does not get nulled; but it did not matter, because of
the simple fix: Treat lexical sub declarations as ‘not innocuous’ by
setting the HINT_BLOCK_SCOPE flag when a lexical sub is declared.
Thus, we end up with an enter/leave pair, which creates a
proper scope.
Sawyer X [Tue, 14 Nov 2017 20:44:28 +0000 (21:44 +0100)]
Update experimental.pm from 0.016 to 0.017
James E Keenan [Tue, 14 Nov 2017 19:26:35 +0000 (14:26 -0500)]
Paul Marquess [Tue, 14 Nov 2017 19:15:25 +0000 (14:15 -0500)]
Compress-Raw-Zlib: sync with CPAN version 2.075
https://rt.cpan.org/Ticket/Display.html?id=123245 reports a security
vulnerability in versions zlib 1.2.8 thru 1.2.10 of the zlib library. Zlib is
bundled with Compress-Raw-Zlib, so any vulnerability reappears once
Compress-Raw-Zlib is shipped with Perl 5. The vulnerability is present in
production releases up to and including perl-5.26.1.
To address this vulnerability, this commit upgrades us to the latest CPAN version.
David Mitchell [Tue, 14 Nov 2017 13:27:59 +0000 (13:27 +0000)]
OP_MULTICONCAT: fix AIX
The OP_MULTICONCAT work broke AIX builds because it turns out that
PerlMemShared_malloc() isn't safe (in the sense of safemalloc());
i.e. on AIX, PerlMemShared_malloc(0) returns NULL.
Steve Hay [Tue, 14 Nov 2017 14:06:28 +0000 (14:06 +0000)]
Upgrade libnet from version 3.10 to 3.11
This includes https://github.com/steve-m-hay/perl-libnet/pull/32
Steve Hay [Tue, 14 Nov 2017 14:01:33 +0000 (14:01 +0000)]
Fix Windows build failure introduced by
7d00a3405c
Craig A. Berry [Tue, 14 Nov 2017 13:13:19 +0000 (07:13 -0600)]
Handle empty list in Perl_vms_do_aexec.
Since
2fcab33080e this is now expected and tested for, so do
what other platforms do.
Zefram [Tue, 14 Nov 2017 13:14:14 +0000 (13:14 +0000)]
mv "Truth and Falsehood" from perlsyn to perldata
This one-paragraph section didn't belong in perlsyn. perldata already
had a paragraph on the topic; merge them. [perl #115650]
Zefram [Tue, 14 Nov 2017 12:56:35 +0000 (12:56 +0000)]
fix newPVOP() doc re freeing of pv
[perl #127697]
Aaron Crane [Tue, 14 Nov 2017 12:07:19 +0000 (12:07 +0000)]
perldelta: typo
Ilmari++
Aaron Crane [Tue, 14 Nov 2017 11:51:01 +0000 (11:51 +0000)]
perldelta: C89 requirement
Zefram [Tue, 14 Nov 2017 09:49:11 +0000 (09:49 +0000)]
fix naming of some test temp files
The files should be named t/tmp*, to fall under .gitignore and be ignored
by podcheck.
David Mitchell [Tue, 14 Nov 2017 08:55:53 +0000 (08:55 +0000)]
fix ext/B/t/optree_specials.t
recent changes to expected output didn't account for the way nextstate ops
change their hints display when run under
LC_ALL=en_US.UTF-8 PERL_UNICODE=""
One day we'll make this automatic.
Zefram [Tue, 14 Nov 2017 08:49:16 +0000 (08:49 +0000)]
stop unused-var warnings in ExtUtils-ParseXS tests
These are warnings resulting from unusual features of the specific XS
code in the test suite, not from XS compilation in general.
Zefram [Tue, 14 Nov 2017 08:45:55 +0000 (08:45 +0000)]
avoid unused-var warnings in compiled XS
Code generated by ExtUtils-ParseXS for certain kinds of XS sub
was creating an "items" variable and never using it, resulting in
distracting warnings from the C compiler. Add "PERL_UNUSED_VAR(items)"
where appropriate.
Zefram [Tue, 14 Nov 2017 07:48:03 +0000 (07:48 +0000)]
rip out Perl version portability from B
B is distributed only with the core, not dual-life, so has no need to
be portable between Perl versions.
Zefram [Tue, 14 Nov 2017 06:40:15 +0000 (06:40 +0000)]
in B::Concise, show RV target better
Especially show the identity of CVs where possible. This is important
now that gv ops often point at a coderef rather than a glob. Fixes [perl
Nicolas R [Tue, 7 Nov 2017 22:10:45 +0000 (16:10 -0600)]
Introduce macros to simplify @INC setting
Distro trends to customize @INC, and to maintain
patches to change the order of @INC or add custom entries.
The goal of this patch is to abstract calls to 'S_incpush_use_sep'
and simplify reordering @INC.
This commit makes the code from perl.c more comfortable to read
by introducing several 'INCPUSH_*' macros for every
'S_incpush_use_sep' call so we can easily reorder them.
Nicolas R [Tue, 7 Nov 2017 18:22:27 +0000 (12:22 -0600)]
Storable: remove Config dependency
RT #132406
Avoid loading Config/Config_heavy from Storable.
Make Storable.pm a template file and check
if the system can use flock at compile time.
__Storable__.pm is the template file to edit,
whereas Storable.pm.PL is the script generating
Storable.pm from __Storable__.pm.
Using a separate file for the template make it
easier to edit.
Also note that Storable.pm is now ignored by git.
Nicolas R [Mon, 13 Nov 2017 22:40:31 +0000 (16:40 -0600)]
Time::HiRes disable a flapping test for CI
When running this test under heavy load
we cannot assume the delta between two system calls...
even when using a (nano)sleep
Most Continuous Integration system will fail on this
test at one point or the other.
Craig A. Berry [Tue, 14 Nov 2017 00:52:38 +0000 (18:52 -0600)]
Make perlbug.t forgiving about newlines.
On VMS, pipes often introduce extra newlines, so the test
infrastructure deduplicates them, which then makes it impossible
to check for more than one. So just check for one or more.
Nicolas R [Mon, 13 Nov 2017 21:04:38 +0000 (15:04 -0600)]
travis.yaml: fixes for osx
run brew update before installing ccache
use TRAVIS_OS_NAME macro to check os
Nicolas R [Mon, 13 Nov 2017 19:54:49 +0000 (13:54 -0600)]
Adjust porting/authors.t for travisci
Add plan to porting/authors.t
skip_plan was used but no plan or tap output was defined.
When the test is run by TravisCI, use a shorten
revision range. We do not want to have a pull request impacted
by the previous state of blead, and we do not want to check
the merge commit from travis which is using the github author
primary email address.
Nicolas R [Mon, 13 Nov 2017 15:34:16 +0000 (09:34 -0600)]
Remove win32 logic from t/porting/authors.t
Remove special logic for windows by using 'qx'.
Allow test to be run from main root directory.
Nicolas R [Wed, 13 Sep 2017 17:22:32 +0000 (11:22 -0600)]
Switch some core modules to XSLoader
RT 132080: Remove perl 5.006 compatibilities with DynaLoader and use
XSLoader directly.
The traditional boiler plate to use XSLoader for Perl > 5.006 or
DynaLoader, does not make sense for core modules in perl 5.28+.
Todd Rinaldo [Mon, 13 Nov 2017 20:08:11 +0000 (14:08 -0600)]
Track Unicode-Normalize Changes file so it can be updated as it is changed in Perl
Nicolas R [Mon, 13 Nov 2017 19:44:10 +0000 (13:44 -0600)]
Tweak travis.yml: ccache & notifications
- builds are now using ccache
- use multiline syntax for main script
- irc notifications are now enabled and sent to #p5p-qa channel
Nicolas R [Wed, 8 Nov 2017 17:18:51 +0000 (10:18 -0700)]
Makefile.SH: factorize install.html target
Avoid duplicate definition of install.man and install.html
targets. We could then use in a later commit a Configure option
to disable doc installation on demand.
Chris 'BinGOs' Williams [Mon, 13 Nov 2017 13:45:36 +0000 (13:45 +0000)]
Update Unicode-Collate to CPAN version 1.23
[DELTA]
1.23 Mon Nov 13 19:10:28 2017
- Now UCA_Version 36 (for Unicode 10.0.0) is supported.
* But the default UCA_Version is still 34.
- added nushu.t in t.
1.22 Sat Nov 11 10:53:35 2017
- internal: someone suggests using 'exists' for checking the truth of
$collator->{mapping}{$variable} and $collator->{maxlength}{$variable},
where $variable may stand for codepoints whose mapping is not defined;
though such a problem was not reproduced on my environment.
Matthew Horsfall [Mon, 13 Nov 2017 14:34:02 +0000 (09:34 -0500)]
Fix sentence in perlobj.pod (missing a word)
Reported by geospeck
Zefram [Mon, 13 Nov 2017 13:30:36 +0000 (13:30 +0000)]
localise $@ around source filters
$@ could be clobbered by source filters, screwing up the reporting of
errors in the filtered source. Prevent this by localising $@ around
each call to a source filter. Fixes [perl #38920].
David Mitchell [Mon, 13 Nov 2017 11:50:14 +0000 (11:50 +0000)]
change OP_MULTICONCAT nargs from UV to SSize_t
Change it from unsigned to unsigned since it makes the SP-adjusting code
in pp_multiconcat easier without hitting undefined behaviour (RT #132390);
and change its size from UV to SSize_t since it represents the number
of args on the stack.
David Mitchell [Mon, 13 Nov 2017 11:03:15 +0000 (11:03 +0000)]
rename op_aux field from 'size' to 'ssize'
This part of the op_aux union was added for OP_MULTICONCAT; its actually
of type SSize_t, so rename it to ssize to better reflect that it's signed.
This should make no functional difference.
David Mitchell [Mon, 13 Nov 2017 09:18:07 +0000 (09:18 +0000)]
configpm: fix duplicate 'our' declaration
This file of old incorrectly had both
use vars '$Config_SH_expanded';
and
our $Config_SH_expanded;
lines. After a recent commit which did s/use vars/our/g, the duplicate
'our' declaration started warning.
H.Merijn Brand [Mon, 13 Nov 2017 08:03:40 +0000 (09:03 +0100)]
Do not (attempt to) install man pages when explicitly disabled
Configure … -Dman1dir=none -Dman3dir=none …
→
installman1dir=''
installman3dir=''
Zefram [Mon, 13 Nov 2017 07:52:35 +0000 (07:52 +0000)]
avoid redundant initialisation around Newxz()
Reduce Newxz() to Newx() where all relevant parts of the memory are
being explicitly initialised, and don't explicitly zero memory that was
already zeroed. [perl #36078]
Zefram [Mon, 13 Nov 2017 07:49:13 +0000 (07:49 +0000)]
remove unused struct member "is_top_frame"
Zefram [Mon, 13 Nov 2017 07:45:35 +0000 (07:45 +0000)]
duplicate full index for SAVEt_AELEM
The index in a SAVEt_AELEM save entry is now IV-sized, but only an I32
portion of it was being duplicated. This would lead to restoring the
wrong element if a pseudfork were done with a localised array element
on the stack, if the array index were above the 32-bit range or on a
big-endian architecture.
Zefram [Mon, 13 Nov 2017 01:07:00 +0000 (01:07 +0000)]
fix sysconf panic
If sysconf() failed to provide the page size, there was an attempt to
panic with an error message. But rather than generate an error message
from errno, the code would attempt to read it from ERRSV. Not only had
nothing put the error message into ERRSV, but the glob behind ERRSV
didn't even exist yet, so attempting to evaluate ERRSV would segv.
Change this to use Strerror() and never touch ERRSV. [perl #115880]
James E Keenan [Sun, 12 Nov 2017 23:10:28 +0000 (18:10 -0500)]
Merge branch 'smoke-me/jkeenan/afresh/132401-file-copy' into blead
Dagfinn Ilmari Mannsåker [Wed, 8 Nov 2017 20:25:56 +0000 (20:25 +0000)]
Fix sprintf multiconcat on 32bit big-endian systems with use64bitint
The sprintf offset calculation was assigning to the 'uv' field of the
aux union, while the code was reading from the 'size' field, which leads
to all zeroes when sizeof(uv) > sizeof(size_t) on a big-endian system.
Zefram [Sun, 12 Nov 2017 05:58:36 +0000 (05:58 +0000)]
better document macros taking literal strings
When giving a function-style prototype for a macro taking a literal string
parameter, put a string literal in place of a type for that parameter.
This goofy appearance makes it obvious that this isn't really a function,
and clues the reader in that the parameter can't actually be an arbitrary
expression of the right type. Also change the nonsensical "NUL-terminated
literal string" to "literal string" to describe these parameters.
Fixes [perl #116286].
Zefram [Sun, 12 Nov 2017 04:16:13 +0000 (04:16 +0000)]
document IO::Select error detection
Lukas Mai [Sun, 12 Nov 2017 01:58:32 +0000 (02:58 +0100)]
prevent invalid memory access in S_check_uni (RT #132433)
Daniel Dragan [Sun, 16 Aug 2015 08:30:23 +0000 (04:30 -0400)]
fix do dir returning no $!
do()ing a directory was returning false/empty string in $!, which isn't
an error, yet documentation says $! should have the error code in it.
Fix this by returning EISDIR for dirs, and EINVAL for block devices.
[perl #125774]
Remove "errno = 0" and comment added in
b2da7ead68, since now there is no
scenario where errno is uninitialized, since the dir and block device
failure branches now set errno, where previously they didn't.
Zefram [Sat, 11 Nov 2017 23:58:32 +0000 (23:58 +0000)]
avoid reading errno twice in a row
Reading errno can involve calling a function and indirecting through
its result, so cache the value of errno where possible. [perl #122096]
Zefram [Sat, 11 Nov 2017 23:21:48 +0000 (23:21 +0000)]
suppress clang warning in inode number handling
The gcc warning was already suppressed, but clang needs a different
formulation.
Lukas Mai [Sat, 11 Nov 2017 17:18:14 +0000 (18:18 +0100)]
teach makedef.pl about PL_keyword_plugin_mutex
This fixes t/porting/globvar.t.
Father Chrysostomos [Fri, 10 Nov 2017 21:57:33 +0000 (13:57 -0800)]
perldelta for reënabling of CV optimization
Father Chrysostomos [Sun, 29 Oct 2017 18:21:45 +0000 (11:21 -0700)]
Revert "Temporarily revert CV-in-stash optimisation"
This reverts commit
6eed25e2537643b77650cb3e4514ec9dc2e97d74.
Lukas Mai [Sat, 11 Nov 2017 12:35:13 +0000 (13:35 +0100)]
Revert "Simplify _MEM_WRAP_NEEDS_RUNTIME_CHECK()"
This reverts commit
004073bac990d90244eb463f435c52d4040b36df.
Lukas Mai [Sat, 11 Nov 2017 12:34:20 +0000 (13:34 +0100)]
fix MEM_SIZE_MAX definition
Zefram [Sat, 11 Nov 2017 12:44:49 +0000 (12:44 +0000)]
perldelta entry for perlguts revision
Zefram [Sat, 11 Nov 2017 12:20:40 +0000 (12:20 +0000)]
better documentation of reference counts
Lukas Mai [Sat, 11 Nov 2017 10:19:05 +0000 (11:19 +0100)]
Merge wrap_keyword_plugin() into blead
Lukas Mai [Thu, 9 Nov 2017 00:19:58 +0000 (01:19 +0100)]
perldelta entry for wrap_keyword_plugin
Lukas Mai [Thu, 9 Nov 2017 00:00:23 +0000 (01:00 +0100)]
test wrap_keyword_plugin (RT #132413)
Lukas Mai [Wed, 8 Nov 2017 23:59:53 +0000 (00:59 +0100)]
add wrap_keyword_plugin function (RT #132413)
Zefram [Sat, 11 Nov 2017 10:05:53 +0000 (10:05 +0000)]
avoid runtime module loading in File::Spec
Incidentally remove the ->_cwd method from the subclassing interface of
File::Spec::Unix, in favour of direct calls to Cwd::getcwd().
Zefram [Sat, 11 Nov 2017 07:40:20 +0000 (07:40 +0000)]
return inode numbers as strings where necessary
We previously used a lossy conversion of inode numbers to floating point,
where they're too big to fit the IV/UV format. That sucks; a rounded
inode number is nearly useless. Instead, fall back to returning a
string of decimal digits. That preserves the entire value, for code
that looks at it in the right way, and collapses to the former fallback
in other situations.
Todd Rinaldo [Sat, 11 Nov 2017 07:08:34 +0000 (01:08 -0600)]
[MERGE] Remove unnecessary use of 'use vars'
Todd Rinaldo [Sat, 11 Nov 2017 07:03:26 +0000 (01:03 -0600)]
Document the removal of use vars from sources
Nicolas R [Wed, 13 Sep 2017 22:52:16 +0000 (16:52 -0600)]
Replace multiple 'use vars' by 'our' in regen.
then run ./regen_perly.pl to update perly files
Todd Rinaldo [Sat, 11 Nov 2017 06:42:36 +0000 (00:42 -0600)]
Replace multiple 'use vars' by 'our' in t
Nicolas R [Tue, 12 Sep 2017 19:20:25 +0000 (13:20 -0600)]
Replace multiple 'use vars' by 'our' in utils
Using vars pragma is discouraged and has been superseded by 'our' declarations
available in Perl v5.6.0 or later.
Nicolas R [Tue, 12 Sep 2017 19:20:25 +0000 (13:20 -0600)]
Replace multiple 'use vars' by 'our' in ext
Using vars pragma is discouraged and has been superseded by 'our' declarations
available in Perl v5.6.0 or later.
This commit is about replacing the usage of 'vars' pragma
by 'our' in 'ext' directory.
Nicolas R [Tue, 12 Sep 2017 19:20:25 +0000 (13:20 -0600)]
Replace multiple 'use vars' by 'our' in lib
Using vars pragma is discouraged and has been superseded by 'our' declarations
available in Perl v5.6.0 or later.
This commit is about replacing the usage of 'vars' pragma
by 'our' in 'lib' directory.
Nicolas R [Tue, 12 Sep 2017 19:20:25 +0000 (13:20 -0600)]
Replace multiple 'use vars' by 'our' in dist
Using vars pragma is discouraged and has been superseded
by 'our' declarations available in Perl v5.6.0 or later.
Additionally using 'vars' pragma increase the memory consumption of a
program by about 700 kB for no good reason.
This commit is about replacing the usage of 'vars' pragma
by 'our' in blead where it makes sense. ( leaving 'cpan' directory
outside of the scope )
-- using vars
perl -e 'use vars qw(@ISA $AUTOLOAD $VERSION); print qx{grep RSS /proc/$$/status} '
VmRSS: 2588 kB
-- using our instead
perl -e 'our (@ISA, $AUTOLOAD, $VERSION); print qx{grep RSS /proc/$$/status} '
VmRSS: 1864 kB
Karl Williamson [Fri, 10 Nov 2017 02:23:13 +0000 (19:23 -0700)]
locale.c: Simplify code in Perl_langinfo()
Instead of a switch() statement we can use 'foo ? bar : baz;'
Zefram [Sat, 11 Nov 2017 04:06:59 +0000 (04:06 +0000)]
store AV iterator as mg_len in more cases
The iterator of an AV is an IV value attached to the AV via magic.
It may be stored in the space used by mg_len, or it may be stored in
separately allocated space referenced by mg_ptr. The former is more
efficient, so should be preferred. The original code for AV iterators
would use mg_len if IV was (the same size as) I32, because mg_len was of
type I32. Since then mg_len has been increased to type SSize_t, but the
conditional about how AV iterators are stored wasn't updated to match.
As a result, on the now very common 64-bit builds we were missing out on
the opportunity to use the more efficient form of storage. This commit
updates the condition about how AV iterators are stored, to take account
of the new type.
In principle AV iterators ought to be of type SSize_t, and thus *always*
storable as mg_len. But Perl_av_iter_p() is in the public API with
its IV* return type, so there is a compatibility issue to address in
changing that.
Todd Rinaldo [Fri, 10 Nov 2017 17:13:09 +0000 (11:13 -0600)]
Add support for --help and --version in perlbug
RT 130032: Thanks to Houston Perl Mongers for contributing to this work at
our monthly meeting!
NPD
Nicolas R [Fri, 10 Nov 2017 20:25:12 +0000 (13:25 -0700)]
PACKAGING: add patchlevel.h doc entry
Nicolas R [Fri, 10 Nov 2017 20:27:39 +0000 (13:27 -0700)]
.gitignore: git should also ignore *.bak files
Slaven Rezic [Thu, 9 Nov 2017 22:05:00 +0000 (16:05 -0600)]
Handle Linux containers' use of 0 for PPID with orphaned procs in t/op/getppid.t
Bug 130143: Travis-ci has moved to using docker for their testing environments.
However a Docker environment has multiple process trees so therefore orphaned
processes often get a Parent PID of 0 not 1. The previous unit test for this
considered 0 to be a failure. There is now special code to handle this exception
in the unit test for getppid.
Nicolas R [Thu, 9 Nov 2017 16:46:43 +0000 (09:46 -0700)]
Adjust travis.yaml configuration for blead merges.
- Unset PERL_BUILD_PACKAGING during builds
- Set JOBS to indicate how parallel we want builds to be (4)
- Assure tags are fetched to allow t/porting/cmp_version.t to build.
David Cantrell [Fri, 10 Nov 2017 13:06:00 +0000 (13:06 +0000)]
experimental::lexical_topic is no longer a warning category, it's a fatal compile-time error
Craig A. Berry [Fri, 10 Nov 2017 13:58:31 +0000 (07:58 -0600)]
Make VMS::Stdio declare PERL_EXT.
We haven't been able to compile this extension since
f55ac4a45513
because strBEGINs is not in the API and until now it has not
depended on anything not in the API. So declare the fact that
it's a core extension and can use core-only macros.
Chris 'BinGOs' Williams [Fri, 10 Nov 2017 09:34:40 +0000 (09:34 +0000)]
Update Unicode-Collate to CPAN version 1.21
[DELTA]
1.21 Sat Nov 4 10:49:19 2017
- mklocale: [rt.cpan.org #121664] . removed from @INC (take 2)
- DUCET is updated (for Unicode 9.0.0) as Collate/allkeys.txt.
* Please notice that allkeys.txt will be overwritten if you have had
other allkeys.txt already.
- The default UCA_Version is 34.
- added tangut.t in t.
- Locale/*.pl and CJK/Korean.pm are updated.
1.20 Fri Nov 3 11:50:21 2017
- XS: [rt.cpan.org #121664] . removed from @INC
- U::C::Locale newly supports locales: dsb, lkt.
Zefram [Fri, 10 Nov 2017 02:07:46 +0000 (02:07 +0000)]
parse yada-yada only as a statement
Commit
f5727a1c71878a34f6255eb1a506c0b21af7d36f tried to make yada-yada
be parsed consistently as a term expression, but actually things are
more complicated than that. The tokeniser didn't accept yada-yada in
the right contexts to make it usable as an expression, and changing
that would require decisions on resolving ambiguities between yada-yada
and flip-flop. It's also documented as being a statement rather than
an expression, though with some incorrect information about ambiguities.
Overall it looks more like the intent was for yada-yada to be a statement.
This commit makes it grammatically treated as such, and also fixes up
the dubious parts of the documentation. [perl #132150]
Karl Williamson [Fri, 10 Nov 2017 01:46:17 +0000 (18:46 -0700)]
sv.c: Fix typo in comment
Karl Williamson [Fri, 10 Nov 2017 01:38:02 +0000 (18:38 -0700)]
malloc.c: Fix typo in comment
Karl Williamson [Fri, 10 Nov 2017 01:37:30 +0000 (18:37 -0700)]
lib/locale.t: Clarify test name
Karl Williamson [Fri, 10 Nov 2017 01:26:43 +0000 (18:26 -0700)]
handy.h: Clarify comment