This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Karl Williamson [Fri, 8 May 2015 23:47:49 +0000 (17:47 -0600)]
Add note to EBCDIC README's, asking for input
I asked on perl-mvs for help in updating these files, but got no advice;
so noting in the files themselves that they are out-of-date, and asking
any reader for help.
David Mitchell [Wed, 6 May 2015 10:56:47 +0000 (11:56 +0100)]
allow undef as an arg to '&' prototype
RT #123475
Commit
e41e9865be5555 (to fix [perl #123062]) restricted the types of
args allowed for a function with a '&' prototype - previously it allowed
array refs and the like. It also removed undef, so this was now a
compile-time error:
sub foo (&) {...}
foo(undef)
However, some CPAN code used the idiom register_callback(undef) to
explicitly disable a registered callback.
So re-allow an explicit undef.
Karl Williamson [Thu, 7 May 2015 23:09:18 +0000 (17:09 -0600)]
perlop: Don't use bitwise string ops on UTF-8
The behavior is likely to change
Karl Williamson [Thu, 7 May 2015 23:08:30 +0000 (17:08 -0600)]
perlop: Make correction
This recipe has the same result under both EBCDIC and ASCII
Karl Williamson [Thu, 7 May 2015 23:07:16 +0000 (17:07 -0600)]
perlguts: Add links to perlunicode
Karl Williamson [Thu, 7 May 2015 22:58:51 +0000 (16:58 -0600)]
perlunicode: Revamp
I've always had problems understanding the point of some of the
discussion of this pod, so I've finally rewritten parts to bring it
up-to-date with modern Unicode support and clarify things.
In particular the "byte" vs "character" semantics didn't make sense to
me. Perl has always used character semantics (outside of a few places
noted in both pod versions); it's just that the advent of Unicode made
'byte' and 'character' no longer synonymous. So I've split that section
of the old pod, with the added section entitled "ASCII rules vs Unicode
rules", which I think is more clear.
Karl Williamson [Thu, 7 May 2015 22:53:34 +0000 (16:53 -0600)]
perlunicode: Nits, minor fixes
Karl Williamson [Thu, 7 May 2015 19:00:00 +0000 (13:00 -0600)]
perluniintro: Add note
Unicode ranges don't currently work in tr///
Karl Williamson [Thu, 7 May 2015 18:56:50 +0000 (12:56 -0600)]
perlunitut: Add note
Karl Williamson [Thu, 7 May 2015 18:54:32 +0000 (12:54 -0600)]
perlrun: Note existence of -DL
Karl Williamson [Thu, 7 May 2015 18:53:45 +0000 (12:53 -0600)]
perlrebackslash: Note \b{sb} is subject to change
The Unicode algorithm has big issues, and may change.
Karl Williamson [Thu, 7 May 2015 18:48:22 +0000 (12:48 -0600)]
perlebcdic: Move text from perlunicode
This consolidates the EBCDIC problems into one place
Karl Williamson [Thu, 7 May 2015 16:58:02 +0000 (10:58 -0600)]
perlapi: Clearer wording in intro
Karl Williamson [Thu, 7 May 2015 03:10:39 +0000 (21:10 -0600)]
perlapi: Add intro text to Unicode section
Karl Williamson [Thu, 7 May 2015 03:07:33 +0000 (21:07 -0600)]
perlunicode: Refer to perlguts for XS handling
Don't redescribe things here. Also refer to perlapi.
Karl Williamson [Thu, 7 May 2015 03:05:19 +0000 (21:05 -0600)]
perlguts: Add/update text about handling Unicode
Karl Williamson [Thu, 7 May 2015 03:02:16 +0000 (21:02 -0600)]
perlguts: Add EBCDIC info
Karl Williamson [Thu, 7 May 2015 03:01:32 +0000 (21:01 -0600)]
perlguts: Nits, corrections and clarifications
Karl Williamson [Thu, 7 May 2015 02:42:15 +0000 (20:42 -0600)]
perlapi: Document some functions
These are mentioned in some other pods. It's best to bring them into
perlapi, and refer to them from the other pods.
Karl Williamson [Thu, 7 May 2015 02:47:15 +0000 (20:47 -0600)]
utf8.h: Add a #define
The name UVCHR... parallels the usage of various functions uvchr...
It's less confusing to keep the same name form for the same type of
functionality
Dave Rolsky [Thu, 7 May 2015 19:59:49 +0000 (14:59 -0500)]
Add a missing word in perlobj
Aristotle Pagaltzis [Thu, 7 May 2015 18:00:28 +0000 (20:00 +0200)]
POSIX: discourage use of default exports
Aristotle Pagaltzis [Thu, 7 May 2015 13:35:20 +0000 (15:35 +0200)]
POSIX/t/math.t: skip fpclassify where unsupported
Aristotle Pagaltzis [Thu, 7 May 2015 12:07:42 +0000 (14:07 +0200)]
POSIX: document the new C99 math constants
Craig A. Berry [Tue, 5 May 2015 02:25:05 +0000 (21:25 -0500)]
Fix unixify when beginning with current directory.
VMS::Filespec::unixify has been truncating its return value and
returning early when the input begins with [] meaning the current
directory. If there was nothing else, we've been getting the right
answer:
[] --> ./
but if there was a file portion of the name it's been getting
omitted:
[]foo.txt --> ./
which is now fixed. Looks like it's been broken since inception
in 5.002, though only with the specific [] case and not if there
was an explicit device or directory name.
Karl Williamson [Wed, 6 May 2015 01:57:45 +0000 (19:57 -0600)]
perlvar: Mention literal cntrls are deprecated in var names
Ricardo Signes [Wed, 6 May 2015 01:16:11 +0000 (21:16 -0400)]
Merge branch 'perldelta' into blead
Ricardo Signes [Mon, 27 Apr 2015 00:45:17 +0000 (20:45 -0400)]
perldelta: sort changed warnings
Ricardo Signes [Mon, 27 Apr 2015 00:42:38 +0000 (20:42 -0400)]
perldelta: sort new warnings
Ricardo Signes [Mon, 27 Apr 2015 00:12:00 +0000 (20:12 -0400)]
perldelta: sort new errors
Ricardo Signes [Mon, 27 Apr 2015 00:03:53 +0000 (20:03 -0400)]
perldelta: minor fixes, XXX-removal, etc.
Ricardo Signes [Sun, 26 Apr 2015 23:56:48 +0000 (19:56 -0400)]
perldelta: combine and sort the various perldoc updates
Ricardo Signes [Sun, 26 Apr 2015 22:35:32 +0000 (18:35 -0400)]
perldelta: minor reordering of optimizations
Ricardo Signes [Sun, 26 Apr 2015 22:29:29 +0000 (18:29 -0400)]
perldelta: remove modules-to-be-removed section
I do not think we will be needing it either.
Ricardo Signes [Sun, 26 Apr 2015 22:27:04 +0000 (18:27 -0400)]
perldelta: remove Notice section
I do not think we will be needing it.
Ricardo Signes [Sun, 26 Apr 2015 22:24:56 +0000 (18:24 -0400)]
perldelta: import changes from perl52111delta
Ricardo Signes [Sun, 26 Apr 2015 22:21:47 +0000 (18:21 -0400)]
perldelta: import changes from perl52110delta
Ricardo Signes [Sun, 26 Apr 2015 22:12:35 +0000 (18:12 -0400)]
perldelta group core enhancements by topic area
Ricardo Signes [Fri, 13 Mar 2015 23:39:16 +0000 (19:39 -0400)]
perldelta: remove unneeded placeholders
also, two minor tweaks: remove note of grok_atou, which is
gone; fix the invocation for acknowledgements.pl
Ricardo Signes [Fri, 13 Mar 2015 23:31:19 +0000 (19:31 -0400)]
perldelta: import changes from perl5219delta.pod
Ricardo Signes [Fri, 13 Mar 2015 23:23:59 +0000 (19:23 -0400)]
perldelta: import changes from perl5218delta.pod
Ricardo Signes [Fri, 13 Mar 2015 23:16:13 +0000 (19:16 -0400)]
perldelta: import changes from perl5217delta.pod
Ricardo Signes [Fri, 13 Mar 2015 23:12:36 +0000 (19:12 -0400)]
perldelta: import changes from perl5216delta.pod
Ricardo Signes [Fri, 13 Mar 2015 23:03:57 +0000 (19:03 -0400)]
perldelta: import changes from perl5215delta.pod
Ricardo Signes [Fri, 13 Mar 2015 22:58:09 +0000 (18:58 -0400)]
perldelta: import changes from perl5214delta.pod
Ricardo Signes [Fri, 13 Mar 2015 22:50:23 +0000 (18:50 -0400)]
perldelta: import changes from perl5213delta.pod
Ricardo Signes [Fri, 13 Mar 2015 22:38:18 +0000 (18:38 -0400)]
perldelta: import changes from perl5212delta.pod
Ricardo Signes [Fri, 13 Mar 2015 22:30:44 +0000 (18:30 -0400)]
perldelta: import changes from perl5211delta.pod
What about perl5210delta, you ask? It had no changes of note beyond
module changes.
David Mitchell [Tue, 5 May 2015 14:50:49 +0000 (15:50 +0100)]
fix weird comment in cop.h blurb
The original blurb which I added to the top of cop.h had an ambiguous
statement in it that sometime later got "corrected" into the wrong
meaning.
David Mitchell [Tue, 5 May 2015 09:44:16 +0000 (10:44 +0100)]
null ptr deref in Perl_cv_forget_slab
RT #124385
Parsing following a syntax error could result in a null ptr dereference.
This commit contains a band-aid that returns from Perl_cv_forget_slab() if
the cv arg is null; but the real issue is much deeper and needs a more
general fix at some point.
Basically, both the lexer and the parser use the save stack, and after an
error, they can get out of sync.
In particular:
1) when handling a double-quoted string, the lexer does an ENTER, saves
most of its current state on the save stack, then uses the literal string
as the toke source. When it reaches the end of the string, it LEAVEs,
restores the lexer state and continues with the main source.
2) Whenever the parser starts a new block or sub scope, it remembers the
current save stack position, and at end of scope, pops the save stack back
to that position.
In something like
"@{ sub {]}} }}}"
the lexer sees a double-quoted string, and saves the current lex state.
The parser sees the start of a sub, and saves PL_compcv etc. Then a parse
error occurs. The parser goes into error recovery, discarding tokens until
it can return to a sane state. The lexer runs out of tokens when toking
the string, does a LEAVE, and switches back to toking the main source.
This LEAVE restores both the lexer's and the parser's state; in particular
the parser gets its old PL_compcv restored, even though the parser hasn't
finished compiling the current sub. Later, series of '}' tokens coming
through allows the parser to finish the sub. Since PL_error_count > 0, it
discards the just-compiled sub and sets PL_compcv to null. Normally the
LEAVE_SCOPE done just after this would restore PL_compcv to its old value
(e.g. PL_main_cv) but the stack has already been popped, so PL_compcv gets
left null, and SEGVs occur.
The two main ways I can think of fixing this in the long term are
1) avoid the lexer using the save stack for long-term state storage;
in particular, make S_sublex_push() malloc a new parser object rather
than saving the current lexer state on the save stack.
2) At the end of a sublex, if PL_error_count > 0, don't try to restore
state and continue, instead just croak.
N.B. the test that this commit adds to lex.t doesn't actually trigger the
SEGV, since the bad code is wrapped in an eval which (for reasons I
haven't researched) avoids the SEGV.
Tony Cook [Tue, 5 May 2015 06:23:59 +0000 (16:23 +1000)]
[perl #124187] don't call pad_findlex() on a NULL CV
Karl Williamson [Tue, 5 May 2015 03:27:14 +0000 (21:27 -0600)]
perlunicode: Update nonchars discussion for Unicode 7.0
Unicode 7.0 changed the prohibition of noncharacters to merely "not
recommend" their use. Perl continues to forbid them in strict input
checking (otherwise security issues could arise), but the discussion
about them needs to be updated to correspond with their new status.
The message raised when they are used probaby should change
correspondingly, but it is too late for 5.22 for that.
This commit deletes some text elsewhere about the noncharacter code
points. This text really wasn't germane to a discussion about UTF-8
(wherein it appeared), as the encoding is irrelevant to these code
points. They're not recommended in any UTF format.
Unicode spells the term "noncharacter" without a hyphen. This pod
changes to follow that spelling.
Aristotle Pagaltzis [Mon, 4 May 2015 03:56:00 +0000 (05:56 +0200)]
POSIX: Regeneralize export.t to non-ASCII platforms
This reverts commit
2da5b9bef2ef557a6978ec45042e29fa38e9bade and solves
the problem by sorting the expectation data instead, to make sure it is
consistent with the sort order of the comparison data. This removes the
need to depend on another file.
Karl Williamson [Tue, 28 Apr 2015 03:52:02 +0000 (21:52 -0600)]
PATCH: [perl #124348] re/pat_advanced solaris failure
Tony Cook traced this down to a compiler bug. But it's easy to change
the code to avoid the problem. The expression evaluates to 0; and was
only in the form that caused the failure to document what was going on.
Now, instead the failed form is shown in comments, and 0 is used
directly.
David Mitchell [Tue, 28 Apr 2015 09:20:14 +0000 (10:20 +0100)]
avoid uninit read in re_op_compile()
Some code in this function examines the first two nodes in the regex to
set suitable flags etc. Part of the code accesses the second node
by using regnext(first), other parts by NEXTOPER(first). The second method
only works when the node is the same size as a basic node. I *think*
that the code only makes use of this second value in situations where
the node *is* basic, but nevertheless, it makes valgrind unhappy when
the first node is an EXACT node, and reading the second node's
supposed type field is actually reading the padding bytes at the end of
the EXACT string, which are uninitialised.
So just use regnext() only.
Something as simple as /x/ on non-debugging builds was enough to make
valgrind complain. (On debugging builds, the program buffer is initially
zero-filled.)
Aristotle Pagaltzis [Tue, 28 Apr 2015 04:13:39 +0000 (06:13 +0200)]
Also restore the index entry for $OLD_PERL_VERSION
This was missed in
d2578154934acc58c35260d46623962e12848748.
Karen Etheridge [Mon, 27 Apr 2015 18:48:13 +0000 (11:48 -0700)]
add back documentation that $OLD_PERL_VERSION is an alias for $]
Karen Etheridge [Mon, 27 Apr 2015 18:38:52 +0000 (11:38 -0700)]
move the documentation for $] out of the deprecated section
David Mitchell [Mon, 27 Apr 2015 13:02:38 +0000 (14:02 +0100)]
op_sibling_splice(): handle custom ops
op_sibling_splice() decides whether a parent op has an op_last field
that needs updating based on the op's class. However, it it didn't
handle OP_CUSTOM ops.
Spotted by Zefram.
Karl Williamson [Sun, 26 Apr 2015 15:37:39 +0000 (09:37 -0600)]
perlhacktips: Add character set portability tip
Karl Williamson [Sun, 26 Apr 2015 15:37:11 +0000 (09:37 -0600)]
perlhacktips: Nit, clarification
David Mitchell [Sat, 25 Apr 2015 16:07:03 +0000 (17:07 +0100)]
[perl #123737] Fix assertion failure with 0$#{
This is a follow-up to FC's
488bc579589, which stopped assertion
failures on parsing 0${. A similar code path still failed with
0$#{.
The fix is similar to the previous fix, although I suspect a more general
fix is needed - perhaps moving the fixes into S_no_op() - but not this
close to the 5.22 release.
Aristotle Pagaltzis [Fri, 24 Apr 2015 03:04:56 +0000 (05:04 +0200)]
correct the deprecation data in Module::CoreList
Karl Williamson [Fri, 24 Apr 2015 00:10:31 +0000 (18:10 -0600)]
perlapi: Wrap long verbatim lines to 79 columns
Karl Williamson [Fri, 24 Apr 2015 00:21:38 +0000 (18:21 -0600)]
Regen podcheck db
Recent commits have caused it to fail under -i-pedantic
Ricardo Signes [Thu, 23 Apr 2015 11:50:53 +0000 (07:50 -0400)]
CoreList: eliminate trailing spaces from some versions
reported by perlancar, [perl #124364]
David Mitchell [Thu, 23 Apr 2015 11:31:34 +0000 (12:31 +0100)]
ix t/uni.parser.t under EBCDIC
A test I added recently made assumptions about what bytes a char
utf8-encodes, which are different under UTF-EBCDIC.
Tony Cook [Tue, 21 Apr 2015 03:50:58 +0000 (13:50 +1000)]
[perl #124357] make sure which_perl() can find ./perl on in op/dump.t
OpenBSD doesn't set $^X to an absolute path. and since op/dump.t
chdir()s to a temp directory, which_perl() produced "./perl" which
is useless in the new directory.
Instead manually set $^X to an absolute path so which_perl() can find
it after the chdir. This should be safe on the platforms we allow
op/dump.t to run on.
Karl Williamson [Wed, 22 Apr 2015 15:25:43 +0000 (09:25 -0600)]
perlebcdic: Correction, clarification
David Mitchell [Wed, 22 Apr 2015 15:26:40 +0000 (16:26 +0100)]
RT #124207: assert failure in ck_stringify()
v5.21.4-416-g73f4c4f converted (among other things) stringify(join(...))
into just join(...). It asserted that the stringify didn't have any extra
children, which it won't normally do, since in something like "@a-" the
elements of the stringify get bundled up into a single tree of concats
etc, and stringify just sees a single top-level join or concat or
whatever. However during error recovery weird stuff can get left on the
stack.
So rather than asserting no more kids, skip the optimisation if there are
more kids.
David Mitchell [Wed, 22 Apr 2015 11:27:36 +0000 (12:27 +0100)]
s/.../$_++/ge assertion failure
The code that updated pos() on a match string assumed that it was SvPOK().
Cunning code like the following converted $_ to SvIOK only:
$_ = 0;
s/.?/$_++/ge;
Steve Hay [Mon, 20 Apr 2015 23:38:05 +0000 (00:38 +0100)]
Module-CoreList-5.
20150420 is now on CPAN (thanks BinGOs!)
Steve Hay [Mon, 20 Apr 2015 23:19:51 +0000 (00:19 +0100)]
Prepare Module::CoreList for 5.21.12 (although it's unlikely to happen)
Steve Hay [Mon, 20 Apr 2015 23:03:07 +0000 (00:03 +0100)]
Bump version for 5.21.12 (although it's unlikely to happen)
Steve Hay [Mon, 20 Apr 2015 22:52:47 +0000 (23:52 +0100)]
Create new perldelta for 5.21.12 (although it's unlikely to happen)
Steve Hay [Mon, 20 Apr 2015 22:40:34 +0000 (23:40 +0100)]
5.21.11 is now released
Steve Hay [Mon, 20 Apr 2015 22:39:34 +0000 (23:39 +0100)]
Two-space indent for poetry in epigraphs.pod
Steve Hay [Mon, 20 Apr 2015 22:37:09 +0000 (23:37 +0100)]
Add 5.21.11 epigraph
Steve Hay [Mon, 20 Apr 2015 19:40:07 +0000 (20:40 +0100)]
5.21.11 today
Steve Hay [Mon, 20 Apr 2015 19:39:53 +0000 (20:39 +0100)]
Finalize perldelta
Steve Hay [Mon, 20 Apr 2015 19:31:25 +0000 (20:31 +0100)]
Update Module::CoreList for 5.21.11
Steve Hay [Mon, 20 Apr 2015 19:27:13 +0000 (20:27 +0100)]
perldelta - Wrap to 79 columns and other minor copy-editing
Steve Hay [Mon, 20 Apr 2015 19:12:40 +0000 (20:12 +0100)]
perldelta - Remove boilerplate sections except for Acknowledgements
Steve Hay [Mon, 20 Apr 2015 19:07:49 +0000 (20:07 +0100)]
perldelta - Fill in rt.perl.org links
Steve Hay [Mon, 20 Apr 2015 19:07:11 +0000 (20:07 +0100)]
perldelta - One more module update
Andreas Koenig [Mon, 20 Apr 2015 16:11:01 +0000 (17:11 +0100)]
CPAN.pm: Fix "Redundant argument in sprintf"
RT #122159
5.22-tobe includes a new warning type, "Redundant argument in sprintf".
Stop CPAN emitting such a warning.
To quote Andreas from the ticket:
"I'll jump to 2.12 then in my copy and will not release a 2.11"
Steve Hay [Mon, 20 Apr 2015 13:22:01 +0000 (14:22 +0100)]
perldelta - Update with remaining changes
Max Maischein [Wed, 8 Apr 2015 16:59:26 +0000 (18:59 +0200)]
Skip testing for PL_warn_locale
When building Perl without locale support, as it happens to be the
situation on Android, that symbol is not available for exporting. So
we always skip it.
Steve Hay [Mon, 20 Apr 2015 08:07:13 +0000 (09:07 +0100)]
perldelta - Begin updating with bug fixes etc
Steve Hay [Mon, 20 Apr 2015 07:34:50 +0000 (08:34 +0100)]
perldelta - Document new test script
Steve Hay [Mon, 20 Apr 2015 07:34:19 +0000 (08:34 +0100)]
perldelta - Documentation updates
Steve Hay [Mon, 20 Apr 2015 07:27:13 +0000 (08:27 +0100)]
perldelta - Update modules
SHIRAKATA Kentaro [Sat, 18 Apr 2015 15:24:51 +0000 (00:24 +0900)]
perldiag: escape all "<--HERE"
Committer: Correct two instances of double 'S<' encoding.
For: RT # 124334
David Mitchell [Sun, 19 Apr 2015 18:24:03 +0000 (19:24 +0100)]
[MERGE] update PERL_OP_PARENT implementation
* op_sibling renamed op_sibparent on PERL_OP_PARENT builds
* renamed op_lastsib to op_moresib
* Perl_op_parent() now only available on PERL_OP_PARENT builds
* OpSIBLING_set removed
* OpMORESIB_set OpLASTSIB_set OpMAYBESIB_set added
* op_sibling_splice() accepts a NULL parent arg
See the thread starting
http://nntp.perl.org/group/perl.perl5.porters/226862
David Mitchell [Sun, 19 Apr 2015 18:21:48 +0000 (19:21 +0100)]
perldelta for PERL_OP_PARENT changes
David Mitchell [Fri, 17 Apr 2015 22:59:46 +0000 (23:59 +0100)]
add Op(MORE|LAST|MAYBE)SIB_set; rm OpSIBLING_set
the OpSIBLING_set() macro just set the op_sibling/op_sibparent field,
and didn't update op_moresib.
Remove this macro, and replace it with the three macros
OpMORESIB_set
OpLASTSIB_set
OpMAYBESIB_set
which also set op_moresib appropriately. These were suggested by Zefram.
Then in the remaining areas in op.c where low-level op_sibling/op_moresib
tweaking is done, use the new macros instead (so if nothing else, they get
used and tested.)
David Mitchell [Fri, 17 Apr 2015 19:38:49 +0000 (20:38 +0100)]
op_parent(): only exist under -DPERL_OP_PARENT
Make the function Perl_op_parent() only be present in perls built with
-DPERL_OP_PARENT. Previously the function was present in all builds, but
always returned NULL on non PERL_OP_PARENT builds.
David Mitchell [Fri, 17 Apr 2015 19:12:54 +0000 (20:12 +0100)]
rpeep(): use op_sibling_splice()
There is an optimisation in rpeep() to convert the optree produced
by 'my $x; my $x' into the optree that would have been produced by
'my ($x, $y)', which allows a padrange optimisation to kick in a bit
later.
Currently the optree is morphed at this point by directly using
OpSIBLING_set() etc. This commit makes it use op_sibling_splice() instead.
We can do this following on from the previous commit, which allows
op_sibling_splice() to be used when we don't know the parent, as long as
we are only splicing in the middle of the children, not at either end.
As well as being cleaner, it also serves as a test for the new feature
of op_sibling_splice().
David Mitchell [Fri, 17 Apr 2015 16:50:36 +0000 (17:50 +0100)]
op_sibling_splice(): allow NULL parent arg
If the splicing doesn't affect the first or last sibling of an op_sibling
chain, then we don't need access to the parent op of the siblings (to
access/update op_first, op_last, OPf_KIDS etc). So allow an NULL parent
arg in that case.
David Mitchell [Fri, 17 Apr 2015 15:52:20 +0000 (16:52 +0100)]
rename op_lastsib to op_moresib, and invert logic
Rather than having a flag which indicates that there are no more siblings,
have a flag which indicates that there are more siblings. This flag was
only introduced during the current blead cycle, so no production releases
know about it.