Father Chrysostomos [Fri, 9 Dec 2011 21:31:18 +0000 (13:31 -0800)]
Increase ExtUtils::Packlist::VERSION to 1.45
jkeenan [Fri, 9 Dec 2011 02:39:09 +0000 (21:39 -0500)]
Correct POD formatting error: '=back' should be within '=begin =end' block.
Father Chrysostomos [Fri, 9 Dec 2011 21:27:46 +0000 (13:27 -0800)]
Increase $I18N::LangTags::VERSION to 0.38
Alexandr Ciornii [Sun, 16 Oct 2011 00:25:07 +0000 (03:25 +0300)]
update link to ISO 639-2
John Peacock [Fri, 9 Dec 2011 01:55:37 +0000 (20:55 -0500)]
Update UNIVERSAL::VERSION POD to reflect reality.
This should have been done when version objects were originally
added to the core back in 5.10.0. Mea culpa.
[I bumped UNIVERSAL.pm version and added a perldelta entry. -- DG]
Signed-off-by: David Golden <dagolden@cpan.org>
John Peacock [Wed, 7 Dec 2011 02:00:36 +0000 (21:00 -0500)]
Sync up tests with upstream version.pm
Pull in the contents of t/coretests.pm (more or less) from the CPAN
release of version.pm.
Signed-off-by: David Golden <dagolden@cpan.org>
John Peacock [Wed, 7 Dec 2011 01:55:09 +0000 (20:55 -0500)]
Use syntax from perlguts for testing objects
The following paragraph is in perlguts.pod:
To check if you've got an object derived from a specific class you have
to write:
if (sv_isobject(sv) && sv_derived_from(sv, class)) { ... }
which does the right thing with magical things like tied scalars.
Signed-off-by: David Golden <dagolden@cpan.org>
John Peacock [Wed, 7 Dec 2011 01:52:11 +0000 (20:52 -0500)]
Revert
9bf41c1d to UNIVERSAL::VERSION
Return the previous behavior where CLASS->VERSION will return a
stringified version object of the contents of $CLASS::VERSION.
Signed-off-by: David Golden <dagolden@cpan.org>
David Golden [Fri, 9 Dec 2011 19:32:08 +0000 (14:32 -0500)]
Fix segfault on overloaded arithmetic assignment
Consider an arithmetic assignment operation of the form
$left += $right
A segfault was occuring in the case where $right is an overloaded object
but $left is not; and where $right does not override "+=" but does
provide a 'nomethod' override. Internally, Perl_amagic_call was
attempting to clone $left as if it were an overloaded object, causing the
segfault. This commit fixes the segfault by only cloning the left
operand when the left operand is the overloaded one.
Nicholas Clark [Thu, 8 Dec 2011 10:43:06 +0000 (11:43 +0100)]
Remove "support" for using malloc.c outside the perl core distribution.
It only ever worked properly in 5.005.
Commit
d720c4410d3a0730 from June 1998 is the first known version of malloc.c
that would compile stand alone, without needing a config.h
Commit
5bbd1ef51ee0ebfa from December 1998 will not compile by default,
but will if one provides suitable definitions of simple macros on the command
line.
Commit
427181846486e3aa from September 1999 will not compile with command
line flags alone.
12 years later, no-one has reported problems, so it's safe to remove this.
Nicholas Clark [Thu, 8 Dec 2011 10:12:25 +0000 (11:12 +0100)]
Remove commented-out "support" for perl's malloc with x2p.
In 1998 commit
30e2e4257067d5f8 stated
temporarily disable perl malloc for a2p until we clean up
conflicting malloc() declarations everywhere
and nothing has changed since. 13 years later, no-one has reported problems,
so it's safe to remove it.
Nicholas Clark [Thu, 8 Dec 2011 14:30:02 +0000 (15:30 +0100)]
perl.h can include embed.h in the same location on all operating systems.
Commit
22c35a8c2392967a (October 1988) added a #include "embed.h" later in
perl.h for when building with PERL_OBJECT defined. Commit
d18c61170a306915
(November 1988) added an effectively duplicate #include for all WIN32.
Commit
0cb9638729211ea7 (June 1999) corrected the made the earlier #include
in perl.h also conditional on !PERL_OBJECT (in addition to the
!PERL_FOR_X2P added by
22c35a8c2392967a), but it wasn't until commit
d18c61170a306915 (November 1999) that this changed this to !WIN32, and
embed.h was included exactly once by perl.h (as a2p never actually includes
perl.h).
Commit
acfe0abcedaf592f (August 2001) removed the PERL_OBJECT code from
perl.h, reducing the duplication somewhat, but commit
96e176bf068724d0
(October 2001) created analogous special case duplication for VMS, and
commit
27da23d53ccce622 (April 2005) for Symbian. Commit
eb8433b7af0f2e09
(March 2006) then neatly put the same #ifndef PERL_MAD code after all 4
locations that included embed.h and commit
b3f24c00097febc1 (April 2006)
made the same correction in all 4 places.
But, the daft part of all this is that there was no reason why Win32 was
special - every other operating system can build perl with embed.h included
later in perl.h
Hence the earlier 3 locations can be eliminated, and the was-just-Win32
location made unconditional.
Which saves some lines of code. But fewer lines than are in this commit
message.
Nicholas Clark [Thu, 8 Dec 2011 12:16:43 +0000 (13:16 +0100)]
perl.h doesn't need special cases for x2p, as x2p doesn't include it.
Commit
22c35a8c2392967a in October 1998 added an #if !defined(PERL_FOR_X2P)
guard to prevent perl.h from including embed.h when being used to compile
a2p. However, this was not needed even then, because embed.h only contains
pre-processor directives (mostly #define) related to tokens unused in a2p's
C code, so its continued inclusion would not have any effect. Moreover a2p
never actually included perl.h from its own code - only its copy of malloc.c
would include perl.h, and that only if perl was configured to use its own
malloc. But even x2p's use of malloc.c had been "temporarily disabled" by
commit
30e2e4257067d5f8 1 month earlier, so there was never a need for this.
Nicholas Clark [Fri, 9 Dec 2011 15:43:21 +0000 (16:43 +0100)]
Remove the obsolete code for NO_EMBED from sdbm.h
Support for NO_EMBED was removed by commit
22c35a8c2392967 in 1998.
Minitrue attempted to eliminate all mention of it in 2003 with commit
a0a44e237c19cc2b, but missed this code in sdbm.h
Steve Peters [Fri, 9 Dec 2011 14:56:51 +0000 (09:56 -0500)]
Update READMEs and Pod with the updated URLs at lists.perl.org
Shlomi Fish [Wed, 7 Dec 2011 17:36:39 +0000 (19:36 +0200)]
Made "c [line_num]" working again.
This is a bug-fix to
https://rt.perl.org/rt3//Public/Bug/Display.html?id=104820 .
Both the fix and a regression tests were added.
Father Chrysostomos [Fri, 9 Dec 2011 06:32:51 +0000 (22:32 -0800)]
perldelta up to
e08f19f5d07
Father Chrysostomos [Fri, 9 Dec 2011 06:21:51 +0000 (22:21 -0800)]
Test out-of-bounds warning with lv substr
Father Chrysostomos [Fri, 9 Dec 2011 06:15:31 +0000 (22:15 -0800)]
perldelta up to
a74fb2cdc8f
plus some later commits dealing with substr
Father Chrysostomos [Fri, 9 Dec 2011 04:45:21 +0000 (20:45 -0800)]
perldelta up to
611272bb8
Craig A. Berry [Fri, 9 Dec 2011 02:50:17 +0000 (20:50 -0600)]
stat() fix for write but not read permission on a directory.
9b9f19dadd2 missed one corner case where we do actually need to
stat the directory file and not just the name without the .DIR. If
we have write but not read access to the directory, then
stat('foo.DIR') succeeds but stat('foo') fails. So if the first
stat failed fileify and try again.
Father Chrysostomos [Fri, 9 Dec 2011 02:12:09 +0000 (18:12 -0800)]
perldelta up to
47a0660e68
Father Chrysostomos [Fri, 9 Dec 2011 01:51:36 +0000 (17:51 -0800)]
Father Chrysostomos [Fri, 9 Dec 2011 01:03:42 +0000 (17:03 -0800)]
perldelta up to
c70a25495
Father Chrysostomos [Fri, 9 Dec 2011 00:16:32 +0000 (16:16 -0800)]
Father Chrysostomos [Fri, 9 Dec 2011 00:13:11 +0000 (16:13 -0800)]
Retroactively add newCONSTSUB_flags to 5154delta
Father Chrysostomos [Thu, 8 Dec 2011 22:53:50 +0000 (14:53 -0800)]
[perl #97476] Deparse not() following the llafr
not() follows the looks-like-a-function rule, unlike its high-prece-
dence counterpart. So deparsing
not +($foo || die) && $baz
as
not ($foo || die) && $baz
is incorrect, as the && $baz part is no longer part of the argu-
ment to not().
Father Chrysostomos [Thu, 8 Dec 2011 22:35:27 +0000 (14:35 -0800)]
[perl #77172] Deparse &{&} as &{&}, not &&
&& is always tokenised as the logical-and operator, and never as the
&{&} subroutine. B::Deparse needs to know about this.
(Oddly enough, ** can be exponentiation or the *{*} glob.)
Father Chrysostomos [Thu, 8 Dec 2011 22:27:15 +0000 (14:27 -0800)]
More tests for deparsing warn()+1, etc.
Father Chrysostomos [Thu, 8 Dec 2011 21:16:48 +0000 (13:16 -0800)]
[perl #74740] Deparse -(f()) correctly
-(f()) was being deparsed as -f(), which is a filetest operator.
Extra parens are needed for negation if the child op deparses with a
single letter at the beginning.
Father Chrysostomos [Thu, 8 Dec 2011 21:09:39 +0000 (13:09 -0800)]
Don’t warn for open local *FH
There is this ancient ‘Precedence problem’ warning that warns for open
followed by a bareword and then an operator that would have made open
into a unary-precedence operator in Perl 4. It was not taking into
account that the bareword might be a Perl keyword. In that case it
shouldn’t be warning.
Father Chrysostomos [Thu, 8 Dec 2011 20:51:19 +0000 (12:51 -0800)]
Deparse pipe(local *FH, local *FH) correctly
This is a follow-up to commit
2462c3cca (bug #63558).
I made it work with the first argument, but forgot the second.
Father Chrysostomos [Thu, 8 Dec 2011 20:49:33 +0000 (12:49 -0800)]
Deparse (eof)+1 correctly
If the parentheses are omitted, it means eof(1).
To fix this, we surround the keyword with parentheses (if necessary
according to precedence) if it is an unop, because a final () has a
special meaning for some unops.
For listops, we use surrounding parentheses only if the llafr does
not apply. Otherwise we use a final ().
Father Chrysostomos [Thu, 8 Dec 2011 17:58:44 +0000 (09:58 -0800)]
[perl #63558] Deparse open local(*FH) correctly
open FH and open local(*FH) compile down to the same structure
(open *FH), but with a flag set on the rv2gv (*{}) op for the
local case.
B::Deparse was special-casing rv2gv for ops with * in their prototype,
but without consideration for the flag.
Father Chrysostomos [Thu, 8 Dec 2011 17:34:04 +0000 (09:34 -0800)]
Deparse dump as CORE::dump
Since dump() warns without CORE::, and since the two variants are
indistinguishable after compilation, always deparse dump() as
CORE::dump.
Father Chrysostomos [Thu, 8 Dec 2011 17:30:31 +0000 (09:30 -0800)]
Deparse filetest ops without llafr
Before this commit, (-e $_) + 72 deparsed incorrectly, because it
became -e($_) + 72, equivalent to -e ($_+72).
Concerning the removed comment, it’s more important to produce correct
code than nice-looking code.
Father Chrysostomos [Thu, 8 Dec 2011 16:42:31 +0000 (08:42 -0800)]
Fix use VERSION test failures under PERL_UNICODE
use VERSION now checks whether HINT_LOCALIZE_HH is set, which indi-
cates that %^H has been modified. If it is set, it does ‘no feature’
first, regardless of the version number.
Some tests were checking that feature.pm is not loaded for use 5.8.8.
Now it is sometimes, particularly if PERL_UNICODE has been set, as it
adds keys to %^H.
For now, I’ve tweaked the tests. It would be nice if version declara-
tions could load and unload features without loading feature.pm, just
as they do with strictures.
Father Chrysostomos [Thu, 8 Dec 2011 14:24:53 +0000 (06:24 -0800)]
Deparse CORE::do+{} and CORE::do({}) correctly
Commit
94bb57f91b missed the CORE:: variant.
Father Chrysostomos [Thu, 8 Dec 2011 06:13:50 +0000 (22:13 -0800)]
Fix deparsing of "" =~ <any OPf_SPECIAL op>
This is a regression in 5.14.
$ ./perl -Ilib -MO=Deparse -e '"" =~ do{}'
'' =~ ($_ =~ do {
()
});
-e syntax OK
Commit
a539498ab05 fixed the deparsing of "foo" =~ (1?/foo/:/bar/),
in which /foo/ is implicitly bound to $_. Due to constant folding,
the whole condition expression is reduced to "foo" =~ /foo/, but with
/foo/ still bound to $_. /foo/ is marked OPf_SPECIAL, which allows
us to distinguish the cases. The fix, which added "$_ =~" explic-
itly, did not check that the op was a match op, so any op on the rhs
with the OPf_SPECIAL flag set could trigger the same special case.
Father Chrysostomos [Thu, 8 Dec 2011 06:40:28 +0000 (22:40 -0800)]
Deparse.pm: More functions that do not follow llafr
See the previous commit.
Again, whether we apply the llafr to loop exits shouldn’t be about
whether parentheses look nice, but whether the final code parses
correctly.
Father Chrysostomos [Thu, 8 Dec 2011 05:58:27 +0000 (21:58 -0800)]
[perl #77096] Deparse return and do without llafr
‘return’ and ‘do-file’ are exempt from the ‘looks-like-a-function
rule’ (llafr).
B::Deparse was intentionally ignoring that:
While it might produce nice-looking code, the final code compiles dif-
ferently in many cases, so we simply cannot ignore these ops’ disre-
gard for that rule.
Father Chrysostomos [Wed, 7 Dec 2011 20:52:05 +0000 (12:52 -0800)]
deparse.t: Add bug number
Father Chrysostomos [Wed, 7 Dec 2011 20:41:56 +0000 (12:41 -0800)]
[perl #47361] Deparse do +{} and do({}) correctly
These are both variants of do-file syntax.
Nicholas Clark [Thu, 8 Dec 2011 13:02:39 +0000 (14:02 +0100)]
Correct a bug in the previous commit (
bb35dd48)
The test in bisect-runner.pl for when to apply the fix of commit
c955f1177b2e311d was not correct - it would also attempt to apply the patch
to commit
c955f1177b2e311d and later, not just to commits before
c955f1177b2e311d.
Nicholas Clark [Wed, 7 Dec 2011 17:42:00 +0000 (18:42 +0100)]
bisect-runner.pl now builds 42 more 5.005_5x releases.
Commit
455ece5e082708b1, which added the SSNEW() macro, was buggy and needs
a fix from commit
3c8a44569607336e in order to avoid strange seemingly
unrelated SEGVs.
Nicholas Clark [Wed, 7 Dec 2011 15:41:21 +0000 (16:41 +0100)]
Teach bisect-runner.pl how to build a significant PERL_OBJECT commit.
Commit
22c35a8c2392967a is "phase 1 of somewhat major rearrangement of
PERL_OBJECT stuff" but doesn't build due to 2 simple errors. blead in this
broken state was merged to the cfgperl branch, and then these were
immediately corrected there. cfgperl (with the fixes) was merged back to
blead. The resultant rather twisty maze of commits completely confuses git
bisect (and at least me), causing it to the bisect run to confidently return
the wrong answer, an unrelated commit on the cfgperl branch.
Nicholas Clark [Wed, 7 Dec 2011 13:37:52 +0000 (14:37 +0100)]
bisect-runner.pl must patch an incorrect use of eaccess() for 5.005_5x
Without this, 538 intermedidate revisions of 5.005_5x fail to build on
(at least) Linux.
Father Chrysostomos [Wed, 7 Dec 2011 20:27:25 +0000 (12:27 -0800)]
Fix ext/B/t/f_map.t failure
Tiny typo on my part. Strangely, the tests passed for me before, so I
probably made a mistake in trying to switch branches.
Chris 'BinGOs' Williams [Wed, 7 Dec 2011 19:52:05 +0000 (19:52 +0000)]
Update ExtUtils-ParseXS to CPAN version 3.07
[DELTA]
3.07 - Wed Dec 7 14:10:00 CET 2011
- Fix inconsistent versioning in 3.06.
3.06 - Fri Dec 2 08:10:00 CET 2011
- Fix Cygwin issues [Tony Cook]
avoid conflicting static / dllexport on legacy perls too
This probably fixes rt.cpan.org 72313 and 71964.
(
3928a66ad4bd8aee704eda1942b7877c0ff1ab2c in core)
- Convert ` to ' [James Keenan]
55bee391aeff3c3b8d22fa4ce5491ee9440028aa and
6dfee1ec62c64d7afe8ced4650596dd9e7f71a63 in core
- Avoid some test-time warnings [Zefram]
97bae9c59cd181b3b54061213ec1fdce0ccb30d4 in core
Father Chrysostomos [Wed, 7 Dec 2011 16:39:59 +0000 (08:39 -0800)]
[perl #47359] Deparse method {$object} correctly
The block is evaluated in list context, allowing things like
SUPER::glelp{@_} to work, so deparsing it as do{...}->method is wrong,
as it puts the block in scalar context.
Father Chrysostomos [Wed, 7 Dec 2011 07:29:21 +0000 (23:29 -0800)]
Deparse: detect hh changes properly
The hack to check whether the hint hash has changed doesn’t work. One
actually has to iterate through the hash. Since declare_hinthash does
that already, just call it.
The change to declare_hinthash to return an empty list instead of ''
is one of those theoretical speed-ups. It results in one less state-
ment and two fewer method calls in its caller.
Father Chrysostomos [Wed, 7 Dec 2011 07:18:00 +0000 (23:18 -0800)]
Adjust docs to match new ver decl behaviour
Father Chrysostomos [Wed, 7 Dec 2011 07:07:49 +0000 (23:07 -0800)]
Deparse funny keys/values in hh properly
Simply putting '...' or q(...) around a string is not sufficient to
quote it properly, allowing this sort of ‘fun’:
$ perl -l -MO=Deparse -e'BEGIN{$^H{"'\''.'\''"} = "um);\n exit("}print'
BEGIN { $/ = "\n"; $\ = "\n"; }
sub BEGIN {
$^H{q['.']} = "um);\n exit(";
}
BEGIN {
$^H{''.''} = q(um);
exit();
}
print $_;
-e syntax OK
And B::Deparse already has a facility for quoting strings, so why
not use it?
Father Chrysostomos [Wed, 7 Dec 2011 07:01:24 +0000 (23:01 -0800)]
Fix up ext/B/t for strict.pm changes
Father Chrysostomos [Wed, 7 Dec 2011 06:58:31 +0000 (22:58 -0800)]
Fix deparsing of undefined hint hash values
Undefined values in the hint hash were being deparsed as empty
strings. Whenever the hint hash changed, all undefined values, even
those unmodified, were being printed.
Father Chrysostomos [Wed, 7 Dec 2011 05:33:18 +0000 (21:33 -0800)]
use 5.xxx: Don’t load feature.pm unnecessarily
And don’t look in the hint hash unless the LOCALIZE_HH hint is set.
Father Chrysostomos [Wed, 7 Dec 2011 02:20:19 +0000 (18:20 -0800)]
more tests for partial strictures and ver decls
Father Chrysostomos [Wed, 7 Dec 2011 02:12:14 +0000 (18:12 -0800)]
Implement new ‘use 5.xxx' plan
• Version declarations now unload all features before loading the
specified feature bundle.
• Explicit use/no strict overrides any implicit strict-loading done by
version declarations, whether before or after use of strict.pm.
• ‘use 5.01’ or earlier disables any implicitly-enabled strictures.
Father Chrysostomos [Wed, 7 Dec 2011 00:54:18 +0000 (16:54 -0800)]
Document :default feature bundle
Father Chrysostomos [Tue, 6 Dec 2011 22:50:16 +0000 (14:50 -0800)]
Add :default feature bundle
Nicholas Clark [Wed, 7 Dec 2011 12:55:03 +0000 (13:55 +0100)]
bisect-runner.pl should skip the testcase if it fails to build config.sh
Previously if given a testcase and a target of config.sh or config.h, it
would always attempt run it, even if the target (config.sh or config.h)
had not been built. Oddly enough, this usually resulted in the test case
failing, with the consequence that the bisect run ended with a spurious
result. Skipping such revisions instead makes the bisect output meaningful.
Nicholas Clark [Wed, 7 Dec 2011 10:26:29 +0000 (11:26 +0100)]
Porting/expand-macro.pl needs to avoid "macro redefined" errors.
In the C code that Porting/expand-macro.pl generates, it #includes the
header containing the macro, to ensure that the macro definition is seen.
This was skipped for perl.h and EXTERN.h, which it always automatically
includes. However, perl.h includes embed.h and embedvar.h and then undefines
and redefines macros in them. Hence if either header is included (again) the
compiler warns about macro redefinitions. Hence ensure that neither is
included a second time.
Chris 'BinGOs' Williams [Wed, 7 Dec 2011 09:52:42 +0000 (09:52 +0000)]
Sync versions in Maintainers.pl for Safe and ExtUtils-ParseXS
Father Chrysostomos [Tue, 6 Dec 2011 21:17:56 +0000 (13:17 -0800)]
Increase perl5db.pl’s version to 1.35
Father Chrysostomos [Tue, 6 Dec 2011 21:17:13 +0000 (13:17 -0800)]
cmpVERSION.pl: Check lib/*.pl, too
Rafael Garcia-Suarez [Tue, 6 Dec 2011 21:02:21 +0000 (22:02 +0100)]
Upgrade to Safe 2.30
[rt.cpan.org #72872] Fix bad interaction with loading
Tie::Hash::NamedCapture on perls >= 5.14.0
Father Chrysostomos [Tue, 6 Dec 2011 17:24:23 +0000 (09:24 -0800)]
perlfunc/substr: Don’t mention dev release
Dev releases are an artefact of the developement process, so mentioning
them is not helpful to the average reader.
Father Chrysostomos [Tue, 6 Dec 2011 17:22:59 +0000 (09:22 -0800)]
Document substr lv with negative offset
Father Chrysostomos [Tue, 6 Dec 2011 16:44:43 +0000 (08:44 -0800)]
Update eval docs for list context fix
Father Chrysostomos [Sat, 19 Nov 2011 19:13:24 +0000 (11:13 -0800)]
[perl #80630] Make eval"" return empty list for syntax errors
Up till now, eval"" in list context was returning a list containing
undef for syntax errors and an empty list for run-time errors.
Father Chrysostomos [Tue, 6 Dec 2011 16:34:15 +0000 (08:34 -0800)]
Don’t LEAVE_with_name("evalcomp") for syntax errors
In S_doeval, if yystatus == 0 but there have been parser errors, then
there will be an extra scope on the scope stack inside the evalcomp
scope, causing an assertion failure with LEAVE_with_name("evalcomp").
This can happen with eval(q|""!=!~//|), which is a reduced version of
an eval in SNMP::Trapinfo’s test suite.
Under non-debugging builds, everything would have worked anyway,
as the LEAVE_with_name("evalcomp") would have left the scope
inside evalcomp.
Since POPBLOCK pops away the savestack markers on the scope stack, it
is not actually necessary to do LEAVE_with_name("evalcomp") at all
when there is a syntax error.
Alexandr Ciornii [Tue, 6 Sep 2011 21:30:46 +0000 (00:30 +0300)]
|| instead of "or" (perl#78708)
Father Chrysostomos [Mon, 5 Dec 2011 20:55:57 +0000 (12:55 -0800)]
Put optimised substr assignment in void context
24fcb59fc optimised substr assignment in void context down to four-arg
substr, causing considerable speed-up, but did not take the extra step
of marking the substr op itself as being in void context, so pp_substr
was still constructing a return value. This commit speed things up
just a tiny bit more.
Ricardo Signes [Mon, 5 Dec 2011 03:47:24 +0000 (22:47 -0500)]
fix some foibles in perlintro.pod
1. add a missing "of"
2. add a post-dot space missed in e8b5ae5
3. get the motto "right" as per common usage
Chris 'BinGOs' Williams [Sun, 4 Dec 2011 20:55:58 +0000 (20:55 +0000)]
Update IO-Compress to CPAN version 2.045
[DELTA]
2.045 3 December 2011
* Restructured IO::Compress::FAQ.pod
Chris 'BinGOs' Williams [Sun, 4 Dec 2011 20:48:57 +0000 (20:48 +0000)]
Update Compress-Raw-Zlib to CPAN version 2.045
[DELTA]
2.045 3 December 2011
* Moved FAQ.pod into Zlib.pm
Chris 'BinGOs' Williams [Sun, 4 Dec 2011 20:45:37 +0000 (20:45 +0000)]
Update Compress-Raw-Bzip2 to CPAN version 2.045
[DELTA]
2.045 3 December 2011
* Moved FAQ.pod to IO::Compress
Father Chrysostomos [Sun, 4 Dec 2011 18:47:40 +0000 (10:47 -0800)]
Adjust substr offsets when using, not when creating, lvalue
When substr() occurs in potential lvalue context, the offsets are
adjusted to the current string (negative being converted to positive,
lengths reaching beyond the end of the string being shortened, etc.)
as soon as the special lvalue to be returned is created.
When that lvalue is assigned to, the original scalar is stringified
once more.
That implementation results in two bugs:
1) Fetch is called twice in a simple substr() assignment (except in
void context, due to the special optimisation of commit
24fcb59fc).
2) These two calls are not equivalent:
$SIG{__WARN__} = sub { warn "w ",shift};
sub myprint { print @_; $_[0] = 1 }
print substr("", 2);
myprint substr("", 2);
The second one dies. The first one only warns. That’s mean. The
error is also wrong, sometimes, if the original string is going to get
longer before the substr lvalue is actually used.
The behaviour of \substr($str, -1) if $str changes length is com-
pletely undocumented. Before 5.10, it was documented as being unreli-
able and subject to change.
What this commit does is make the lvalue returned by substr remember
the original arguments and only adjust the offsets when the assign-
ment happens.
This means that the following now prints z, instead of xyz (which is
actually what I would expect):
$str = "a";
$substr = \substr($str,-1);
$str = "xyz";
print $substr;
Father Chrysostomos [Sat, 3 Dec 2011 19:02:32 +0000 (11:02 -0800)]
Clarify docs for sv_usepvn_flags
Note that the string must be the start of a mallocked block of memory,
and not a pointer to the middle of it.
Nicholas Clark [Fri, 25 Nov 2011 17:16:35 +0000 (18:16 +0100)]
On AIX, avoid a shell pipepline by making makedef.pl sort case insenitively.
Previously the Makefile piped the output of makedef.pl to sort. This had the
side effect of ignoring the exit code from makedef.pl, as make could only
see the exit code of the last command in the pipeline. This concealed the
causes of the parallel make failure when makedef.pl was missing a dependency
on Config.pm
Nicholas Clark [Thu, 24 Nov 2011 21:34:43 +0000 (22:34 +0100)]
Simplify S_parse_body() by calling S_usage() and S_minus_v() directly.
Previously the code for "--help" and "--version" set a local variable to a
string corresponding to the single character option ("h" or "v"
respectively), then restarted the option parsing code, which would then call
into Perl_moreswitches(), which would then use a switch statement to
dispatch to the final code.
This is not as clear as it could be.
Nicholas Clark [Thu, 24 Nov 2011 20:40:40 +0000 (21:40 +0100)]
Break the -v code out from Perl_moreswitches() into S_minus_v().
Nicholas Clark [Thu, 24 Nov 2011 20:28:27 +0000 (21:28 +0100)]
Refactor S_usage() to take 0 parameters and exit directly().
This simplifies the code, as it's only called from one spot, in
Perl_moreswitches().
Chris 'BinGOs' Williams [Sat, 3 Dec 2011 23:59:33 +0000 (23:59 +0000)]
Update IO-Compress to CPAN version 2.044
[DELTA]
2.044 2 December 2011
* Moved FAQ.pod under the lib directory so it can get installed
* Added bin/zipdetails
* IO::Compress::Zip
- In one-shot mode enable Zip64 mode if the input file/buffer
>= 0xFFFFFFFF bytes.
* IO::Compress::FAQ
- Updates
Chris 'BinGOs' Williams [Sat, 3 Dec 2011 23:07:58 +0000 (23:07 +0000)]
Update Compress-Raw-Zlib to CPAN version 2.044
[DELTA]
2.044 2 December 2011
* Moved FAQ.pod under the lib directory so it can get installed
Chris 'BinGOs' Williams [Sat, 3 Dec 2011 23:00:35 +0000 (23:00 +0000)]
Update Compress-Raw-Bzip2 to CPAN version 2.044
[DELTA]
2.044 2 December 2011
* Moved FAQ.pod under the lib directory so it can get installed
Craig A. Berry [Sat, 3 Dec 2011 21:55:26 +0000 (15:55 -0600)]
Remove the VMS-specific private len in S_mayberelocate.
This particular C<STRLEN len;> came along almost 15 years ago, way
back in
aa6893958c2b. Back then it was a plain and simple block
scope variable. But now this code lives in a function that takes
as an argument a variable of the same name and having the same
meaning (i.e., the length of the directory name to be added to
@INC). Someone looking only at the argument list might reasonably
expect to be able to use len (though luckily there are no subsequent
uses of it currently). So we really ought to update that len rather
than create our own when we hijack the directory name to make our
unixified version of it.
Father Chrysostomos [Sat, 3 Dec 2011 17:36:38 +0000 (09:36 -0800)]
Remove SvTAINT from sv_sethek
This was copied from sv_usepvn_flags in commit
58b643af9. It is
unnecessary, and probably incorrect, as heks are not tainted.
Why sv_sethek used sv_usepvn_flags to begin with I don’t know, but I
imagine it was for brevity’s sake. This code was ultimately derived
from newSVhek, which doesn’t use sv_usepvn_flags. Because of that,
and because it is now far enough removed from sv_usepvn_flags, I have
removed the comment referring to it.
Shlomi Fish [Sat, 3 Dec 2011 14:56:53 +0000 (06:56 -0800)]
perl -d bugfixes and tests
This patch fixes some bugs in "perl -d" (see ticket #104820) and adds
some regression tests (for the bugfixes and for better test coverage).
Peter Martini [Sat, 3 Dec 2011 12:01:44 +0000 (07:01 -0500)]
Stop calling sv_usepvn_flags from sv_sethek
sv_usepvn_flags assumes that ptr is at the head of a block
of memory allocated by malloc. If perl's malloc is in use,
the data structures malloc uses and the data allocated for
perl are intermixed, and accounting done by malloced_size
in sv_usepvn_flags will overwrite valid memory if its called
on an address that is not the start of a malloced block.
The actual work being accomplished by sv_usepvn_flags, and
not undone immediately after by sv_sethek, is limited to 3 calls
on the SV. Inlining those calls removes the dependency on malloc.
This fixes perl #104034.
Craig A. Berry [Sat, 3 Dec 2011 16:36:58 +0000 (10:36 -0600)]
VMS-specific scope fix for S_mayberelocate.
Back in
3185893b8dec106 I moved some code from the beginning of one
block to the middle of a different block. Bad me. The compiler
has been lax about allowing declarations in the middle of a block,
so we haven't noticed. But as of
c29067d7797853039, the code moved
to a new function while leaving the block it was in behind and we
end up with conflicting declarations of len.
Making our own block seems like the safest thing to do. The
indentation in this section of code is a bit wacky -- I chose the
least intrusive alternative for clearer blame logs.
Nicholas Clark [Thu, 24 Nov 2011 19:38:08 +0000 (20:38 +0100)]
Small tidyups in S_incpush() and S_mayberelocate()
Following commit
816005240f1a3b99, which moved VMS-specific code, we can now
assign to subdir at the point of declaration. After the refactoring that
moved code into S_mayberelocate(), we can assign to libdir at the point of
declaration. In turn, this allows the merging of two #ifndef PERL_IS_MINIPERL
blocks. Remove a blank line from S_mayberelocate().
Nicholas Clark [Thu, 24 Nov 2011 17:11:32 +0000 (18:11 +0100)]
Avoid attacks on sitecustomize by using NUL delimiters to wrap filenames.
Previously the generated code used regular '' strings, which meant that a
crafted pathname containing ' characters could be used to inject code.
Until the previous commit, this was only a problem if building in or
Configuring to install to such a directory. Which, hopefully, would be
"obviously wrong" to anyone capable of building Perl from source.
However, fixing the bug that prevented sitecustomize being subject to
relocatable include now means that for a relocatable pearl, an end-user
controlled path can now reach the sitecusomize code.
Carl Hayter [Thu, 24 Nov 2011 16:49:50 +0000 (17:49 +0100)]
Make sitecustomize relocatableinc aware
When -Dusesitecustomize is used with -Duserelocatableinc,
SITELIB_EXP/sitecustomize.pl is not found due to SITELIB_EXP having a
'.../..' relocation path.
This patch refactors the path relocation code from S_incpush() into
S_mayberelocate() so that it can be used in both S_incpush() and in
usesitecustomize's use of SITELIB_EXP.
Nicholas Clark [Sat, 3 Dec 2011 11:59:05 +0000 (11:59 +0000)]
Tidy up t/re/regexp.t
Eliminate the declaration of $numtests, unused since commit
1a6108908b085da4.
Convert $iters and $OP to lexicals. Remove the vestigial logic for finding
t/re/re_tests - the MacOS classic style pathname is redundant now, and the
file can never be found at t/re/re_tests given that there is a chdir 't' in
the BEGIN block.
Craig A. Berry [Sat, 3 Dec 2011 03:33:25 +0000 (21:33 -0600)]
Rework vms/vms.c:Perl_flex_stat_int() to avoid underscore ambiguity.
An apparently long-standing bug in the home-grown stat() wrapper
was exposed by b8ab4b0, which added the t/test_pl directory. On
VMS, file test operations using the Perl_flex_stat_int() function
would confuse t/test.pl with t/test_pl because dots are the directory
delimiter and not traditionally allowed in directory names, so when
doing a stat() of t/test.pl it would convert the dot to an underscore
and succeed because that directory now exists. All tests using
t/test.pl would then fail.
The background is that traditionally, the CRTL stat() could not deal
with directory specifications in native format, so for example,
dev:[dir.dir2] had to be converted to dev:[dir]dir2.DIR for various
operations, including the stat() call, to succeed. This is now the
exception; it's still necessary for rmdir(), but not for stat(), at
least not on OpenVMS VAX v7.3, OpenVMS Alpha v7.3-2, OpenVMS Alpha
v8.3, and OpenVMS I64 v8.4, i.e., anything released in the last
eight years. A so-called "fileified" directory spec did not cause
problems on its own, but if converted to native syntax first, the
dot would get replace with the now-ambiguous underscore.
The balance was tipped in
312ac60b381, where the fatal conversion
to a native path was added. The best path forward seems to be to
do less and allow the CRTL stat() or lstat() to do their thing
unimpeded, which in most cases they do just fine. This has the
added benefit of optimizing for files instead of directories and
saving some unnecessary filename conversions and filename buffer
allocations. More refactorings are likely desireable.
There is one new test failure in dist/ExtUtils-Manifest/t/Manifest.t
having to do with a filename containing a space, but this seems
preferable to the hundreds of test failures before this patch. That
indicates, however, that there is more work to do.
Craig A. Berry [Sat, 3 Dec 2011 03:30:30 +0000 (21:30 -0600)]
Add Term::ReadLine to write_buildcustomize.pl.
If the build fails while building extensions, it's nice to have
the debugger available to help figure out what went wrong. You
couldn't do that before because lib/perl5db.pl depends on
Term::ReadLine, which wouldn't be available since it hadn't been
built yet. This commit makes Term::ReadLine available via the
same mechanism that makes other libraries available to miniperl
during the build.
An alternative would be to remove the debugger's dependency on
Term::ReadLine, but that would be more work and more risk for a
situation that hopefully doesn't come up that often.
Tony Cook [Fri, 2 Dec 2011 12:23:00 +0000 (23:23 +1100)]
more reliably kill a runaway test process on cygwin
Sometimes a plain kill isn't enough.
Along with the previous change this reliably kills a blocked
t/op/threads.t on cygwin as needed.
This doesn't attempt to fix the underlying bug (which may be in
Win32, cygwin or perl itself)
Tony Cook [Fri, 2 Dec 2011 12:25:33 +0000 (23:25 +1100)]
don't depend on threads to do a watchdog when testing threads
adds a "process" watchdog method that forces use of a separate
process for the watchdog "watcher".
Father Chrysostomos [Sat, 3 Dec 2011 01:52:17 +0000 (17:52 -0800)]
Add Mark Dootson to AUTHORS