Father Chrysostomos [Fri, 6 Sep 2013 23:06:07 +0000 (16:06 -0700)]
regcomp.c:S_concat_pat: Allow 64-bit array offsets
Father Chrysostomos [Fri, 6 Sep 2013 23:04:40 +0000 (16:04 -0700)]
Make /@array/ handle nonexistent array elements
Commit ce0d59f changed AVs to use NULLs for nonexistent elements.
S_concat_pat in regcomp.c needs to account for that, to
avoid crashing.
Father Chrysostomos [Fri, 6 Sep 2013 19:35:56 +0000 (12:35 -0700)]
Allow 64-bit array and stack offsets in entersub & goto
I don’t have enough memory to test this, but it needs to be done even-
tually anyway.
Father Chrysostomos [Fri, 6 Sep 2013 15:30:41 +0000 (08:30 -0700)]
Stop &xsub and goto &xsub from crashing on undef *_
$ perl -e 'undef *_; &Internals::V'
Segmentation fault: 11
$ perl -e 'sub { undef *_; goto &Internals::V }->()'
$ perl5.18.1 -e 'sub { undef *_; goto &Internals::V }->()'
Segmentation fault: 11
The goto case is actually a regression from 5.16 (
049bd5ffd62), as
goto used to ignore changes to *_. (Fixing one bug uncovers another.)
We shouldn’t assume that GvAV(PL_defgv) (*_{ARRAY}) gives us anything.
While we’re at it, since we have to add extra checks anyway, use them
to speed up empty @_ in goto (by checking items, rather than arg).
Leon Timmermans [Sat, 7 Sep 2013 04:31:53 +0000 (06:31 +0200)]
Updated ExtUtils::CBuilder to 0.280210
Steve Hay [Fri, 6 Sep 2013 22:36:17 +0000 (23:36 +0100)]
perldelta - Note recent module upgrades
Karl Williamson [Fri, 6 Sep 2013 20:02:25 +0000 (14:02 -0600)]
PATCH: [perl #119601] Bleadperl breaks ETHER/Devel-Declare
I will not otherwise mention that stealing .c code from the core is a
dangerous practice.
This is actually a bug in the module, which had been masked until now.
The first two parameters to utf8_to_uvchr_buf() are both U8*. But both
's' and PL_bufend are char*. The 's' has a cast to U8* in the failing
line, but not PL_bufend.
Interestingly, the line in the official toke.c (introduced in
4b88fb76)
has always been right, so the stealer didn't copy it correctly.
What
de69f3af3 did was turn this former function call into a macro that
manipulates the parameters and calls another function, thereby removing
a layer of function call overhead. The manipulation involves
subtracting 's' from PL_bufend, and this fails to compile due to the
missing cast on the latter parameter.
The problem goes away if the macro casts both parameters to U8*, and
that is what this commit does.
Andy Dougherty [Fri, 6 Sep 2013 12:44:52 +0000 (08:44 -0400)]
Remove Configure hints for the old AT&T 3b1.
I am unaware of any successful builds since the 5.005 era.
David Mitchell [Fri, 6 Sep 2013 14:54:10 +0000 (15:54 +0100)]
pp_goto: document the different branches
Te various different forms of goto (and dump) take different branches
through this big function. Document which branches handle which variants.
Also document the use of OPf_SPECIAL in OP_DUMP.
Chris 'BinGOs' Williams [Fri, 6 Sep 2013 12:59:45 +0000 (13:59 +0100)]
Update ExtUtils-MakeMaker to CPAN version 6.76
[DELTA]
6.76 Fri Sep 6 13:32:42 BST 2013
No changes from 6.75_04
6.75_04 Thu Sep 5 12:07:59 BST 2013
Bug fixes:
* Sanitise make on MSWin32 when reporting Makefile type
6.75_03 Tue Sep 3 00:24:23 BST 2013
New features:
* Added RECURSIVE_TEST_FILES attribute to 'test'
* Report the type of Makefile being generated
Bug fixes:
* RT#17041 more sortification of hashes to Makefile
6.75_02 Sun Sep 1 21:50:48 BST 2013
Bug fixes:
* RT#49043 binmode STDIN breaks prompt() on MSWin32
* RT#14505 Handle -Wl,-rpath correctly
* RT#17041 Sort manification and copying events for perceptive
cleanliness
6.75_01 Thu Aug 29 15:06:27 BST 2013
New features:
* Added NO_PERLLOCAL option to allow suppression of writing
installs to perllocal.pod
* Added NO_PACKLIST option to allow suppression of writing
packlist files for installations
Bug Fixes:
* RT#32894 deal with legitimate linker flags correctly
* RT#88222 check that Time::HiRes has 'stat' before using it
Doc Fixes:
* RT#87350 Document DLEXT parameter (sisyphus)
Smylers [Fri, 6 Sep 2013 05:02:41 +0000 (06:02 +0100)]
Update README copyright to 2013
For RT #119625.
Father Chrysostomos [Fri, 6 Sep 2013 07:51:16 +0000 (00:51 -0700)]
Put AV defelem creation code in one place
Father Chrysostomos [Fri, 6 Sep 2013 07:17:05 +0000 (00:17 -0700)]
Use defelems for (goto) &xsub calls
Before ce0d59f:
$ perl -e '++$#_; &utf8::encode'
Modification of a read-only value attempted at -e line 1.
As of ce0d59f:
$ ./perl -Ilib -e '++$#_; &utf8::encode'
Assertion failed: (sv), function Perl_sv_utf8_encode, file sv.c, line 3581.
Abort trap: 6
Calling sub { utf8::encode($_[0]) } should be more or less equivalent
to calling utf8::encode, but it is not in this case:
$ ./perl -Ilib -we '++$#_; &{sub { utf8::encode($_[0]) }}'
Use of uninitialized value in subroutine entry at -e line 1.
In the first two examples above, an implementation detail is leaking
through. What you are seeing is not the array element, but a place-
holder that indicates an element that has not been assigned to yet.
We should use defelem magic so that what the XSUB assigns to will cre-
ate an array element (as happens with utf8::encode($_[0])).
All of the above applies to goto &xsub as well.
Father Chrysostomos [Fri, 6 Sep 2013 03:33:00 +0000 (20:33 -0700)]
pp_hot.c:pp_aelem: Use _NN in one spot
This av can never be null here. av_len will already have failed an
assertion if it is.
Father Chrysostomos [Thu, 5 Sep 2013 21:39:47 +0000 (14:39 -0700)]
Make pp_splice handle nonexistent array elements
Commit ce0d59f changed AVs to use NULLs for nonexistent elements.
pp_splice needs to take that into account and avoid pushing NULLs on
to the stack.
Chris 'BinGOs' Williams [Fri, 6 Sep 2013 12:24:57 +0000 (13:24 +0100)]
Update Time-Piece to CPAN version 1.23
[DELTA]
1.23 2013-09-06
- add a LICENSE file (thanks, John Peacock!)
- make sure Time::Seconds loads Exporter, which it relies on (thanks,
GFUJI and TOKUHIROM!)
- fix day of year parsing (like "%y%j") (thanks, Doug Wilson)
Slaven Rezic [Sat, 6 Feb 2010 22:55:31 +0000 (23:55 +0100)]
more Slavic intelligibility: added Bosnian to Serbian and Croatian
Bump $VERSION.
For: RT #72594
Steve Hay [Thu, 5 Sep 2013 17:11:07 +0000 (18:11 +0100)]
Stop autodie test from changing a file to stop Git whining about uncommitted changes
The patch has been sent upstream as CPAN#88444.
Steve Hay [Thu, 5 Sep 2013 16:38:13 +0000 (17:38 +0100)]
perldelta - Add note about DynaLoader change (commit
1e5d7f5401)
Steve Hay [Thu, 5 Sep 2013 16:30:05 +0000 (17:30 +0100)]
Locale::Codes has been upgraded from version 3.26 to 3.27
Sullivan Beck [Thu, 5 Sep 2013 13:21:52 +0000 (09:21 -0400)]
PATCH: Bump Locale-Codes from 3.26 to 3.27
I just released Locale-Codes-3.27 which contains the core modules
Locale::Country, Locale::Language, and Locale::Currency. The patch is
attached here.
====
Background:
The core modules Locale::Country, Locale::Language, and
Locale::Currency(all part of the Locale-Codes distribution) should be
updated on aregular basis. They contain "codes" from various internet
standardswhich change over time.
I plan on releasing new versions at 4 times a year to keep the
codesup-to-date. At this point, I'm not planning on any significant
codechanges (other than bug fixes), so the only significant
changesbetween releases should be to update the codes.
>From
708ae6e6e8a6e839cb9510513b82ee95eec80260 Mon Sep 17 00:00:00 2001
From: Sullivan Beck <sbeck@cpan.org>
Date: Thu, 5 Sep 2013 09:12:04 -0400
Subject: [PATCH] Bump Locale-Codes from 3.26 to 3.27
Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
Smylers [Thu, 5 Sep 2013 10:29:15 +0000 (11:29 +0100)]
Make perltodo.pod match other deleted documents
Have the title make clear it's now only a link to the to-do list.
Re-arrange the body content so the most useful thing — the link to the
current to-do list — is first and the history afterwards.
For RT #119615.
Smylers [Thu, 5 Sep 2013 10:26:50 +0000 (11:26 +0100)]
Add titles to deleted OO docs
Helpful somebody who encounters these documents or their titles realize
they contain links to where current information can be found.
For RT #119615, based on Father Chrysostomos's comment in RT #119571.
Smylers [Thu, 5 Sep 2013 10:14:04 +0000 (11:14 +0100)]
Add missing word
For RT #119615.
Smylers [Thu, 5 Sep 2013 10:01:53 +0000 (11:01 +0100)]
List deleted docs alphabetically
perlrepository was added at the end in
5edbc4ff, when I apparently failed
to notice the list was in alphabetical order.
For RT #119615.
Smylers [Thu, 5 Sep 2013 08:07:23 +0000 (09:07 +0100)]
Multiple commits in 1 attachment in Patch Guide
In the Super Quick Patch Guide, if a change involves multiple commits, put
them all in a single perlbug attachment.
Father Chrysostomos says it's easier like this, in a comment on
RT #119599.
It simplifies the instructions, and avoiding the need to mention mail
clients.
Father Chrysostomos [Thu, 5 Sep 2013 08:11:59 +0000 (01:11 -0700)]
util.c:my_pclose: Use NULL in PL_fdpid
PL_fdpid is an AV, and as of ce0d59f AVs use NULL for nonexist-
ent elements.
Without using NULL for deleted elements of PL_fdpid, we end up with
pipes appearing to be open after they have actually been closed.
I don’t know how to write a test for this, but it makes
Proc::ParallelLoop pass its tests.
Father Chrysostomos [Thu, 5 Sep 2013 07:38:53 +0000 (00:38 -0700)]
Update perlguts for the magic flags changes in 5.18
Father Chrysostomos [Thu, 5 Sep 2013 07:33:01 +0000 (00:33 -0700)]
perlguts: Note that SvUTF8 is meaningful only after SvPV
Father Chrysostomos [Thu, 5 Sep 2013 07:22:31 +0000 (00:22 -0700)]
perlguts: consistent spaces after dots
It was inconsistent throughout.
Father Chrysostomos [Thu, 5 Sep 2013 07:03:32 +0000 (00:03 -0700)]
Update perlguts for NULL in AVs
Nicholas Clark [Fri, 23 Aug 2013 09:39:40 +0000 (11:39 +0200)]
Remove references to GNU DLD from Configure and config.sh scripts.
Specifically eliminated i_dld, a variable indicating that <dld.h> should be
included, and remove dld from the list of wanted libraries.
Nicholas Clark [Thu, 5 Sep 2013 09:37:11 +0000 (11:37 +0200)]
Remove support for GNU DLD in DynaLoader.
GNU DLD was a library that provided dynamic linking on a.out based systems.
The last release was in 1996, and it has been superseded by dlopen.
Karl Williamson [Thu, 5 Sep 2013 04:31:01 +0000 (22:31 -0600)]
Move functions prematurely placed into mathoms back to utf8.c
These functions are still called by some CPAN-upstream modules, so can't
go into mathoms until those are fixed. There are other changes needed
in these modules, so I'm deferring sending patching to their maintainers
until I know all the necessary changes.
Karl Williamson [Thu, 5 Sep 2013 04:26:07 +0000 (22:26 -0600)]
regcomp.c: Don't use mathoms function
utf8n_to_uvuni() is on its way out. Instead, this code knows that the
UTF-8 it is looking at is valid (having been already checked earlier in
the regex compilation process), so use valid_utf8_to_uvchr(). This
allows us to get rid of a flag variable.
Karl Williamson [Thu, 5 Sep 2013 03:53:08 +0000 (21:53 -0600)]
perlapi: Remove newly obsolete statement
Since commit
010ab96b9b802bbf77168b5af384569e053cdb63, this function is
now longer a wrapper, so shouldn't be described as such.
Smylers [Thu, 5 Sep 2013 01:39:33 +0000 (03:39 +0200)]
When sending an email manually so it can have multiple patches, point out
that Mutt can construct the email for you.
Obviously this isn't as generally relevant as the rest of the Guide, since
patchers will use many different mail clients. But it's a significant boon
for those who do use Mutt, and a very short addition to the Guide.
Mutt is singled out simply because it has this functionality; I suspect
that most other widely used mail clients don't.
Committer: Removed trailing whitespace. Applied patch manually because other
lines in the file had been rebroken and patch no longer applied cleanly.
For: RT #119599
Smylers [Wed, 4 Sep 2013 11:37:36 +0000 (12:37 +0100)]
Multiple commits in Super Quick Patch Guide
How to use perlbug when a change is a series of commits, not a single
commit.
This is the advice RJBS gave me over IRC. Including it in the guide should
avoid him having to repeat the advice to others.
Committer: Added single quotes around one keyboard command.
For: RT #119599
Smylers [Wed, 4 Sep 2013 10:58:34 +0000 (11:58 +0100)]
Resetting a check out in Super Quick Patch Guide
Add advice so that somebody wishing to submit a second patch doesn't need
to throw away their perl check-out and start again.
Not knowing the 'git clean' step caught me out, and meant perl wouldn't
build for me. Nicholas helped me out. Adding this to the guide will
hopefully save Nicholas from having to repeat that for others (especially
since others may not be fortunate enough to have Nicholas handily seated
next to them at the point they encounter it).
(The non-building was because some things in the repository had been
re-arranged since my previous patch (several months earlier), and the
latest build was getting confused by some files left over from a
pre-re-arragned build.)
The 'git clean' step will also remove the first 0001-*.patch file, avoiding
the problem of there being two files matching that glob when attaching the
second patch.
Committer: Removed trailing whitespace.
For: RT #119599
Smylers [Wed, 4 Sep 2013 10:37:58 +0000 (11:37 +0100)]
Suggest reading blead's Super Quick Patch Guide
The Super Quick Patch Guide has been improved several times. Suggest that
a patcher looks at the latest version in the checkout of blead they've
just made, in case that's been improved since whichever released version
they were reading.
This has caught me out before: I've done something sub-optimal (for me or
those reviewing my patches) by diligently following out-of-date
instructions.
Remove trailing whitespace.
For: RT #119599
Smylers [Wed, 4 Sep 2013 09:54:15 +0000 (10:54 +0100)]
perlbug command wrapped to fit in 79 columns
To pass t/porting/podcheck.t --pedantic
The line-break is inside a $(...), so the lines can be copied-and-pasted
as they are, complete with line-break and extra spaces, and still give the
same output.
Remove trailing whitespace.
For: RT #119599
Smylers [Wed, 4 Sep 2013 09:49:41 +0000 (10:49 +0100)]
Have perlbug report version being patched
In the Super Quick Patch Guide, run the perlbug and perl from the working
copy that the patch is against, so the bug report contains relevant
version and configuration data, rather than that of whichever system perl
the reporter happens to have installed.
For: RT #119599
Smylers [Wed, 4 Sep 2013 10:32:24 +0000 (11:32 +0100)]
Consistent indent on shell commands
Most verbatim lines with shell commands had 2 spaces before the % prompt.
A few had 1 or 4 spaces. Make them all 2.
Remove trailing whitespace.
For: RT #119599
Smylers [Wed, 4 Sep 2013 09:31:25 +0000 (10:31 +0100)]
perlhack.pod tidied
In accordance with the comment at the top of the file, before I make other
changes to it.
Remove trailing whitespace.
For: RT #119599
Steve Hay [Wed, 4 Sep 2013 23:28:56 +0000 (00:28 +0100)]
Upgrade Socket from version 2.011 to 2.012
Nicholas Clark [Wed, 4 Sep 2013 11:20:37 +0000 (13:20 +0200)]
The bisect tool now takes test scripts as targets, and runs them with t/TEST
This makes it easier to bisect when test scripts started failing.
Reini Urban [Tue, 27 Aug 2013 16:52:28 +0000 (11:52 -0500)]
[perl #119481] Check SvVALID for !SvSCREAM, skip PAD
SVpad_NAME = SVp_SCREAM|SVpbm_VALID
Subsequently OUR, TYPED and STATE pads all have SVp_SCREAM set.
SVpad_NAME shares the same bit with SVpbm_VALID, so avoid checking
PADs for SVpbm_VALID.
Smylers [Tue, 3 Sep 2013 13:52:12 +0000 (14:52 +0100)]
Restore perlrepository.pod in stub form
Give Perl doc sites a sane ‘latest’ version to display, directing readers
to current information, rather than showing the Perl 5.12 version in
perpetuity.
And help anybody typing man perlrepository find where the docs have moved
to.
Suggested by Father Chrysostomos in:
http://www.nntp.perl.org/group/perl.perl5.porters/2013/09/msg207079.html
Zefram [Tue, 3 Sep 2013 19:00:22 +0000 (20:00 +0100)]
Carp-1.32 has been released to CPAN
Steve Hay [Tue, 3 Sep 2013 07:48:47 +0000 (08:48 +0100)]
version has been upgraded from version 0.9903 to 0.9904
John Peacock [Mon, 2 Sep 2013 22:49:50 +0000 (18:49 -0400)]
Sync core with CPAN version.pm release
Remove pointless diag lines, which were more trouble than they were
worth. Add code to ensure that SV's with magic are handled properly,
and include a test for it as well. A couple of whitespace changes and
one last set of I32 -> SSize_t upgrade for array indices.
Craig A. Berry [Mon, 2 Sep 2013 21:19:41 +0000 (16:19 -0500)]
Another reason for home-grown kill() on VMS.
For some time now Perl has provided its own kill() function on VMS
due to various problems with the system-supplied one, notably that
when called from within a signal handler, the second signal never
got delivered. This has at long last been corrected in the OS
as of the VMS84I_SYS V3.0 ECO.
But this exposes another problem with the CRTL's kill(), which is
that when called with a signal value of 0 it actually kills the
running program instead of restricting itself to error checking
as the standard requires. This turns out to be documented behavior
and the documented workaround is to define the _POSIX_EXIT macro.
However, universally changing the behavior of the exit() function
in order to prevent
kill(getpid(),0);
from bringing down the program that calls it doesn't seem like the
right trade-off. So just add one more condition to the list of
conditions under which we'll use our own kill().
Karl Williamson [Mon, 2 Sep 2013 17:17:13 +0000 (11:17 -0600)]
toke.c: Clarify comment
Brian Fraser [Mon, 2 Sep 2013 17:07:53 +0000 (14:07 -0300)]
t/op/for.t: Skip a test if the require for XS::APItest fails
Father Chrysostomos [Mon, 2 Sep 2013 15:29:50 +0000 (08:29 -0700)]
Don’t assume targs are contiguous for ‘my $x; my $y’
In commit
18c931a3, the padrange optimisation was prevented from mak-
ing this assumption for ‘my ($x,$y)’, but the assumption was still
there in the code that combines multiple statements into one.
This would lead to assertion failures (or, as of ce0d59f, crashes
under non-debugging builds) if a keyword plugin declined to handle
the second ‘my’, but only after creating a padop.
This fixes a regression from 5.16 affecting Devel::CallParser under
threaded builds.
Nicholas Clark [Mon, 2 Sep 2013 14:04:18 +0000 (16:04 +0200)]
Merge the changes to the internals of match variables.
Nicholas Clark [Thu, 29 Aug 2013 11:12:00 +0000 (13:12 +0200)]
Add a perldelta entry for the changes to the internals of match variables.
Nicholas Clark [Thu, 29 Aug 2013 10:56:27 +0000 (12:56 +0200)]
Simplify some code in Perl_magic_get() and Perl_magic_set().
Remove the checks that avoided confusing $^P, ${^PREMATCH} and ${^POSTMATCH}
now that the latter two do not take that code path. Remove a similar
check for $^S added by commit
4ffa73a366885f68 (Feb 2003). (This commit did
not add any other variable starting with a control-S.) This eliminates all
uses of the variable remaining.
Move the goto target do_numbuf_fetch inside the checks for PL_curpm, as
both its comefroms have already made the same check.
Nicholas Clark [Thu, 29 Aug 2013 10:33:46 +0000 (12:33 +0200)]
Remove now unused $` $' ${^MATCH} ${^PREMATCH} ${^POSTMATCH} code.
The previous commit's changes to Perl_gv_fetchpvn_flags() rendered this
code in Perl_magic_get() and Perl_magic_set() unreachable.
Nicholas Clark [Thu, 29 Aug 2013 10:16:11 +0000 (12:16 +0200)]
Store all other match vars in mg_len instead of mg_ptr/mg_len.
Perl_gv_fetchpvn_flags() now stores the appropriate RX_BUFF_IDX_* constant
in mg_len for $` $' ${^MATCH} ${^PREMATCH} and ${^POSTMATCH}
This makes some code in mg.c unreachable and hence unnecessary; the next
commit will remove it.
Nicholas Clark [Wed, 28 Aug 2013 20:00:54 +0000 (22:00 +0200)]
Store the match vars in mg_len instead of calling atoi() on mg_ptr.
The match variables $1, $2 etc, along with many other special scalars, have
magic type PERL_MAGIC_sv, with the variable's name stored in mg_ptr. The
look up in mg.c involved calling atoi() on the string in mg_ptr to get the
capture buffer as an integer, which is passed to the regex API.
To avoid this repeated use of atoi() at runtime, change the storage in the
MAGIC structure for $1, $2 etc and $&. Set mg_ptr to NULL, and store the
capture buffer in mg_len. Other code which manipulates magic ignores mg_len
if mg_ptr is NULL, so this representation does not require changes outside
of the routines which set up, read and write these variables.
(Perl_gv_fetchpvn_flags(), Perl_magic_get() and Perl_magic_set())
Steve Hay [Mon, 2 Sep 2013 07:41:49 +0000 (08:41 +0100)]
perldelta - Fill in some TODOs, wrap lines etc.
Father Chrysostomos [Sun, 1 Sep 2013 21:51:29 +0000 (14:51 -0700)]
toke.c:scan_const: Don’t use PL_bufptr
PL_bufptr is passed in as an argument, yet scan_const was some-
times looking at its argument (start) and sometimes using PL_bufptr
directly. This is just confusing.
Father Chrysostomos [Sun, 1 Sep 2013 21:47:38 +0000 (14:47 -0700)]
Teach mro code about null array elements
This is part of ticket #119433.
Commit ce0d49f changed AVs to use NULL for nonexistent elements. The
mro lookup code was not accounting for that, causing Class::Contract’s
tests to crash (and perhaps other modules, too).
Father Chrysostomos [Sun, 1 Sep 2013 21:26:29 +0000 (14:26 -0700)]
Refactor some parser.t line number tests
The check() function is designed to check the file set by #line, but
the last half dozen tests have no need to test for that. (I know
because I wrote them.) So make a new check_line function that just
checks the line number, and have them use that.
Father Chrysostomos [Sun, 1 Sep 2013 20:49:33 +0000 (13:49 -0700)]
Fix debugger lines with keyword <newline> =>
Commit 2179133 (in 5.19.2) modified the parser to look past newlines
when searching for => after a keyword. In doing so, it stopped the
parser from saving lines correctly for the debugger:
$ PERL5DB='sub DB::DB{}' perl5.18.1 -detime -e'=>;' -e 'print @{"_<-e"}'
sub DB::DB{};
time
=>;
print @{"_<-e"}
$ PERL5DB='sub DB::DB{}' perl5.19.3 -detime -e'=>;' -e 'print @{"_<-e"}'
sub DB::DB{};
=>;
print @{"_<-e"}
Notice how line 1 is missing in 5.19.3.
When peeking ahead past the end of the line, lex_read_space does need
to avoid incrementing the line number from the caller’s (yylex’s) per-
spective, but it still needs to increment it for lex_next_chunk to put
the lines for the debugger in the right slot. So this commit changes
lex_read_space to increment the line number but set it back again
after calling lex_next_chunk.
Another problem was that the buffer pointer was being restored for a
keyword followed by a line break, but only if there was *no* fat arrow
on the following line.
Father Chrysostomos [Sun, 1 Sep 2013 20:33:49 +0000 (13:33 -0700)]
line_debug.t: Add diagnostics
Father Chrysostomos [Sun, 1 Sep 2013 07:30:59 +0000 (00:30 -0700)]
Fix two line numbers bugs involving quote-like ops
I was going to try and fix #line directives in quote-like operators,
but I found myself fixing bug #3643 at the same time.
Before this commit, the #line directive would last until the end of
the quote-ilke operator, but not beyond:
qq{${
print __LINE__,"\n"; # 43
}};
print __LINE__,"\n"; # 5
The old method:
The lexer would scan to find the closing delimiter after seeing qq{,
incrementing the line number (CopLINE(PL_curcop)) as it went.
Then it would enter a scope for parsing the contents of the string,
with the line number localised and reset to the line of the qq{.
When it finished parsing the contents of qq{...}, it would then pop
the scope, restoring the previous value of the line number.
According to the new method:
When scanning to find the ending delimiter for qq{, the lexer still
increments CopLINE(PL_curcop), but then sets it back immediately to
the line of the first delimiter.
When parsing the contents of qq{...}, the line number is *not* local-
ised. Instead, that’s when we increment CopLINE(PL_curcop) for real.
Hence, scan_str no longer increments the line number (except before
the starting delimiter). It is up to callers to handle that *or* call
sublex_push.
There is some special handling for here-docs. Here-docs’ line numbers
have to increase while the body of the here-doc is being parsed, but
then rewound back to the here-doc marker (<<END) when the code after
it on the same line is parsed. Then when the next line break is
reached, the line number is incremented by the appropriate number for
it to hop over the here-doc body. We already have a mechanism for
that, storing the number of lines in lex_shared->herelines.
Parsing of here-docs still happens the old way, with line num-
bers localised to the right scope. But now we have to move
lex_shared->herelines into the inner scope’s lex_shared struct when
parsing a multiline quote other than a here-doc.
One thing this commit does not handle yet is #line inside a here-doc.
Bug #3643 was one symptom of a larger problem:
During the parsing of the contents of a quote-like operator, the
(localised) line number was incremented only in embedded code snip-
pets, not in constants parts of the string. So
"${ warn __LINE__,
__LINE__,
__LINE__ }"
would correctly give ‘123’. But this would produce the same
incorrectly:
"
foo
bar
baz
${ warn __LINE__,
__LINE__,
__LINE__ }"
Now the parsing of the contents of the string increments the line num-
ber in constant parts, too.
Father Chrysostomos [Sun, 1 Sep 2013 00:47:23 +0000 (17:47 -0700)]
[perl #115768] improve (caller)[2] line numbers
warn and die have special code (closest_cop) to find a nulled
nextstate op closest to the warn or die op, to get the line number
from it. This commit extends that capability to caller, so that
if (1) {
foo();
}
sub foo { warn +(caller)[2] }
shows the right line number.
Father Chrysostomos [Sat, 31 Aug 2013 13:44:12 +0000 (06:44 -0700)]
test.pl:runperl: more portability warnings
VMS treats initial < > | 2> and trailing & as special in command
line arguments, so we should avoid them in tests.
Father Chrysostomos [Fri, 30 Aug 2013 21:50:43 +0000 (14:50 -0700)]
toke.c: Reorder checks around deprecate_escaped_meta
ckWARN_d involves a function call, so put faster checks first.
Father Chrysostomos [Fri, 30 Aug 2013 03:34:04 +0000 (20:34 -0700)]
perl5200delta: Remove Function::Parameters
1.0202 works with bleadperl.
Father Chrysostomos [Thu, 29 Aug 2013 07:49:10 +0000 (00:49 -0700)]
Mention Tk in perl5200delta
See:
https://rt.cpan.org/Ticket/Display.html?id=88210
https://rt.perl.org/rt3//Public/Bug/Display.html?id=118189
Chris 'BinGOs' Williams [Sun, 1 Sep 2013 14:38:07 +0000 (15:38 +0100)]
Update parent to CPAN version 0.227
[DELTA]
0.227
20130991
. Fix RT #88320, restore tests passing for 5.17.5+
Thanks to Zefram for the report and contributing the fix
Steve Hay [Sun, 1 Sep 2013 14:01:54 +0000 (15:01 +0100)]
perldelta - CPAN::Meta::Requirements has been upgraded
Steve Hay [Sun, 1 Sep 2013 13:59:01 +0000 (14:59 +0100)]
Upgrade Unicode::Collate from version 0.98 to 0.99
Steve Hay [Sun, 1 Sep 2013 13:57:33 +0000 (14:57 +0100)]
Upgrade Scalar-List-Utils from version 1.31 to 1.32
Chris 'BinGOs' Williams [Sun, 1 Sep 2013 10:45:24 +0000 (11:45 +0100)]
Update Module-Load-Conditional to CPAN version 0.58
[DELTA]
Changes for 0.58 Sun Sep 1 11:21:59 BST 2013
=================================================
* RT#83728 make quoting work portably and remove
prototypes from one-liner in requires()
Karl Williamson [Sat, 31 Aug 2013 18:42:46 +0000 (12:42 -0600)]
lib/locale.t: Refactor some tests
The tests were to make sure that UTF-8 is returned when it should be.
This makes somewhat these somewhat cleaner
Karl Williamson [Sat, 24 Aug 2013 18:59:46 +0000 (12:59 -0600)]
Make printf, sprintf respect 'use locale' for radix
When called from outside the lexical scope of 'use locale', these now
always print a dot for the decimal point character.
This change is actually done in Perl_sv_vcatpvfn_flags, which is common
to many things, but the principal external effect that I could determine
is on printf and sprintf.
Without this change, unrelated code can change the locale, thus
affecting what an unsuspecting application prints.
Karl Williamson [Sat, 24 Aug 2013 18:42:28 +0000 (12:42 -0600)]
lib/locale.t: Add a bunch of tests
I looked through the online standard and added as many conformance tests
as I could think of.
Karl Williamson [Sat, 24 Aug 2013 18:30:34 +0000 (12:30 -0600)]
lib/locale.t: Display unassigned chars
This adds debug output to list the characters that aren't matched by any
posix class.
Karl Williamson [Sat, 24 Aug 2013 18:28:19 +0000 (12:28 -0600)]
lib/locale.t: Change debug output
This combines the output so that all characters are shown in code point
order, with only ASCII alphanumerics displayed literally. This is
clearer.
Karl Williamson [Sat, 24 Aug 2013 18:25:01 +0000 (12:25 -0600)]
lib/locale.t: Display :punct: characters under debug mode
This class of characters was previously omitted
Karl Williamson [Sat, 24 Aug 2013 18:14:43 +0000 (12:14 -0600)]
lib/locale.t: Use hash keys instead of many arrays
This implementation detail allows easier handling of things as a whole.
We could save code by adding evals, but I'm trying to not add the added
complexity of evals to the tests here.
Karl Williamson [Mon, 15 Jul 2013 02:38:17 +0000 (20:38 -0600)]
More changes to perllocale and POSIX.pod setlocale
These address some concerns from John Peacock.
Chris 'BinGOs' Williams [Sat, 31 Aug 2013 10:21:15 +0000 (11:21 +0100)]
Update CPAN-Meta-Requirements to CPAN version 2.123
[DELTA]
2.123 2013-08-30 12:17:14 America/New_York
[Fixed]
- On Perls prior to v5.12, CPAN::Meta::Requirements will be installed
into the 'core' library path to avoid an older version bundled with
ExtUtils::MakeMaker and installed there taking precedence.
Craig A. Berry [Fri, 30 Aug 2013 15:23:41 +0000 (10:23 -0500)]
Use explicit glob in concise.t.
This was sending a Perl program consisting entirely of '<.>' to
runperl, which on VMS does:
$ perl -e "<.>"
Can't open input file .> as stdin
%RMS-E-FNF, file not found
because the CLI strips the quotes and then the home-grown
redirection code sees the '<' as an invitation to redirect '.>'
to stdin. That's not readily fixable, so just dodge it here.
Steve Hay [Fri, 30 Aug 2013 07:19:58 +0000 (08:19 +0100)]
Upgrade Module::Load::Conditional from version 0.54 to 0.56
Steve Hay [Thu, 29 Aug 2013 21:12:31 +0000 (22:12 +0100)]
perldelta - Note upgrades to Encode and ExtUtils::ParseXS
Zefram [Thu, 29 Aug 2013 21:00:07 +0000 (22:00 +0100)]
preserve $! and $^E in Carp
Carp::longmess and Carp::shortmess now explicitly localise these status
variables, for the reason described in the new paragraph of documentation.
Chris 'BinGOs' Williams [Thu, 29 Aug 2013 18:30:07 +0000 (19:30 +0100)]
Update Encode to CPAN version 2.54
[DELTA]
$Revision: 2.54 $ $Date: 2013/08/29 16:47:39 $
! Encode.xs
+ t/cow.t
Addressed: COW breakage with _utf8_on()
https://rt.cpan.org/Ticket/Display.html?id=88230
! Encode.pm
Reverted the document accordingly to #11
https://github.com/dankogai/p5-encode/pull/10
+ t/decode.t
Unit test for decoding behavior change in #11
https://github.com/dankogai/p5-encode/pull/12
2.53 2013/08/29 15:20:31
! Encode.pm
Merged: Do not short-circuit decode_utf8 with utf8 flags
https://github.com/dankogai/p5-encode/pull/11
Merged: document decode_utf8 behaviour more precise
https://github.com/dankogai/p5-encode/pull/10
! Makefile.PL
Added repository cpan metadata
https://github.com/dankogai/p5-encode/pull/9
Chris 'BinGOs' Williams [Thu, 29 Aug 2013 18:27:59 +0000 (19:27 +0100)]
Update ExtUtils-ParseXS to CPAN version 3.22
[DELTA]
3.22 - Thu Aug 29 19:30:00 CET 2013
- Fix parallel testing crashes.
- Explicitly require new-enough Exporter.
Steve Hay [Thu, 29 Aug 2013 17:09:59 +0000 (18:09 +0100)]
Better check for the fork emulation in t/win32/signal.t
The d_pseudofork Configure variable hasn't been around all that long so
isn't suitable for use in dual-lived module tests, but is good for use in
core tests.
(t/win32/runenv.t doesn't do this since it is actually PERL_IMPLICIT_SYS
rather than the fork emulation which that test requires.)
Karl Williamson [Wed, 21 Aug 2013 03:51:23 +0000 (21:51 -0600)]
Allow trie use for /iaa matching
This adds code so that tries can be formed under /iaa, which formerly
weren't handled. A problem occurs when the string contains the LATIN
SMALL LETTER SHARP S when the regex pattern is not UTF-8 encoded. I
tried several ways to get this to work easily, but ended up deciding it
was too hard, to in this one situation, a new regnode is created to
prevent the trie code from even trying to turn it into a trie.
Karl Williamson [Wed, 21 Aug 2013 03:43:03 +0000 (21:43 -0600)]
Remove no longer necessary constants
These character constants were used only for a special edge case in trie
construction that has been removed -- except for one instance in
regexec.c which could just as well be some other character.
Karl Williamson [Wed, 21 Aug 2013 03:23:59 +0000 (21:23 -0600)]
Remove newly unnecessary regnode, code
The previous commit fixed things up so that this work-around regnode
doesn't have to exist; nor the work around for the EXACTFU_SS regnode
Karl Williamson [Wed, 21 Aug 2013 02:55:44 +0000 (20:55 -0600)]
regcomp.c: Create better estimate of trie match lengths
This commit improves the estimate of the length of a string that a trie
matches. Before this, the estimate gave more false positives, and
required some workarounds which are no longer necessary, and future
commits will remove.
The ultimate answer is to know precisely what will be matched. As noted
in the comments, this information is already largely available in a
global variable. But more work there needs to be done to complete it,
and make it conveniently accessible.
Karl Williamson [Tue, 20 Aug 2013 04:55:14 +0000 (22:55 -0600)]
regcomp.c: Split count variable into two: min, max
This is in preparation in later commits for the min and max to diverge.
This also renames the two variables to emphasize that bytes are what are
being counted, not characters.
Karl Williamson [Tue, 20 Aug 2013 04:38:43 +0000 (22:38 -0600)]
fold_grind.t: Modify trie test
The trie tests just add an alternation of a fixed string. This commit
makes that string the same number of bytes as the first alternative, in
an effort to not bias the test. Otherwise, something that might
otherwise appear to be too short might be long enough to match the fixed
string, defeating properly testing the length.