Karl Williamson [Fri, 27 May 2011 17:01:16 +0000 (11:01 -0600)]
Change inversion lists to SVs
The inversion list is an opaque object, currently implemented as an SV.
Even if it ends up being an HV in the future, Nicholas is of the opinion
that it should be presented to the world as an SV*.
Karl Williamson [Mon, 23 May 2011 01:52:23 +0000 (19:52 -0600)]
overload.pm: Fix broken link
The list this link tries to refer to is a bullet list, and so
doesn't get anchors generated for it, so clicking on the link
fails
Karl Williamson [Fri, 20 May 2011 03:08:44 +0000 (21:08 -0600)]
fix broken links in old perldeltas
We aren't keeping old perldeltas up-to-date, but I had these fixes lying
around, so decided to commit them
Nicholas Clark [Fri, 27 May 2011 14:55:15 +0000 (15:55 +0100)]
Convert B::Deparse's core.t to Test::More.
Bring the joy of strict to it, remove the unused variable @bin, and convert a
literal carriage return to a newline.
Nicholas Clark [Sun, 3 Jul 2011 14:33:54 +0000 (16:33 +0200)]
Use C<< >> to avoid tripping a podchecker heuristic for "don't you mean F<>?"
In this case, commiters/somework is not a file, hence C<> is correct.
Ricardo Signes [Sun, 3 Jul 2011 13:15:47 +0000 (09:15 -0400)]
add when/how to merge/rebase to perlgit.pod
Ricardo Signes [Sun, 3 Jul 2011 12:53:13 +0000 (08:53 -0400)]
remove another duplicated section
(unrelated whitespace fixes also included)
Ricardo Signes [Sun, 3 Jul 2011 12:49:40 +0000 (08:49 -0400)]
remove duplicated "topic branches" section
Ricardo Signes [Sun, 3 Jul 2011 13:03:11 +0000 (09:03 -0400)]
Revert "x"
This reverts commit
a91756ea8ef881f776fe68ca460c433b728977ec.
This commit was accidentally pushed by RJBS, who is abject and sorrowful.
Ricardo Signes [Sun, 3 Jul 2011 13:00:46 +0000 (09:00 -0400)]
x
Karl Williamson [Tue, 26 Apr 2011 15:23:10 +0000 (09:23 -0600)]
README.foo: Change NAME to perlfoo
This fixes broken links to these
Abhijit Menon-Sen [Sun, 3 Jul 2011 03:57:02 +0000 (09:27 +0530)]
Add terse changelog entry for 2.29
Father Chrysostomos [Sat, 2 Jul 2011 04:59:00 +0000 (21:59 -0700)]
Add another address for John Peacock
John Peacock [Sat, 2 Jul 2011 03:18:09 +0000 (23:18 -0400)]
Revise check for negative versions plus test
Florian Ragwitz [Fri, 1 Jul 2011 21:04:31 +0000 (23:04 +0200)]
Dual-life Text::Abbrev
Nicholas Clark [Tue, 28 Jun 2011 13:20:56 +0000 (15:20 +0200)]
For shorter strings, store C<study>'s data as U8s or U16s, instead of U32s.
The assumption is that most studied strings are fairly short, hence the pain
of the extra code is worth it, given the memory savings.
80 character string, 336 bytes as U8, down from 1344 as U32
800 character string, 2112 bytes as U16, down from 4224 as U32
Nicholas Clark [Tue, 28 Jun 2011 10:17:38 +0000 (12:17 +0200)]
Store C<study>'s data as U32s, instead of I32s.
The "no more" condition is now represented as ~0, instead of -1.
Nicholas Clark [Mon, 27 Jun 2011 19:13:39 +0000 (21:13 +0200)]
Tidy code in pp_study and Perl_screaminstr()
In pp_study eliminate the variable pos, which duplicates len. ch should be U8,
not I32.
In Perl_screaminstr(), move the declarations of s and x to their point of use,
convert a for loop to a while loop, and avoid incrementing and decrementing s.
found is a boolean.
Nicholas Clark [Mon, 27 Jun 2011 18:51:04 +0000 (20:51 +0200)]
Store C<study>'s data in in mg_ptr instead of interpreter variables.
This allows more than one C<study> to be active at the same time.
It eliminates PL_screamfirst, PL_lastscream, PL_maxscream.
Nicholas Clark [Mon, 27 Jun 2011 15:58:10 +0000 (17:58 +0200)]
Merge PL_scream{first,next} into one allocated buffer.
Effectively, PL_screamnext is now PL_screamfirst + 256. The actual interpreter
variable PL_screamnext is eliminated.
Nicholas Clark [Mon, 27 Jun 2011 15:14:39 +0000 (17:14 +0200)]
Change PL_screamnext to store absolute positions.
PL_screamnext gives the position of the next occurrence of the current octet.
Previously it stored this as an offset from the current position, with -pos
stored for "no more", so that the calculated new offset would be zero,
allowing a zero/non-zero loop exit test in Perl_screaminstr().
Now it stores absolute position, with -1 for "no more". Also codify -1 as the
"not present" value for PL_screamfirst, instead of any negative value.
Nicholas Clark [Mon, 13 Jun 2011 14:24:23 +0000 (16:24 +0200)]
Split out study magic from pos magic.
study uses magic to call SvSCREAM_off() if the scalar is modified. Allocate it
its own magic type ('G' for now - pos magic is 'g'). Share the same "set"
routine and vtable as regexp/bm/fm (setregxp and vtbl_regexp).
Father Chrysostomos [Fri, 1 Jul 2011 03:33:56 +0000 (20:33 -0700)]
Stop podcheck.t --add-link from chomping a new line
# The rest of the db file is output unchanged.
my_safer_print($copy_fh, join "\n", @existing_issues);
Well, actually that *does* change the file. See the diff.
Father Chrysostomos [Fri, 1 Jul 2011 02:19:14 +0000 (19:19 -0700)]
Add another address for Claes Jakobsson
Claes Jakobsson [Thu, 30 Jun 2011 20:09:13 +0000 (22:09 +0200)]
Report a better error when trying to use negative version numbers instead of 'Invalid version format (non-numeric data)' as it currently does. Also update documentation that version should be a positive number.
Jesse Vincent [Fri, 1 Jul 2011 00:40:54 +0000 (20:40 -0400)]
Change the example in the Changes file to be more generic.
Remove the releng step which required altering the Changes file
with a meaningless version bump
Nicholas Clark [Thu, 30 Jun 2011 11:00:47 +0000 (13:00 +0200)]
The regex engine can't assume that SvSCREAM() remains set on its target.
Callers to the engine set REXEC_SCREAM in the flags when the target scalar is
studied, and the engine should use the study data. It's possible for embedded
code blocks to cause the target scalar to stop being studied. Hence the engine
needs to check for this, instead of simply assuming that the study data is
present and valid to read. This resolves #92696.
Karl Williamson [Wed, 29 Jun 2011 17:45:54 +0000 (11:45 -0600)]
charnames.pm: Nits in pod
Chris 'BinGOs' Williams [Tue, 28 Jun 2011 22:26:29 +0000 (23:26 +0100)]
Updated Locale-Codes to CPAN version 3.17
[DELTA]
VERSION 3.17 (2011-06-28)
NEW CODE(s)
Added new types of codes
Added Language Extension codes (langext) and Language Variation codes (langvar) as defined in the IANA language registry.
Added new codeset(s)
Added language codes from ISO 639-5
Added language/script codes from the IANA language subtag registry
Bug fixes
Fixed an uninitialized value warning. RT 67438
Fixed the return value for the all_XXX_codes and all_XXX_names functions. RT 69100
Reorganized code
Reorganized modules to move Locale::MODULE to Locale::Codes::MODULE to allow for cleaner future additions. The original
four modules (Locale::Language, Locale::Currency, Locale::Country, Locale::Script) will continue to work, but all new
sets of codes will be added in the Locale::Codes namespace.
David Mitchell [Tue, 28 Jun 2011 16:04:40 +0000 (17:04 +0100)]
RT 64804: tainting with index() of a constant
At compile time, ck_index with a tainted constant set PL_tainted,
which remained on during the rest of compilation, tainting all other
constants.
Fix this by saving and restoring PL_tainted across the call to
fbm_compile, which is what sets PL_tainted.
Niko Tyni [Fri, 17 Apr 2009 18:11:08 +0000 (21:11 +0300)]
TODO test for index() of a tainted constant
As reported by Adrian Irving-Beer in <http://bugs.debian.org/291450>,
this unexpectedly throws a fatal taint error:
#!/usr/bin/perl -T
use constant C_A => $ARGV[0];
use constant C_B => $ARGV[1];
index(C_A, C_B);
open(FOO, "-|");
The TODO test is reduced from the above.
Karl Williamson [Mon, 27 Jun 2011 22:20:09 +0000 (16:20 -0600)]
perlrun: reflow to fit vertabims in 80 cols
This leaves a couple > 80 which are hard to reflow
Chris 'BinGOs' Williams [Mon, 27 Jun 2011 20:08:14 +0000 (21:08 +0100)]
Push the atime and mtime of generated Makefile.PLs back 4 seconds in make_ext.pl
In certain circumstances ( on virtual machines ) the generated Makefile.PL can
produce a Makefile that is older than the Makefile.PL
Altering the atime and mtime backwards by 4 seconds seems to resolve the issue.
Vincent Pit [Mon, 27 Jun 2011 13:01:30 +0000 (15:01 +0200)]
Fix context propagation below return()
A.k.a. "RT #38809 strikes back".
Back in the time of perl 5.003, there was no void context, so "do" blocks
below a return needed special handling to use the dynamic context of the
caller instead of the static context implied by the return op location.
But nowadays context is applied by the scalarvoid(), scalar() and list()
functions, and they all already skip the return ops. "do" blocks below a
return don't get a static context, and GIMME_V ought to correctly return
the caller's context. The old workaround isn't even required anymore.
Vincent Pit [Mon, 27 Jun 2011 08:09:00 +0000 (10:09 +0200)]
Test taintedness of values returned by given/when
Vincent Pit [Mon, 27 Jun 2011 07:37:30 +0000 (09:37 +0200)]
In leavewhen, put the SP back when returning
It may have changed in adjust_stack_on_leave() if the stack needed to be
extended.
Vincent Pit [Mon, 27 Jun 2011 07:35:57 +0000 (09:35 +0200)]
Make sure break() resets the sp at its original level
Vincent Pit [Sat, 25 Jun 2011 21:36:50 +0000 (23:36 +0200)]
Correctly preserve the stack on an implicit break.
Perl generates a 'break' op with the special flag set at the end of every
'when' block. This makes it difficult to handle both the case of an
implicit break, where the stack has to be preserved, and the case of an
explicit break, which must obliterate the stack, with the same pp function.
Stack handling should naturally occur in 'leavewhen', but it is effectively
called only when the block issues a 'continue'.
In order to preserve the stack, we change the respective roles of 'break',
'continue' and 'leavewhen' ops :
- Special 'break' ops are no longer generated for implicit breaks. Just as
before, they give the control back to the 'leavegiven' op.
- 'continue' ops now directly forward to the op *following* the 'leavewhen'
op of the current 'when' block.
- 'leavewhen' is now only called at the natural end of a 'when' block.
It adjusts the stack to make sure returned values survive the temp cleanup,
then issues a 'next' or go to the current 'leavegiven' depending on whether
it is enclosed in a for loop or a given block.
This fixes [perl #93548].
Vincent Pit [Sat, 25 Jun 2011 12:28:12 +0000 (14:28 +0200)]
Convert pp_leave() to adjust_stack_on_leave()
Vincent Pit [Sat, 25 Jun 2011 12:25:25 +0000 (14:25 +0200)]
Move pp_enter() and pp_leave() with their friends in pp_ctl.c
Vincent Pit [Sat, 25 Jun 2011 09:53:48 +0000 (11:53 +0200)]
Factor stack adjustments on leave in a new static function
This is just a refactoring. There should be no functional changes.
Karl Williamson [Fri, 3 Jun 2011 04:14:37 +0000 (22:14 -0600)]
fold_grind.t: Add comments
Karl Williamson [Fri, 3 Jun 2011 04:10:07 +0000 (22:10 -0600)]
autodoc.pl: Don't list experimental functions in API
Craig A. Berry [Sat, 25 Jun 2011 19:31:44 +0000 (14:31 -0500)]
Don't quote target name in make_ext.pl.
Even though it's presumably doing case-blind lookups of target
names, MMS currently (V3.9-00) falls down hard when passed a
target name in lower case.
Nicholas Clark [Sat, 25 Jun 2011 09:57:14 +0000 (11:57 +0200)]
Fix two podchecker errors on perlunicode.pod
Add Unicode::Regex::Set to the list of known CPAN modules.
Reflow a verbatim block to fit within the column limit.
David Mitchell [Wed, 22 Jun 2011 09:59:18 +0000 (10:59 +0100)]
add do_ncmp fn and make pp_ncmp, pp_eq etc use it
Extract most of the body of pp_ncmp() (numeric compare) into a separate
function, do_ncmp(), then make the following ops use it:
pp_ncmp
pp_lt
pp_le
pp_eq
pp_ne
pp_ge
pp_gt
This removes a lot of similar or duplicated code, most of which is
dedicated to handling the various combinations of IV verses UV verses NV
verses NaN.
The various ops first check for, and directly process, the simple and common
case of both args being SvIOK_notUV(), and pass the processing on to
do_ncmp() otherwise. Benchmarking seems to indicate (but with a lot of
noise) that the SvIOK_notUV case is slightly faster than before, and the
do_ncmp() branch slightly slower.
David Mitchell [Tue, 21 Jun 2011 16:32:20 +0000 (17:32 +0100)]
pp_ncmp: favour the non- Perl_isnan route
Currently pp_ncmp(), when comparing two NVs, prefers to check its two args
for NaNness first, and if either of them are, then return undef. Only if
Perl_isnan isn't defined does it fall back to doing three compares (<, >,
=) where if all three fail it returns undef.
This is in contrast to the other compare functions (e.g. pp_lt), which
only use Perl_isnan if NAN_COMPARE_BROKEN is defined - i.e. they prefer to
rely on the '<' (or whatever) test to handle NaNs implicitly.
Change pp_ncmp to favour not using Perl_isnan(). This has two advantages:
First, speed: in the normal case we replace:
two function calls to Perl_isnan plus two comparisons,
with:
three comparisons.
Second, this makes pp_ncmp more similar to the other comparison functions,
allowing for code reuse in the future.
David Mitchell [Tue, 21 Jun 2011 13:40:12 +0000 (14:40 +0100)]
remove unreachable code from various compare ops
All the compare ops (such as pp_le), have an initial:
tryAMAGICbin_MG(le_amg, AMGf_numeric);
The effect of the AMGf_numeric flag is that, if the le overloading fails,
but either of the args on the stack is a reference, then that arg is
replaced with a temporary non-ref arg that is either the result of
'0+' overloading, or is a UV with the numerical value of the ref's
address. So by the time the main body of the op is called, neither arg
can be a ref.
Thus a whole bunch of nearly identical blocks can be removed, which *used*
to handle comparing refs:
if (SvROK(TOPs) && !SvAMAGIC(TOPs) && SvROK(TOPm1s) && !SvAMAGIC(TOPm1s)) {
SP--;
SETs(boolSV(SvRV(TOPs) <= SvRV(TOPp1s)));
RETURN;
}
Leon Brocard [Sat, 25 Jun 2011 06:45:42 +0000 (07:45 +0100)]
Expand bump RT version number in Porting/release_managers_guide.pod
Robert generally adds future versions, so check first whether he
has first.
Alan Haggai Alavi [Sat, 25 Jun 2011 05:01:04 +0000 (10:31 +0530)]
fix `perldoc -v '$0'`
Presently, `perldoc -v '$0'` fetches the entry for $<digits> ($1, $2,
...) instead of $0 ($PROGRAM_NAME).
Father Chrysostomos [Sat, 25 Jun 2011 05:55:47 +0000 (22:55 -0700)]
Increase $Pod::Perldoc::VERSION
in preparation for the next commit.
Father Chrysostomos [Fri, 24 Jun 2011 19:31:12 +0000 (12:31 -0700)]
perldelta entry for #93454
Father Chrysostomos [Fri, 24 Jun 2011 16:29:39 +0000 (09:29 -0700)]
Tiny comment typo fix in handy.h
Father Chrysostomos [Fri, 24 Jun 2011 16:22:49 +0000 (09:22 -0700)]
Correct comment that
903fd87c missed
Karl Williamson [Fri, 24 Jun 2011 18:34:46 +0000 (12:34 -0600)]
perlunicode: Nits
a missing word, remove L<> from a verbatim block, add L<> for a module,
clarify wording
Robin Barker [Thu, 23 Jun 2011 18:12:59 +0000 (19:12 +0100)]
cast unsigned to avoid warning
Add a cast C<(unsigned)> to silence a compiler warning [-Wsign-compare]
Father Chrysostomos [Fri, 24 Jun 2011 15:17:28 +0000 (08:17 -0700)]
[perl #93454] Free deleted iterator when freeing hash
Commit 7d6175e, which did a fix-up after commit
e0171a1a3, which
introduced hfree_next_entry, did not account for the fact that
hfree_next_entry frees the hash iterator before removing and returning
the next value.
It changed the callers to check the number of keys to determine
whether anything else needed to be freed, which meant that
hfree_next_entry was called one time less than necessary on hashes
whose current iterator had been deleted and which consequently
appeared empty.
This fixes that.
I don’t know how to test it, but the string table warnings were caus-
ing test failures on VMS, so maybe that’s good enough.
Father Chrysostomos [Fri, 24 Jun 2011 13:20:16 +0000 (06:20 -0700)]
Bypass a switch in gv_fetchpvn for 2-char symbols
The switch that checks for ISA, EXPORT, etc. in packages other
than main was guarded with an if(len>1) statement. Since ISA is
three characters, we can bypass that entire switch for two-charac-
ter symbols.
Father Chrysostomos [Fri, 24 Jun 2011 06:22:29 +0000 (23:22 -0700)]
Update proto docs after prev commit
Father Chrysostomos [Fri, 24 Jun 2011 06:14:17 +0000 (23:14 -0700)]
Allow the \$ proto to accept any scalar lvalue [perl #91846]
This makes the \$ prototype’s parsing the same as the second argument
to read(), making it possible to create a custom myread() function
that has the same syntax.
This is handled in two places in the prototype-parsing code, to avoid
calling scalar() on the op if another character in \[...] will accept
it. I don’t know what the consequences of that would be. So it calls
Perl_op_lvalue_flags in the $ case only if it is not inside brackets.
Then in the ] case it checks to see whether there was a $.
OP_READ, not OP_ENTERSUB, is passed as the type to
Perl_op_lvalue_flags, since OP_ENTERSUB would allow sub foo(\$) to
accept an array as an argument. OP_RECV and OP_SYSREAD would have
worked, too.
Father Chrysostomos [Fri, 24 Jun 2011 04:58:29 +0000 (21:58 -0700)]
Make Perl_op_lvalue_flags provide a no-croak option
This is in preparation for making the \$ prototype accept any lvalue.
Father Chrysostomos [Fri, 24 Jun 2011 04:48:07 +0000 (21:48 -0700)]
op_lvalue .= _flags
Add flags param to op_lvalue, so that the caller can ask it not to
croak when encountering an unmodifiable op (upcoming).
This is in preparation for making the \$ prototype accept any lvalue.
There is no mathom, as the changes that this will support
are by no means suitable for maint.
Father Chrysostomos [Thu, 23 Jun 2011 22:01:42 +0000 (15:01 -0700)]
proto.t: Test \$ with subcall()->[elem]
This syntax was documented, but there was no test for it.
Father Chrysostomos [Thu, 23 Jun 2011 21:58:16 +0000 (14:58 -0700)]
Remove two tests from proto.t
These have been superseded by t/op/cproto.t, which came later.
Father Chrysostomos [Thu, 23 Jun 2011 17:29:57 +0000 (10:29 -0700)]
Make pp_leavesublv use S_return_lvalues
The returning code is now almost identical, due to the preceding com-
mits, so they can be merged.
Craig A. Berry [Fri, 24 Jun 2011 14:44:16 +0000 (09:44 -0500)]
realclean clean-up on VMS.
Update a few missing or moved items in the realclean target.
Craig A. Berry [Thu, 23 Jun 2011 17:55:19 +0000 (12:55 -0500)]
preplibrary needs an explicit action in descrip_mms.template.
Even if that action says "Don't do anything." MMK silently ignores
this but MMS falls down hard with:
%MMS-F-GWKNOACTS, Actions to update PREPLIBRARY are unknown.
This was broken in
ebca06e95b02d1a8cf073328af30c9f4b9af6891.
Father Chrysostomos [Thu, 23 Jun 2011 16:44:45 +0000 (09:44 -0700)]
Fix explicit return of pad var in list lv context
This is something that commit e08be60 missed, though it never worked
properly, even in 5.14, as explicit return from lvalue subs used to
copy return values.
As the commit message for e08be60 states, returning a scalar itself
from an lvalue sub does not work if it is a pad variable with a refer-
ence count of 1, because the sub-popping code clears it on exit.
The one code path that did not account for this was list lvalue con-
text (real lvalue context, not just potentially lvalue). The only
observable effect this has is that assigning to a magic pad variable
returned from a subroutine in list context will not trigger set-magic.
This commit fixes it and also adds tests for returned magic pad vars
in all combinations of list/scalar lvalue/ref context.
Father Chrysostomos [Thu, 23 Jun 2011 15:16:03 +0000 (08:16 -0700)]
Collapse the list context code in pp_leavesublv
Two branches of this three-branch if/elsif were doing the same thing.
One was written out longhand.
Father Chrysostomos [Thu, 23 Jun 2011 13:16:12 +0000 (06:16 -0700)]
Remove now-redundant check from pp_ctl.c:S_return_lvalues
This has been redundant since commit d25b0d7.
Leon Brocard [Thu, 23 Jun 2011 17:07:41 +0000 (18:07 +0100)]
Mention bump-perl-version's inplace mode in Porting/release_managers_guide.pod
Leon Brocard [Thu, 23 Jun 2011 16:39:23 +0000 (17:39 +0100)]
Seeing as Porting/bump-perl-version is run in a git directory,
instead of writing a diff file and then applying it, this adds
a -i option which makes the changes inplace
Leon Brocard [Thu, 23 Jun 2011 15:05:06 +0000 (16:05 +0100)]
Move Porting/bump-perl-version to use autodie
Leon Brocard [Thu, 23 Jun 2011 14:26:12 +0000 (15:26 +0100)]
Extract the code the maps from an author/distribution to a
CPAN URL into its own subroutine: cpan_url_distribution()
in Porting/core-cpan-diff
Nicholas Clark [Thu, 16 Jun 2011 20:31:07 +0000 (22:31 +0200)]
Test studied scalars with s///ge.
Nicholas Clark [Wed, 15 Jun 2011 11:05:11 +0000 (13:05 +0200)]
study now passes REXEC_SCREAM to the regex engine when SvSCREAM() is true.
This causes the regex engine to take advantage of the study data.
Father Chrysostomos [Thu, 23 Jun 2011 06:04:02 +0000 (23:04 -0700)]
Fix up some tests in sub_lval.t
One test was disabled long ago
Returning undef in list context was allowed by change 10777 (f206cdd)
in 2001. There was already a test for disallowing it. That test was
disabled by change 10779 (
4c8a4e58), rather than correct to test the
new behaviour.
This commit changes it to test that undef return is allowed in list
context, also adding a test for explicit return.
Father Chrysostomos [Thu, 23 Jun 2011 05:58:45 +0000 (22:58 -0700)]
Make lvalue return make the same checks as leavesublv
This causes explicit return in lvalue context to die the way implicit
return does. See the tests and the perldelta entry in the diff.
Father Chrysostomos [Thu, 23 Jun 2011 02:03:32 +0000 (19:03 -0700)]
pp_leavesublv: Put the deref code inside if(scalar)
No need to check it in list context (but still assert that).
Father Chrysostomos [Thu, 23 Jun 2011 01:59:02 +0000 (18:59 -0700)]
Make pp_leavesublv switch based on gimme
Put if(gimme == ...) on the outside and if(CxLVAL(cx)...) on the
inside. This reduces the amount of code, since the OPpENTERSUB_INARGS
case and the !CxLVAL case were both doing the same thing for scalars.
Father Chrysostomos [Thu, 23 Jun 2011 01:39:10 +0000 (18:39 -0700)]
Removed unused label from pp_leavesublv
This has been unused since
e178c744.
Father Chrysostomos [Thu, 23 Jun 2011 01:37:59 +0000 (18:37 -0700)]
Copy PADTMPs explicitly returned from lv subs
I don’t believe this changes any observable behaviour, Devel::Peek
aside. If it does, it fixes bugs.
I am making this change for two reasons:
• PADTMPs can be a bit buggy and letting them escape their subroutines
can make the bugs harder to fix.
• This brings explicit and implicit return from lvalue subroutines one
step closer (for the sake of merging the code).
Craig A. Berry [Thu, 23 Jun 2011 12:57:09 +0000 (07:57 -0500)]
Duplicate in list of .h files on VMS.
This is a bug I introduced in
66b82e1fdff51a4c821a3a249fe707cf8014a185.
Surprising it hasn't caused more trouble. When building with MMS, it's
a hard error, whereas MMK silently ignores it.
Nicholas Clark [Fri, 17 Jun 2011 14:40:30 +0000 (16:40 +0200)]
For s///r, avoid copying the source early only to edit it in place.
Instead, take advantage of the "can't edit in place" code path of pp_subst
which writes to a new scalar, and that pp_substcont always leaves the original
intact, writing to a new scalar.
Nicholas Clark [Sat, 18 Jun 2011 17:40:26 +0000 (19:40 +0200)]
Add PERL_NO_GET_CONTEXT to Math::BigInit::FastCalc.
For threaded platforms, this reduces the object code size significantly, and
should slightly reduce CPU usage.
Nicholas Clark [Mon, 20 Jun 2011 09:09:34 +0000 (11:09 +0200)]
Two small tidying refactors for TestInit.pm
Make the order of backslash and forward slash in character classes consistent.
Move the top level modification of $0 adjacent to the top level modification of
$ENV{PERL_CORE}.
Nicholas Clark [Mon, 20 Jun 2011 08:56:48 +0000 (10:56 +0200)]
Fix a (back)slash bug in a regex, added with the regex itself.
8fcfece7bab67639 added code to TestInit to set the CWD and @INC for tests in
ext. However, the regex used to distinguish where a test was had one forward
slash where a backslash should have been, hence the intended Win32 support
would not work. I'm assuming that no-one has noticed this because no-one has
tried to run tests from the command line on Win32 directly, or if they have
they always use forward slashes in their pathnames.
Nicholas Clark [Mon, 20 Jun 2011 08:50:50 +0000 (10:50 +0200)]
In TestInit, eliminate @new_inc, by assigning to @INC directly.
To decide whether to default, we can test $set_opt instead of whether @new_inc
is empty, as all places that assign to @new_inc (now to @INC) also set
$set_opt.
Nicholas Clark [Mon, 20 Jun 2011 08:33:23 +0000 (10:33 +0200)]
In TestInit, inline new_inc() and set_opt() into import(), their only caller.
Nicholas Clark [Sun, 19 Jun 2011 20:06:08 +0000 (22:06 +0200)]
In find_git_or_skip(), also check whether we have a working git executable.
Otherwise we trip up if someone copies an entire git checkout to another
machine that doesn't have (or support git), or NFS mounts their active
checkout onto it, or simply doesn't have git in their PATH currently.
Nicholas Clark [Sun, 19 Jun 2011 19:44:37 +0000 (21:44 +0200)]
find_git_or_skip() will now follow symlinks and chdir to the real source tree.
porting{authors,cmp_version,manifest}.t now use TestInit qw(T A) to set @INC
and $^X to absolute paths, in case find_git_or_skip() changes directory.
As $^X is now absolute, there's no need to choose between '/' and '\\' based
on $^O.
Nicholas Clark [Sun, 19 Jun 2011 18:35:39 +0000 (20:35 +0200)]
Use find_git_or_skip() in porting{authors,cmp_version,manifest}.t
Correct the skip count in t/porting/manifest.t. Not that this matters
currently, as the SKIP block holds the last tests in the file, and the script
uses done_testing() instead of a plan up front.
Nicholas Clark [Sun, 19 Jun 2011 18:34:37 +0000 (20:34 +0200)]
Add find_git_or_skip(), which skips if we are not in a git checkout.
Nicholas Clark [Sun, 19 Jun 2011 17:56:57 +0000 (19:56 +0200)]
use TestInit 'T' in porting{authors,cmp_version,manifest}.t to chdir '..'
These three tests run git commands from the top level of the build tree, so
need to chdir '..' if run from 't'. use TestInit 'T' to do this, as it simplify
adapting the tests to also work when the build tree is a symlink forest from
-Dmksymlinks. TestInit also sets $ENV{PERL5LIB}, avoiding the need to use -Ilib
on the command line of the programs they run.
t/porting/manifest.t now runs throughout at the top level, which simplifies it
slightly.
Nicholas Clark [Sun, 19 Jun 2011 17:39:07 +0000 (19:39 +0200)]
Add an import option 'T' to TestInit, for tests that run at the top level.
This sets @INC to 'lib, and unless we're already at the top level will
chdir '..' [on the assumption that we are starting in t].
Nicholas Clark [Sun, 19 Jun 2011 17:10:51 +0000 (19:10 +0200)]
In TestInit.pm, move the default chdir and @INC code into import().
The behaviour is consistent with previous behaviour, as the equivalent of the
new code used to be run at the top level, hence would happen (unconditionally)
before import() was called.
Nicholas Clark [Sun, 19 Jun 2011 16:13:38 +0000 (18:13 +0200)]
In TestInit.pm, merge two substitutions into one.
Both are intended to transform ./perl into ../../perl, one for forward slashes,
one for backslashes.
Father Chrysostomos [Wed, 22 Jun 2011 15:36:45 +0000 (08:36 -0700)]
Remove another CvLVALUE check from pp_leavesublv
Father Chrysostomos [Wed, 22 Jun 2011 15:35:03 +0000 (08:35 -0700)]
Move pp_leavesublv from pp_hot.c to pp_ctl.c
This is so that it can share code with pp_return. I was going to move
pp_return into pp_hot.c, but it uses static functions that other pp_
functions in pp_ctl.c use.
Father Chrysostomos [Wed, 22 Jun 2011 15:32:36 +0000 (08:32 -0700)]
Remove the CvLVALUE check from pp_leavesub
As of bb3abb0, this can no longer happen.