This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
James E Keenan [Sun, 20 Nov 2016 17:28:15 +0000 (12:28 -0500)]
Correct one POD formatting error in perldelta.
This commit satisfies 'podchecker pod/perldelta.pod', but there remain
problems detected during t/porting/podcheck.t.
Karl Williamson [Sun, 20 Nov 2016 00:33:07 +0000 (17:33 -0700)]
perldelta fixes from khw
The ones I removed are so minor as to not be worth mentioning.
Chad Granum [Sat, 19 Nov 2016 15:37:20 +0000 (07:37 -0800)]
Perldelta updates in prep for tomorrows release
Karl Williamson [Fri, 18 Nov 2016 21:54:09 +0000 (14:54 -0700)]
ExtUtils::ParseXS: Rmv impediment to compiling under C++11
C++11 changed from earlier versions to require space between the end of
a string literal and a macro, so that a feature can unambiguously be
added to the language. Starting in g++ 6.2, the compiler emits a
deprecation warning when there isn't a space (presumably so that future
versions can support C++11).
Although not required by the C++11 change, this patch also makes sure
there is space after a macro call, before a string literal. This makes
the macro stand out, and is easier to read.
Code and modules included with the Perl core need to be compilable using
C++. This is so that perl can be embedded in C++ programs. (Actually,
only the hdr files need to be so compilable, but it would be hard to
test that just the hdrs are compilable.) So we need to accommodate
changes to the C++ language.
Karl Williamson [Fri, 18 Nov 2016 21:41:17 +0000 (14:41 -0700)]
Data-Dumper: Rmv impediment to compiling under C++11
C++11 changed from earlier versions to require space between the end of
a string literal and a macro, so that a feature can unambiguously be
added to the language. Starting in g++ 6.2, the compiler emits a
deprecation warning when there isn't a space (presumably so that future
versions can support C++11).
Although not required by the C++11 change, this patch also makes sure
there is space after a macro call, before a string literal. This makes
the macro stand out, and is easier to read. As part of this, useless ""
following the macro are removed.
This patch also changes the affected lines to not exceed 79 columns, as
specified by perlhack.
Code and modules included with the Perl core need to be compilable using
C++. This is so that perl can be embedded in C++ programs. (Actually,
only the hdr files need to be so compilable, but it would be hard to
test that just the hdrs are compilable.) So we need to accommodate
changes to the C++ language.
Karl Williamson [Fri, 18 Nov 2016 20:34:03 +0000 (13:34 -0700)]
Storable: Rmv impediment to compiling under C++11
C++11 changed from earlier versions to require space between the end of
a string literal and a macro, so that a feature can unambiguously be
added to the language. Starting in g++ 6.2, the compiler emits a
deprecation warning when there isn't a space (presumably so that future
versions can support C++11).
Although not required by the C++11 change, this patch also makes sure
there is space after a macro call, before a string literal. This makes
the macro stand out, and is easier to read.
This patch also changes the affected lines to not exceed 79 columns, as
specified by perlhack.
Code and modules included with the Perl core need to be compilable using
C++. This is so that perl can be embedded in C++ programs. (Actually,
only the hdr files need to be so compilable, but it would be hard to
test that just the hdrs are compilable.) So we need to accommodate
changes to the C++ language.
Karl Williamson [Sat, 19 Nov 2016 12:32:57 +0000 (05:32 -0700)]
threads.xs: Rmv impediment to compiling under C++11
C++11 changed from earlier versions to require space between the end of
a string literal and a macro, so that a feature can unambiguously be
added to the language. Starting in g++ 6.2, the compiler emits a
deprecation warning when there isn't a space (presumably so that future
versions can support C++11).
This patch also changes the affected line to not exceed 79 columns, as
specified by perlhack.
Code and modules included with the Perl core need to be compilable using
C++. This is so that perl can be embedded in C++ programs. (Actually,
only the hdr files need to be so compilable, but it would be hard to
test that just the hdrs are compilable.) So we need to accommodate
changes to the C++ language.
Karl Williamson [Fri, 18 Nov 2016 20:20:50 +0000 (13:20 -0700)]
Time-HiRes: Remove impediment to compiling under C++11
C++11 changed from earlier versions to require space between the end of
a string literal and a macro, so that a feature can unambiguously be
added to the language. Starting in g++ 6.2, the compiler emits a
deprecation warning when there isn't a space (presumably so that future
versions can support C++11).
Although not required by the C++11 change, this patch also makes sure
there is space after a macro call, before a string literal. This makes
the macro stand out, and is easier to read.
This patch also changes any affected lines that exceed 79 columns, as
specified by perlhack.
Code and modules included with the Perl core need to be compilable using
C++. This is so that perl can be embedded in C++ programs. (Actually,
only the hdr files need to be so compilable, but it would be hard to
test that just the hdrs are compilable.) So we need to accommodate
changes to the C++ language.
Karl Williamson [Fri, 18 Nov 2016 20:05:27 +0000 (13:05 -0700)]
Cwd: Remove impediment to compiling under C++11
C++11 changed from earlier versions to require space between the end of
a string literal and a macro, so that a feature can unambiguously be
added to the language. Starting in g++ 6.2, the compiler emits a
warning when there isn't a space (presumably so that future versions can
support C++11). This commit fixes Cwd
This patch also updates the Changes file with information missing from
the previous change to the module.
Code and modules included with the Perl core need to be compilable using
C++. This is so that perl can be embedded in C++ programs. (Actually,
only the hdr files need to be so compilable, but it would be hard to
test that just the hdrs are compilable.) So we need to accommodate
changes to the C++ language.
Aaron Crane [Sat, 19 Nov 2016 13:28:02 +0000 (13:28 +0000)]
Merge branch 'perlre-tidy' into blead
This branch makes assorted cleanups to pod/perlre.pod. In particular, it no
longer claims that long-established, stable regex constructs like (?:pat)
might stop working in the future.
Aaron Crane [Sat, 19 Nov 2016 13:15:18 +0000 (13:15 +0000)]
perlre: don't impugn the stability of all (?…) constructs
Previously, the documentation suggested that any or all of these constructs
might disappear or be significantly changed without notice:
(?#comment)
(?m)
(?^m)
(?:group)
(?m-s:group)
(?^m:group)
(?|branch|reset)
(?=pos lookahead)
(?!neg lookahead)
(?<=pos lookbehind)
(?<!neg lookbehind)
(?<named>capture)
(?'named'capture)
\k<named_backref>
\k'named_backref'
(?{ code })
(??{ postponed regex })
(?1)
(?-2)
(?+2)
(?R)
(?0)
(?&named_subpattern)
(?(condition)consequent|alternate), including (?(DEFINE)defs)
(?>independent subpattern)
(?[ [ext] + [char] - [cls] ])
Of those features, the last one (extended bracketed character classes) is
specifically experimental in our formal sense; but it's not realistic to
think that future versions of Perl might break any of the others — many of
which date back as far as 5.000. Furthermore, even if that were likely
enough to be worth pointing out, it would be better to do so on each of the
affected constructs, rather than with an easier-to-miss blanket notice at
the top of the section.
Therefore, this change removes the blanket notice, and adds a note of
experimental status to the mention of extended bracketed character classes,
linking to our policy definition of what that means.
Aaron Crane [Sat, 19 Nov 2016 13:10:51 +0000 (13:10 +0000)]
perlre: summarise full syntax for (?(cond)then|else) constructs
In the conditional-execution constructs, the condition is always syntactically
surrounded by a single pair of parens. The various constructs therefore show
that pair of parens in all cases; this seems like a good thing. In addition,
the summary for these constructs as a group also shows the parens; this also
seems like a good thing. But it's not immediately obvious that the two sets
of parens are the same.
Rather than trying to clarify the situation using complicated prose, just
show an example of the full syntax for each conditional construct.
Aaron Crane [Sat, 19 Nov 2016 13:07:07 +0000 (13:07 +0000)]
perlre: minor wordsmithing, POD formatting tweaks, etc
Aaron Crane [Sat, 19 Nov 2016 13:01:50 +0000 (13:01 +0000)]
perlre: regularise list items
- Only one list item per construct (and change inbound links)
- Consistently list forms with C<< <name> >> before those with C<< 'name' >>
Aaron Crane [Sat, 19 Nov 2016 12:54:42 +0000 (12:54 +0000)]
Document the package for $REGMARK and $REGERROR
Karl Williamson [Thu, 17 Nov 2016 13:21:54 +0000 (06:21 -0700)]
Change white space to avoid C++ deprecation warning
C++11 requires space between the end of a string literal and a macro, so
that a feature can unambiguously be added to the language. Starting in
g++ 6.2, the compiler emits a warning when there isn't a space
(presumably so that future versions can support C++11). Unfortunately
there are many such instances in the perl core. This commit fixes
those, including those in ext/, but individual commits will be used for
the other modules, those in dist/ and cpan/.
This commit also inserts space at the end of a macro before a string
literal, even though that is not deprecated, and removes useless ""
literals following a macro (instead of inserting a blank). The result
is easier to read, making the macro stand out, and be clearer as to the
intention.
Code and modules included with the Perl core need to be compilable using
C++. This is so that perl can be embedded in C++ programs. (Actually,
only the hdr files need to be so compilable, but it would be hard to
test that just the hdrs are compilable.) So we need to accommodate
changes to the C++ language.
Dagfinn Ilmari Mannsåker [Fri, 18 Nov 2016 14:13:22 +0000 (14:13 +0000)]
Use test.pl functions in t/op/groups.t
The test file was already loading test.pl, but not using any functions
other than skip_all(_if_miniperl). This ports the rest of the test to
using note(), skip() and ok().
Diff is best read with -w and --color-words or --word-diff.
Dan Collins [Fri, 30 Sep 2016 14:35:18 +0000 (10:35 -0400)]
t/op/groups.t: Add missing "nok 1"
For: RT #116775
James E Keenan [Thu, 17 Nov 2016 23:01:13 +0000 (18:01 -0500)]
Remove code commented out since July 1996.
Karl Williamson [Thu, 17 Nov 2016 03:18:59 +0000 (20:18 -0700)]
APItest/t/utf8.t: Fix failing EBCDIC tests
I keep not getting this completely correct, hence
1069c57cb1f4e6b94f8695843243749e9511303e
162256f303e3b2f3936976e692650c18c9cad0a6
But I'm hopeful this is the final answer. We should be operating on I8
strings in this function, translating into I8 at the beginning and
translating back to UTF-EBCDIC at the end (except UTF8SKIP has
purposely been built for speed to not use the transform, so it operates
on UTF-EBCDIC.
Karl Williamson [Thu, 17 Nov 2016 03:17:48 +0000 (20:17 -0700)]
APItest/t/utf8.t: Fill in missing die() reason
I forgot to complete this before the initial commit, so that the reason
for dieing was empty.
Karl Williamson [Thu, 17 Nov 2016 03:15:54 +0000 (20:15 -0700)]
op/bop.t: Fix test failing on EBCDIC
This recently added test did not take into account character set
differences.
Dagfinn Ilmari Mannsåker [Thu, 17 Nov 2016 09:21:07 +0000 (09:21 +0000)]
Remove spurious executable bit from Porting/pod_lib.pl
James E Keenan [Mon, 14 Nov 2016 22:22:22 +0000 (17:22 -0500)]
Account for possibility of DOS file endings.
Although our source code (including this file) is supposed to have only Unix
line endings, cloning, etc., can result in particular users having DOS line
endings. Let's allow '\r\n' to avoid spurious testing or installation
problems.
For: RT #130088, as recommended by Mark E Renzulli (UTRC).
Matthew Horsfall [Wed, 16 Nov 2016 13:31:00 +0000 (08:31 -0500)]
Test descriptions should be one line or ./TEST chokes on them
David Mitchell [Tue, 15 Nov 2016 08:27:48 +0000 (08:27 +0000)]
optimise $ref1 = $ref2 better
When assigning to a ref, the old referent is mortalised if its refcount
is 1, to avoid a premature free on things like $r = $$r or $r = $r->[0].
For the shortcut case where $ref1 and $ref2 are simple refs (no magic etc)
it's possible to do the assign then SvREFCNT_dec() the old value without
having to mortalise it. Which is faster.
Even when it doesn't have to be mortalised (RC > 1) this commit makes it
slightly faster as it no longer calls sv_unref_flags().
Conversely, this commit also makes the short-cut integer assign code path
infinitesimally slower.
David Mitchell [Tue, 15 Nov 2016 08:22:48 +0000 (08:22 +0000)]
perf/benchmarks: tidy scalar assign benchmarks
rename them from expr::assign::* to expr::sassign::* so as to more easily
distinguish them from expr::aassign::, and move them to the correct place
in the file
Matthew Horsfall [Tue, 15 Nov 2016 12:41:51 +0000 (07:41 -0500)]
Report indented here-doc line errors correctly
Nicolas R [Sun, 13 Nov 2016 09:16:23 +0000 (02:16 -0700)]
Cleanup PERL_VERSION checks in .c files
This commit is removing code not exercised by blead
or any later versions using PERL_VERSION.
This is a noop, mainly cleaning code.
Tony Cook [Tue, 15 Nov 2016 03:42:52 +0000 (14:42 +1100)]
Revert "Do not try to fchown() to uid -1 and gid -1."
This reverts commit
c4f643b9fca4c4487ef74e4e6cd5b61a26025698, which
fixed a failure introduced by commit
f95ba548a286b17c260cc168715a9d0d441b14a6 which was reverted in
dd1dbff095629118e73a48a2a6008f03418a07f6.
(uid_t)(-1) and (gid_t)(-1) are perfectly valid parameters to
chown()/fchown() back to POSIX.1-2001 at least.
Tony Cook [Mon, 14 Nov 2016 23:15:42 +0000 (10:15 +1100)]
avoid a declaration conflict on El Capitan with recent XCode
OS X El Capitan doesn't implement the clock_gettime() or clock_getrez()
APIs, but recent versions of XCode, which are released to El Capitan
do include updated headers that declare those functions.
This causes errors like:
HiRes.xs:810:12: error: static declaration of 'clock_gettime' follows non-static
declaration
static int clock_gettime(clockid_t clock_id, struct timespec *ts) {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/time.h:177:5: note:
previous declaration is here
int clock_gettime(clockid_t __clock_id, struct timespec *__tp);
^
HiRes.xs:844:12: error: static declaration of 'clock_getres' follows non-static
declaration
static int clock_getres(clockid_t clock_id, struct timespec *ts) {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/time.h:174:5: note:
previous declaration is here
int clock_getres(clockid_t __clock_id, struct timespec *__res);
^
2 errors generated.
To avoid that, define the emulation functions with our own name
and use a macro to map the standard names to our implemnentations.
Karl Williamson [Mon, 14 Nov 2016 21:52:45 +0000 (22:52 +0100)]
Finish removing POSIX deprecated fcns
Commit
47ed9d9e89922a8e165d6dfc5737772cc5ee7a45 removed various
deprecated functions, as scheduled in this release, but failed to
include everything that should have gotten removed.
Spotted by Abigail.
Dagfinn Ilmari Mannsåker [Mon, 14 Nov 2016 19:05:31 +0000 (20:05 +0100)]
Fix error message for unclosed \N{ in regcomp
An unclosed \N{ that made it through to the regex engine rather than
being handled by the lexer would erroneously trigger the error for
"\N{NAME} must be resolved by the lexer".
This separates the check for the missing trailing } and issues the
correct error message for this.
Lukas Mai [Mon, 14 Nov 2016 14:23:17 +0000 (15:23 +0100)]
toke.c: remove obsolete comment
Lukas Mai [Mon, 14 Nov 2016 14:21:55 +0000 (15:21 +0100)]
op.h: add parens around macro expansion
Aaron Crane [Mon, 14 Nov 2016 14:24:30 +0000 (15:24 +0100)]
t/porting/regen.t: be even more helpful when tests fail
My code here was wrong; it wasn't reporting anything useful when some
dependencies of special regen scripts changed.
Dagfinn Ilmari Mannsåker [Mon, 14 Nov 2016 14:13:58 +0000 (15:13 +0100)]
Document that symbols should be removed from metaconfig.h
Dagfinn Ilmari Mannsåker [Mon, 14 Nov 2016 14:08:03 +0000 (15:08 +0100)]
Remove all symbols from metaconfig.h
Except BOOTSTRAP_CHARSET, which was removed from Configure in commit
1d38f63fe5, they're all used in the code, so metaconfig pulls them in
anyway.
Matthew Horsfall [Mon, 14 Nov 2016 13:52:36 +0000 (08:52 -0500)]
Silence deprecation warnings in tests
Matthew Horsfall [Mon, 14 Nov 2016 13:41:24 +0000 (08:41 -0500)]
Fixup Unicode::UCD pod/version and regen dependent files
Matthew Horsfall [Mon, 14 Nov 2016 13:03:33 +0000 (08:03 -0500)]
Add perldelta for Indented Here-docs
Matthew Horsfall [Fri, 11 Nov 2016 11:35:32 +0000 (06:35 -0500)]
Document Indented Here-docs
Matthew Horsfall [Fri, 11 Nov 2016 09:58:18 +0000 (04:58 -0500)]
Add indented here-docs.
This adds a new modifier '~' to here-docs that tells the parser
that it should look for /^\s*$DELIM\n/ as the closing delimiter.
These syntaxes are all supported:
<<~EOF;
<<~\EOF;
<<~'EOF';
<<~"EOF";
<<~`EOF`;
<<~ 'EOF';
<<~ "EOF";
<<~ `EOF`;
The '~' modifier will strip, from each line in the here-doc, the
same whitespace that appears before the delimiter.
Newlines will be copied as is, and lines that don't include the
proper beginning whitespace will cause perl to croak.
Some examples:
if (1) {
print <<~EOF;
Hello there
EOF
}
prints "Hello there\n";
The following:
if (1) {
print <<~EOF;
Hello There
EOF
}
croaks with:
Indentation on line 1 of here-doc doesn't match delimiter at - line 2.
David Mitchell [Mon, 14 Nov 2016 12:44:12 +0000 (12:44 +0000)]
Remove "Warning: perl appears in your path"
This install warning is more or less obsolete, since most platforms
already *will* have a /usr/bin/perl or similar provided by the OS.
We agreed to remove it in this thread:
http://nntp.perl.org/group/perl.perl5.porters/240000
David Mitchell [Mon, 14 Nov 2016 10:49:25 +0000 (10:49 +0000)]
/t/perf/benchmarks: move expr::index:: to func::
'index' is a perl function, so it should really be in the 'func'
top-level namespace of benchmarks
H.Merijn Brand [Mon, 14 Nov 2016 12:15:25 +0000 (13:15 +0100)]
Additional warning of Name.pl going away
H.Merijn Brand [Mon, 14 Nov 2016 11:37:18 +0000 (12:37 +0100)]
Unicode::UCD documentation for reading Name.pl as encouraged practice
David Mitchell [Mon, 14 Nov 2016 10:35:39 +0000 (10:35 +0000)]
eliminate OPpRUNTIME private PMOP flag
This flag was added in 5.004 and even then it didn't seem to be used for
anything. It gets set and unset in various places, but is never tested.
I'm not even sure what it was intended for.
David Mitchell [Mon, 14 Nov 2016 09:22:09 +0000 (09:22 +0000)]
clarify what the SVf_AMAGIC means
Dagfinn Ilmari Mannsåker [Sun, 13 Nov 2016 14:10:38 +0000 (15:10 +0100)]
Improve error for missing tie() pacakge/method
This brings the error messages in line with the ones used for normal
method calls, despite not using call_method().
Tony Cook [Mon, 14 Nov 2016 00:17:42 +0000 (11:17 +1100)]
make the sysread()/syswrite/() etc :utf8 handle warnings default
as they should be for deprecation warnings
David Mitchell [Sun, 13 Nov 2016 15:03:39 +0000 (15:03 +0000)]
S_scan_subst() - remove extraneous code
My recent commit 6432a58 left an extraneous extra line in that sub
that was added while working up the patch then was no longer needed,
and I forgot to remove it.
Spotted by Hugo - thanks!
David Mitchell [Sun, 13 Nov 2016 14:59:32 +0000 (14:59 +0000)]
reduce cost of SvVALID()
Now that SvVALID() no longer just checks an SV flag, but instead checks
for the existence of a certain type of magic, avoid using this more
expensive macro when its not really needed.
Also, and an extra flag test to SvVALID() to make it fail quicker.
Abigail [Sun, 13 Nov 2016 13:33:46 +0000 (14:33 +0100)]
Certain variables are not longer allowed; document this.
Use of single character variables, with the variable name a non
printable character in the range \x80-\xFF is no longer allowed.
This patch removes the documentation which says this feature is
deprecated, and now states it was allowed in the past.
Dagfinn Ilmari Mannsåker [Sun, 13 Nov 2016 13:36:01 +0000 (14:36 +0100)]
Remove obsolete comment
- "Don't merge yet" - too late
- "as it's likely to get a len parameter" - added in
44130a26
- "and possibly even a U32 hash" - that'd be a new function
Abigail [Sun, 13 Nov 2016 13:08:38 +0000 (14:08 +0100)]
Defined on aggregates is no longer allowed.
Perlfunc was still reporting it as deprecated, and that it will
be deleted in the future.
Abigail [Sun, 13 Nov 2016 12:48:17 +0000 (13:48 +0100)]
Deprecations are to be marked with a D.
"%s() is deprecated on :utf8 handles" us a deprecation message, and
as such, such be marked "(D deprecated)" and not "(W deprecated)".
David Mitchell [Sat, 12 Nov 2016 14:48:52 +0000 (14:48 +0000)]
eliminate SVpbm_VALID flag
This flag is set on an SV to indicate that it has PERL_MAGIC_bm
(fast Boyer-Moore) magic attached. Instead just directly check whether
it has such magic.
This frees up the 0x40000000 bit for anything except AVs and HVs
David Mitchell [Sat, 12 Nov 2016 13:19:58 +0000 (13:19 +0000)]
eliminate SVpbm_TAIL/SvTAIL_on()/SvTAIL_off()
(but keep SvTAIL())
This flag is only set on SVs that have Boyer-Moore magic attached.
Such SVs already re-purpose the unused IVX slot of that SV to store
BmUSEFUL. This commit repurposes the unused NVX slot to store this
boolean value instead.
Now that flag bit (0x80000000) is only used with AVs, HVs, RVs and
scalar SVs with IOK.
David Mitchell [Sat, 12 Nov 2016 11:21:43 +0000 (11:21 +0000)]
Only test SvTAIL when SvVALID
Only use the SvTAIL() macro when we've already confirmed that
the SV is SvVALID() - this is in preparation for removing the
SVpbm_TAIL flag in the next commit
David Mitchell [Sat, 12 Nov 2016 11:02:24 +0000 (11:02 +0000)]
S_setup_longest(): SvTAIL() used where always 0
SvTAIL() isn't set on an SV until fbm_compile() has been called,
so there's no point testing it before calling fbm_compile()
David Mitchell [Thu, 10 Nov 2016 21:38:30 +0000 (21:38 +0000)]
Eliminate SVrepl_EVAL and SvEVALED()
This flag is only used to indicate that the SV holding the text of the
replacement part of a s/// has seen at least one /e.
Instead, set the IVX field in the SV to a true value.
(We already set the NVX field on that SV to indicate a multi-src-line
substitution).
This is to reduce the number of odd special cases for the SVpbm_VALID flag.
David Mitchell [Thu, 10 Nov 2016 20:44:16 +0000 (20:44 +0000)]
remove DOES's usage of SvSCREAM
Currently the SvSCREAM flag is set on a temporary SV whose string value
is "isa", but where for the purposes of printing
Can't call method "XXX"
its name is treated as "DOES" rather than "isa".
Instead, set the temp SV's PVX buffer to point to a special static
string (PL_isa_DOES) whose value is "isa", but the where the error
reporting code can compare the address with PL_isa_DOES and if so, print
"DOES" instead.
This is to reduce the number of odd special cases for the SvSCREAM flag.
David Mitchell [Thu, 10 Nov 2016 14:44:10 +0000 (14:44 +0000)]
remove eval's usage of SvSCREAM
Currently the SvSCREAM flag is set on the sv pointed to by
cx->blk_eval.cur_text, to indicate that it is ref counted.
Instead, use a spare bit in the blk_u16 field of the eval context.
This is to reduce the number of odd special cases for the SvSCREAM flag.
David Mitchell [Sat, 12 Nov 2016 08:05:53 +0000 (08:05 +0000)]
op_dump() - remove extra indentation from PMOP
When dumping a PMOP, it displays the PMOP-specific fields with
an extra set of braces and level of indentation, e.g.
{
TYPE = match ===> 1
FLAGS = (VOID,SLABBED)
PRIVATE = (RTIME)
{
PMf_PRE /abc/ (RUNTIME)
PMFLAGS = (SCANFIRST,ALL)
}
}
This is visually confusing, because child ops are shown in the same way.
This commit removes the extra indentation:
{
TYPE = match ===> 1
FLAGS = (VOID,SLABBED)
PRIVATE = (RTIME)
PMf_PRE /abc/ (RUNTIME)
PMFLAGS = (SCANFIRST,ALL)
}
David Mitchell [Thu, 10 Nov 2016 13:58:36 +0000 (13:58 +0000)]
perlguts: add pTHX_ to magic method examples
These functions all take an interpreter arg these days.
David Mitchell [Thu, 10 Nov 2016 13:52:23 +0000 (13:52 +0000)]
dump.c: don't display an ARRAY's ARYLEN field
Originally xav_arylen was an AV field and was displayed by sv_dump.
In 2005, this ield was removed, and replaced by PERL_MAGIC_arylen_p
magic when needed.
A side effect of this is that sv_dump on a magical AV adds
PERL_MAGIC_arylen_p magic to the av as a side-effect.
Which is undesirable.
This commit just omits displaying 'ARYLEN =' altogether. Any arylen magic
will already be displayed as part of dumping the AV, so it's redundant.
Aaron Crane [Sat, 12 Nov 2016 15:06:51 +0000 (16:06 +0100)]
Test2: __LINE__ and (caller)[2] may be different under Data::Dumper
The __LINE__ token is compiled as an op_const pointing to an SvPV containing
the stringification of the line number. But (caller)[2] yields an SvIV that
directly represents the line number.
Data::Dumper now uses its XS implementation by default, even when its
Deparse option is enabled; previously, Deparse forced use of the pure-Perl
implementation.
The XS and pure-Perl implementations of Data::Dumper differ slightly: the
pure-Perl implementation always dumps defined non-reference scalars with
quotes, while the XS implementation uses a quote-less representation for
small integers. (The precise differences have changed over time, however.)
Test-Simple/t/Test2/modules/API/Context.t uses the minimal testing library
in Test-Simple/t/tools.pl to test itself, and t/tools.pl in turn implements
is_deeply() by doing the equivalent of is(Dumper($got), Dumper($expected)).
Finally, it does is_deeply() on structures containing a line number, but the
"got" structure contains the result of (caller)[2], while the "expected"
structure contains __LINE__. So now that the dumps of those structures are
different, the test fails.
Fix this by doing arithmetic on the __LINE__, thus forcing it to be an IV.
Lukas Mai [Fri, 21 Oct 2016 13:18:38 +0000 (15:18 +0200)]
t/op/caller.t: add a TODO test for RT #129239
Lukas Mai [Fri, 21 Oct 2016 13:04:39 +0000 (15:04 +0200)]
t/op/sub.t: add a TODO test for RT #129916
Aaron Crane [Sat, 12 Nov 2016 12:55:50 +0000 (13:55 +0100)]
Reduce verbosity of "make install.man"
Previously, two progress messages were emitted for each manpage: one by
installman itself, and one by the function in install_lib.pl that it calls
to actually install the file. Disabling the second of those in each case
saves over 750 lines of unhelpful output.
Tony Cook [Wed, 15 Jun 2016 05:02:48 +0000 (15:02 +1000)]
(perl #128295) don't treat -Dprefix=/usr as special
but instead require an extra option -Ddarwin_distribution to produce
the same results.
Dagfinn Ilmari Mannsåker [Thu, 20 Oct 2016 14:23:07 +0000 (15:23 +0100)]
Use CLOCK_REALTIME in clock_nanosleep check
For consistency with the other checks that use CLOCK_* constants.
Dagfinn Ilmari Mannsåker [Thu, 20 Oct 2016 14:17:46 +0000 (15:17 +0100)]
Fix up includes in Time-HiRes Makefile.PL checks
This aligns the includes with what the POSIX, Linux and FreeBSD manpages
say they should be.
Dagfinn Ilmari Mannsåker [Mon, 17 Oct 2016 10:39:56 +0000 (11:39 +0100)]
Use clockid_t throughout in Time::HiRes
Commit
69d1f2c2 makes clockid_t available on all platforms, so use that
for function arguments throughout instead of casting in the
clock_gettime() calls.
This particularly needs smoking with C++ on platforms that provide
clock_gettime but not clockid_t.
H.Merijn Brand [Sat, 12 Nov 2016 11:42:40 +0000 (12:42 +0100)]
skip Net::Ping UDP on HP-UX
Aaron Crane [Mon, 11 Jul 2016 14:25:43 +0000 (15:25 +0100)]
Data::Dumper: the XS implementation now supports Deparse
This will provide a significant performance enhancement for callers that
use deparsing (including Data::Dumper::Concise).
There are no longer any configuration settings or (when run on Perl
5.21.10 or later) platforms that force use of the pure-Perl
implementation.
Aaron Crane [Mon, 11 Jul 2016 13:58:59 +0000 (14:58 +0100)]
Data::Dumper: delete spurious /e flag on substitution
Aaron Crane [Mon, 11 Jul 2016 14:19:39 +0000 (15:19 +0100)]
op.c: clarify documentation for Perl_load_module()
Dagfinn Ilmari Mannsåker [Sat, 12 Nov 2016 10:47:48 +0000 (11:47 +0100)]
Change hv_fetch(…, "…", …, …) to hv_fetchs(…, "…", …)
The dual-life dists all use Devel::PPPort, so they can use this function
even though it was only added in 5.10.
H.Merijn Brand [Sat, 12 Nov 2016 10:09:23 +0000 (11:09 +0100)]
genen. sorry
H.Merijn Brand [Sat, 12 Nov 2016 09:53:40 +0000 (10:53 +0100)]
No default breaks win32 and VMS
James E Keenan [Thu, 10 Nov 2016 01:56:15 +0000 (20:56 -0500)]
RT 130010: add regression test.
Karl Williamson [Wed, 9 Nov 2016 20:55:41 +0000 (21:55 +0100)]
PATCH: [perl #130010] a5540cf breaks texinfo
When a regular expression is compiled that contains user-defined
properties, the subroutine the user must furnish to implement those
properties may not yet be defined. To cope with this possibility, the
regex pattern compiler stores the name and package of the subroutine,
and this is to be expanded the first time the property is actually used
during execution. Once expanded, the property should be immutable, and
so the scalar containing the expansion is marked read-only. It turns
out that prior to the blamed commit, that read-only-ness was being
bypassed in some instances simply by freeing the scalar, replaced by a
new one. The commit changed that. The pattern may contain components
both known at compile time, and deferred until runtime. The two are
combined at the time of expansion, but that was now running afoul of the
read-only setting. This commit simply turns off the read-only flag at
the time of expansion, and it's turned on again afterwards.
The next commit will add a test.
Karl Williamson [Sat, 12 Nov 2016 08:00:08 +0000 (09:00 +0100)]
utf8.c: Add comment
H.Merijn Brand [Fri, 11 Nov 2016 22:18:51 +0000 (23:18 +0100)]
Allow "." to be excluded from @INC
Build with -Ddefault_inc_excludes_dot to have exclude . from @INC.
The *current* default is set to be effectively no change. A future change
will most likely revert the default to the safer exclusion of .
Dagfinn Ilmari Mannsåker [Fri, 11 Nov 2016 17:25:15 +0000 (18:25 +0100)]
Use \w instead of obscure character range
Aaron Crane [Fri, 11 Nov 2016 16:51:17 +0000 (17:51 +0100)]
t/porting/regen.t: try to be more helpful when tests fail
A few of the regen scripts can't be run automatically, for one reason or
another. When regen.t encounters a mismatch corresponding to one of those
scripts, it now tells the porter that the script must be run manually. This
seems more useful than the previous behaviour of merely announcing a
mismatch that "make regen" won't be able to fix.
Karl Williamson [Fri, 11 Nov 2016 13:52:39 +0000 (14:52 +0100)]
Move Unicode-Normalize to dist/
p5p has taken over the maintenance of this module, so it should be in
dist/
Aaron Crane [Fri, 11 Nov 2016 16:39:32 +0000 (17:39 +0100)]
Regen from the "special" regen scripts
A few regen scripts aren't run by "make regen", either because they depend
on an external tool, or they must be run by the Perl just built. So they
must be run manually.
Dagfinn Ilmari Mannsåker [Fri, 11 Nov 2016 15:47:11 +0000 (16:47 +0100)]
Test for correct state of . in @INC
Aaron Crane [Fri, 11 Nov 2016 15:13:00 +0000 (16:13 +0100)]
Fix list parenthesisation
H.Merijn Brand [Fri, 11 Nov 2016 15:39:03 +0000 (16:39 +0100)]
Push current state to work on failing tests
H.Merijn Brand [Sat, 22 Oct 2016 11:55:48 +0000 (13:55 +0200)]
Patch unit tests to explicitly insert "." into @INC when needed.
require calls now require ./ to be prepended to the file since . is no
longer guaranteed to be in @INC.
H.Merijn Brand [Sat, 22 Oct 2016 11:46:08 +0000 (13:46 +0200)]
Remove "." from default @INC when default_inc_excludes_dot is set
Perl now provides a way to build perl without . in @INC by default. If you want
this feature, you can build with -Ddefault_inc_excludes_dot
Because the testing / make process for perl modules do not function well
with . missing from @INC, Perl now supports the environment variable
PERL_USE_UNSAFE_INC=1 which makes Perl behave as it previously did,
returning . to @INC in all child processes.
WARNING: PERL_USE_UNSAFE_INC has been provided during the perl 5.25 development
cycle and is not guaranteed to function in perl 5.26.
Update unit tests and default value files to work with the new %Config
variable "default_inc_excludes_dot"
H.Merijn Brand [Fri, 11 Nov 2016 15:23:05 +0000 (16:23 +0100)]
De-dup the output of git ls-files
Depending on the state of your git folder, some files can appear twice or
more in the output of git ls-files
Karl Williamson [Fri, 11 Nov 2016 15:03:07 +0000 (16:03 +0100)]
locale.c: Add missing STATIC
Lukas Mai [Mon, 19 Aug 2013 05:07:17 +0000 (07:07 +0200)]
Errno: mention that using %! autoloads Errno (RT #119359)
Also use lexical filehandles/3-arg open in example.
Aaron Crane [Fri, 11 Nov 2016 14:56:08 +0000 (15:56 +0100)]
Regen uconfig.h
H.Merijn Brand [Fri, 11 Nov 2016 14:04:59 +0000 (15:04 +0100)]
Re-gen after backport with serious fixes