Father Chrysostomos [Tue, 22 Nov 2011 07:43:17 +0000 (23:43 -0800)]
[perl #80628] __SUB__
After much alternation, altercation and alteration, __SUB__ is
finally here.
Father Chrysostomos [Tue, 22 Nov 2011 06:40:41 +0000 (22:40 -0800)]
Test for lack of uninit warnings in sub redef
This adds tests for something I fixed ‘by mistake’ in
efcf35c4, which
occurs from 5.8.0 to 5.15.5:
$ perl5.15.4 -le '
use warnings "uninitialized";
use constant {u=>undef,v=>undef};
sub foo(){u} sub foo(){v}
'
Use of uninitialized value at -e line 1.
Use of uninitialized value at -e line 1.
Father Chrysostomos [Tue, 22 Nov 2011 06:50:23 +0000 (22:50 -0800)]
sv.c: newSVpvf( → Perl_newSVpvf(aTHX_
I don’t know why this is necessary, but there are some strange
#defines surrounding this function.
Father Chrysostomos [Tue, 22 Nov 2011 05:57:21 +0000 (21:57 -0800)]
Put sub redef warnings in one place
The logic surrounding subroutine redefinition warnings (to warn or not
to warn?) was in three places. Over time, they drifted apart, to the\rpoint that newXS was following completely different rules. It was
only warning for redefinition of functions in the autouse namespace.
Recent commits have brought it into conformity with the other redefi-
nition warnings.
Obviously it’s about time we put it in one function.
Karl Williamson [Tue, 22 Nov 2011 00:41:02 +0000 (17:41 -0700)]
PATCH: [perl #104226]: Name.pm missing from unicore
The installperl script needed to be updated to include this file.
Father Chrysostomos [Tue, 22 Nov 2011 00:12:50 +0000 (16:12 -0800)]
Make const redef warnings default in newXS
There is no reason why constant redefinition warnings should be
default warnings for sub foo(){1}, but not for newCONSTSUB (which
calls newXS, which triggers the warning).
To make this work properly, I also had to import sv.c’s ‘are these
const subs from the same SV originally?’ logic. Constants created
with XS can have NULL for the SV (they return an empty list or
&PL_sv_undef), which means sv.c’s logic will stop *this=\&that from
warning if both this and that are such XS-created constants.
newCONSTSUB needed to be consistent with that. It required tweaking a
test I added a few commits ago, which arguably shouldn’t have warned
the way it was written.
As of this commit (and before it, too, come to think of it),
newXS_len_flags’s calling convention is quite awful and would need to
be throughly re-thunk before being made into an API, or probably sim-
ply never made into an API.
Father Chrysostomos [Mon, 21 Nov 2011 22:14:36 +0000 (14:14 -0800)]
Refactor newXS’s autouse logic
Putting inside the if() condition allows me to add an || in the
next commit.
Karl Williamson [Tue, 22 Nov 2011 00:09:07 +0000 (17:09 -0700)]
utf8.c: typos in pod
Karl Williamson [Tue, 22 Nov 2011 00:04:38 +0000 (17:04 -0700)]
PATCH: [perl #32080] is_utf8_string() reads too far
This function and is_utf8_string_loclen() are modified to check before
reading beyond the end of the string; and the pod for is_utf8_char()
is modified to warn about the buffer overflow potential.
Karl Williamson [Mon, 21 Nov 2011 23:58:30 +0000 (16:58 -0700)]
utf8.h: Add missing parens
These weren't caught because it only is compiled on an EBCDIC platform,
and I had to fake it to force the compilation
Karl Williamson [Mon, 21 Nov 2011 23:28:52 +0000 (16:28 -0700)]
utf8.h: define IS_UTF8_CHAR for EBCDIC
This is based on my eyeballing a file I had generated of the encodings
for Unicode code points, so could be wrong. It does compile
Karl Williamson [Mon, 21 Nov 2011 23:25:17 +0000 (16:25 -0700)]
utf8.h: White space only
This indents for clarity with the surrounding #if, and #end.
Karl Williamson [Mon, 21 Nov 2011 23:21:58 +0000 (16:21 -0700)]
utfebcdic.h: Add synonymous macros
I8 is a synonym for 'UTF' in this context, and is more meaningful to me.
Father Chrysostomos [Mon, 21 Nov 2011 21:16:56 +0000 (13:16 -0800)]
perldiag: constant redef warning is not always default
If the value of the new constant is the same as the old, this warning
only occurs under ‘use warnings 'redefine'’ and $^W=1, not under $^W=0
outside of any warnings scope.
Father Chrysostomos [Mon, 21 Nov 2011 21:09:19 +0000 (13:09 -0800)]
perlsub: constant redef warning is default, not mandatory
Father Chrysostomos [Mon, 21 Nov 2011 21:02:47 +0000 (13:02 -0800)]
Make constant sub redef warnings obey scope
In perldiag, this is listed as (S), which means that outside of any
use/no warnings scope it always warns, regardless of $^W.
But this warning was ignoring use/no warnings, too.
There were actually tests for this oddity, but I think those were
added by mistake, or this was just not thought through. I cannot see
how this is not a bug.
Father Chrysostomos [Mon, 21 Nov 2011 17:35:20 +0000 (09:35 -0800)]
autouse.t: suppress warnings
Father Chrysostomos [Mon, 21 Nov 2011 16:40:34 +0000 (08:40 -0800)]
Don’t call an early-returning destructor
This speeds things up 2.8 times in my naïve benchmarks.
This applies to code like:
use constant DEBUG => 1;
DESTROY { return unless DEBUG; ... }
which gets optimised down to:
DESTROY { return; ... }
Adding such a destructor will now have almost no impact on speed in
production.
Father Chrysostomos [Mon, 21 Nov 2011 08:21:43 +0000 (00:21 -0800)]
Make newXS redefinition warning respect UTF8
Father Chrysostomos [Mon, 21 Nov 2011 08:06:23 +0000 (00:06 -0800)]
Make newCONSTSUB use the right warning scope.
newCONSTSUB uses the compile-time warning hints, instead of the run-
time hints. This means that
use warnings;
BEGIN {
no warnings;
some_XS_function_that_calls_new_CONSTSUB();
}
may trigger a redefinition warning, whereas it should be analogous to
use warnings;
BEGIN {
no warnings;
*foo = \&bar;
}
which does not warn.
newCONSTSUB localises PL_curcop and sets it to &PL_compiling. When it
does that, it needs to copy the hints over.
Running tests inside eval is not reliable without a test count, so I
added one.
Father Chrysostomos [Mon, 21 Nov 2011 07:46:48 +0000 (23:46 -0800)]
Restore autouse’s exemption from redef warnings
This also restores the subroutine redefinition warning for newly-cre-
ated XSUBs outside the autouse package. See below.
This commit added the exemption to fix a known bug, that loading a
module and importing from it would cause a redefinition warning if
there were an autouse stub:
perl-5.004_03-1092-g2f34f9d
commit
2f34f9d4825ac9262ece854fc4c50479f4838ff8
Author: Ilya Zakharevich <ilya@math.berkeley.edu>
Date: Mon Mar 2 16:36:02 1998 -0500
Make autouse -w-safe
p4raw-id: //depot/perl@781
The subroutine redefinition warning occurs in three places.
This commit removed the autouse exemption from two
of them. I can’t see how it wasn’t a mistake, as <
5104D4DBC598D211B5FE0000F8FE7EB202D49EE9@mbtlipnt02.btlabs.bt.co.uk>
(the apparent source of the patch, makes no mention of it:
perl-5.005_02-2920-ge476b1b
commit
e476b1b5c29f354cf8dad61a9fc6d855bdfb5b7d
Author: Gurusamy Sarathy <gsar@cpan.org>
Date: Sun Feb 20 22:58:09 2000 +0000
lexical warnings update, ability to inspect bitmask in calling
scope, among other things (from Paul Marquess)
p4raw-id: //depot/perl@5170
This commit refactored things to remove some compiler warnings, but
in doing so reversed the logic of the condition, causing redefini-
tion warnings for newly-created XSUBs to apply only to subs from the
autouse package:
perl-5.8.0-5131-g66a1b24
commit
66a1b24beb76ea873ad4caa57ee3ab9df945afbf
Author: Andy Lester <andy@petdance.com>
Date: Mon Jun 6 05:11:07 2005 -0500
Random cleanups #47
Message-ID: <
20050606151107.GC7022@petdance.com>
p4raw-id: //depot/perl@24735
I’ve basically reinstated the changes in
2f34f9d4, but with tests
this time.
It may not make sense for autouse to be exempt for newATTRSUB and
newXS, but keeping the logic surrounding the warning as close as
possible to being the same could allow future refactorings to
merge them.
Father Chrysostomos [Mon, 21 Nov 2011 00:54:11 +0000 (16:54 -0800)]
sv.c: I missed a dot
Father Chrysostomos [Mon, 21 Nov 2011 00:50:37 +0000 (16:50 -0800)]
Make sort {} and sort {()} equivalent
sub {} and sub{()} are equivalent. In list context they both return
the empty list. In scalar context they both return undef. But sort
doesn’t seem to think so. It croaks on sub{}. This commit fixes that
and makes it consistent.
I left XSUBs alone, since I’m not sure how they are supposed
to behave.
Ricardo Signes [Mon, 21 Nov 2011 02:41:33 +0000 (21:41 -0500)]
Merge remote-tracking branch 'p5p/smoke-me/gsoc-pod' into blead
Steve Hay [Mon, 21 Nov 2011 01:59:43 +0000 (01:59 +0000)]
Update release managers' guide
The new instructions for creating a new perldelta have now been battle
tested and withstood most excellently any would-be onslaught from gremlins.
Steve Hay [Mon, 21 Nov 2011 01:51:37 +0000 (01:51 +0000)]
Create new perldelta ready for 5.15.6
Steve Hay [Mon, 21 Nov 2011 01:03:23 +0000 (01:03 +0000)]
Add the 5.15.5 release epigraph to epigraphs.pod
Father Chrysostomos [Mon, 21 Nov 2011 00:18:14 +0000 (16:18 -0800)]
Oops. I thought I tested that.
Father Chrysostomos [Mon, 21 Nov 2011 00:08:18 +0000 (16:08 -0800)]
Add Rodolfo Carvalho to AUTHORS
Rodolfo Carvalho [Sun, 9 Oct 2011 03:53:54 +0000 (00:53 -0300)]
Fix a 5-year-old typo in a comment
Father Chrysostomos [Mon, 21 Nov 2011 00:07:01 +0000 (16:07 -0800)]
$XS::APItest::VERSION = '0.34'
Father Chrysostomos [Sun, 20 Nov 2011 22:51:19 +0000 (14:51 -0800)]
Remove version checks from B::Deparse’s imports
Since we already have code to generate dummy constants if these are
missing, we might as well have that code import the constant in an
eval{}, to avoid all these hairy version checks.
Father Chrysostomos [Mon, 21 Nov 2011 00:02:53 +0000 (16:02 -0800)]
Revert "$XS::APItest::VERSION = '0.34'"
This reverts commit
01394286a8355f7c2b1de8f793a62c37d4aa265e.
I made the mistake (again!) of merging two unrelated commits.
I’m reverting it so that the B::Deparse change can include a
helpful commit message.
Father Chrysostomos [Sun, 20 Nov 2011 22:51:19 +0000 (14:51 -0800)]
$XS::APItest::VERSION = '0.34'
Aaron Crane [Wed, 17 Aug 2011 14:56:38 +0000 (17:56 +0300)]
Update Aaron Crane's email address in AUTHORS
Father Chrysostomos [Sun, 20 Nov 2011 22:25:17 +0000 (14:25 -0800)]
$strict::VERSION = "1.06"
Aaron Crane [Sun, 20 Nov 2011 22:24:54 +0000 (14:24 -0800)]
Update strict.pm docs to mention C<state>
Father Chrysostomos [Sun, 20 Nov 2011 22:15:10 +0000 (14:15 -0800)]
Increase $B::Deparse::VERSION to 1.10
Father Chrysostomos [Sun, 20 Nov 2011 08:14:10 +0000 (00:14 -0800)]
Deparse sort(foo(bar)) correctly
sort(foo(bar)) makes foo a function call
sort foo(bar) (how it used to deparse) makes foo a comparison routine
Father Chrysostomos [Sun, 20 Nov 2011 07:39:57 +0000 (23:39 -0800)]
Make constant promotion null-clean
When an optimised constant is promoted to a CV, the name’s length can
be passed straight to newCONSTSUB_flags, as it now has a length param-
eter which it passes to newXS_len_flags.
Father Chrysostomos [Sun, 20 Nov 2011 07:37:45 +0000 (23:37 -0800)]
Have newCONSTSUB pass the length to newXS
Father Chrysostomos [Sun, 20 Nov 2011 07:34:13 +0000 (23:34 -0800)]
Add newXS_len_flags
It accepts a length as well as a pv for the name.
Since newXS_flags is marked with M in embed.fnc and is undocumented,
technically policy allows me to change it, but there are files
throughout cpan/ that use newXS_flags. So it seemed safer to add a
new function.
Father Chrysostomos [Sun, 20 Nov 2011 07:23:27 +0000 (23:23 -0800)]
Have newATTRSUB remember the name’s length
Now that newCONSTSUB_flags has a length parameter, new ATTRSUB can
record the length and pass that to newCONSTSUB_flags, instead of using
strlen to get it.
Father Chrysostomos [Sun, 20 Nov 2011 07:06:46 +0000 (23:06 -0800)]
Add len flag to newCONSTSUB_flags
This function was added after 5.14.0, so it is not too late to
change it. It is currently unused.
Steve Hay [Sun, 20 Nov 2011 18:01:56 +0000 (18:01 +0000)]
Final update to perldelta for 5.15.5.
Steve Hay [Sun, 20 Nov 2011 17:03:21 +0000 (17:03 +0000)]
Add 5.15.5 to perlhist.
Steve Hay [Sun, 20 Nov 2011 17:03:04 +0000 (17:03 +0000)]
Update Module::CoreList (to 2.58) for 5.15.5.
Steve Hay [Sun, 20 Nov 2011 17:02:16 +0000 (17:02 +0000)]
Fix up B::Deparse following recent version bumps
Steve Hay [Sun, 20 Nov 2011 14:56:15 +0000 (14:56 +0000)]
Bump the perl version for 5.15.5
Steve Hay [Sun, 20 Nov 2011 13:57:31 +0000 (13:57 +0000)]
Fix Win32 build with plain VC6 compiler
The Socket extension module currently doesn't compile on Win32 using the
VC6 compiler with its standard headers. It can be made to work by using
the 2003 Platform SDK, but it is preferable not to need to do that.
This patch is by Jan Dubois, taken from
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2011-11/msg00557.html
The patch is modified slightly to take account of MinGW already providing
the missing struct definition, but may yet need some further tweaks since
it was not quite finished by Jan yet.
Steve Hay [Sun, 20 Nov 2011 12:33:55 +0000 (12:33 +0000)]
Correct the Term-ANSIColor distro name in Maintainers.pl
It was recently renamed from ANSIColor.
Vincent Pit [Sun, 20 Nov 2011 10:56:11 +0000 (11:56 +0100)]
Handle require() on implicit $_ properly w/r global overrides
Those require() calls are compiled as BASEOPs, so it is invalid to look for
their op_first member when they are translated to a call to the global
override subroutine. The new entersub call should get $_ in its argument
list instead.
This fixes [perl #78260].
Steve Hay [Sun, 20 Nov 2011 03:45:37 +0000 (03:45 +0000)]
Update Locale-Maketext to 1.20
Pick up new ChangeLog from CPAN 1.19, and then bump $VERSIONs to 1.20
to account for local changes
b1f1f4d8b1 and
d7d631d38c (upstream is blead).
Steve Hay [Sun, 20 Nov 2011 03:12:08 +0000 (03:12 +0000)]
Fix broken pod in perldelta
Steve Hay [Sun, 20 Nov 2011 02:43:12 +0000 (02:43 +0000)]
Update perldelta
Now believed to be complete for 5.15.5 except for the Acknowledgements.
Father Chrysostomos [Sun, 20 Nov 2011 02:24:51 +0000 (18:24 -0800)]
perldelta for sort warning fix
Father Chrysostomos [Sun, 20 Nov 2011 02:21:46 +0000 (18:21 -0800)]
Make sort’s warnings dependent on the right hints
sort’s warnings about uninitialized (or non-numeric) values returned
from comparison routines are emitted in the scope of the compar-
ison routine, not the sort function itself. So, not only does
‘use warnings; sort...’ not always warn, but the line numbers can be
off, too:
$ ./perl -Ilib -e '()=sort flobbp 1,2;' -e'use warnings;sub flobbp{"foo"}'
Argument "foo" isn't numeric in sort at -e line 2.
The solution is to restore PL_curcop to its previous value before get-
ting a number out of the comparison routine’s return value.
Father Chrysostomos [Sun, 20 Nov 2011 01:40:07 +0000 (17:40 -0800)]
Clarify perldelta entry
Father Chrysostomos [Sun, 20 Nov 2011 00:43:37 +0000 (16:43 -0800)]
perldelta for sort $globref fix
Father Chrysostomos [Sun, 20 Nov 2011 00:42:28 +0000 (16:42 -0800)]
sort does not call get-magic after dereffing
sort $f @list accepts a globref for $f, and probably has since Perl
5.000, even if it was by mistake that it ever worked.
It doesn’t respect get-magic, however:
$ perl -le 'sub s { $b <=> $a }; $f = \*s; print sort $f 1,2,3'
321
$ ./perl -Ilib -le '
sub TIESCALAR{bless[]}
sub FETCH {*s}
sub s { $b <=> $a };
tie $f, "";
$g = \$f;
print sort $g 1,2,3'
Not a subroutine reference at -e line 1.
Interestingly, this commit added support for sort $coderef @foo:
commit
7a4920e67d1e2d67a4397a908141c6608866ebb0
Author: Graham Barr <gbarr@pobox.com>
Date: Fri Nov 27 05:16:50 1998 +0000
integrate change#2246 from mainline, while still allowing
C<sort $globref @foo>
allow C<sort $coderef @foo>
p4raw-link: @2246 on //depot/perl:
c6e96bcb406bc8b8d8610606459ff606ad6883aa
p4raw-id: //depot/maint-5.005/perl@2315
p4raw-integrated: from //depot/perl@2314 'merge in' t/op/sort.t
(@1760..)
If I’m reading this code correctly, it did so by nulling out whatever
op used to come after the pushmark (now it is always a null):
$ perl -MO=Concise -e 'sort $fo @fo'8 <@> leave[1 ref] vKP/REFC ->(end)
1 <0> enter ->2
2 <;> nextstate(main 1 -e:1) v:{ ->3
7 <@> sort vKS ->8
3 <0> pushmark s ->4
- <1> null K/1 ->5 <--- Lo!
- <1> ex-rv2sv sK/1 ->-
4 <#> gvsv[*fo] s ->5
6 <1> rv2av[t3] lK/1 ->7
5 <#> gv[*fo] s ->6
-e syntax OK
To preserve the globref support (which the nulled op was providing
before), it added it to sv_2cv, which was the wrong place if you ask
me. Now it means that &{\*_} works, in addition to &{*_}. Other
deref ops don’t have this property. Bug? Maybe. But we can just
pretend it’s a feature and live with it.
In any case, extracting the entry of a typeglob without calling get-
magic on it first doesn’t seem right.
Steve Hay [Sun, 20 Nov 2011 00:54:20 +0000 (00:54 +0000)]
Update perldelta
Begin perldelta updates for 5.15.5: this brings the changes made to
modules/pragmata and diagnostics up to date.
Father Chrysostomos [Sun, 20 Nov 2011 00:17:03 +0000 (16:17 -0800)]
perldelta for open() FETCH fix
Father Chrysostomos [Sat, 19 Nov 2011 22:38:09 +0000 (14:38 -0800)]
Document sv_2io’s invocation of magic
Father Chrysostomos [Sat, 19 Nov 2011 22:35:24 +0000 (14:35 -0800)]
Call FETCH once on handle passed as 3rd arg to open()
When open() has three arguments and the second ends with & the third
argument is treated as a handle.
In some cases get-magic was being skipped; in others, it was being
called three times.
This commit fixes it by modifying sv_2io.
In 5.8.x (before commit
7a5fd60d4), sv_2io did not call get-magic at
all except when croaking ("Bad filehandle: %"SVf). In 5.10.0 (after
commit
7a5fd60d4), it started calling get-magic only if the sv was
neither a glob, a reference, or undef. So it has never been reliable
in its invocation of get-magic.
sv_2io now consistently skips get-magic on the sv passed in directly
to it (open(), the only caller in the core, has already called get-
magic before passing it in). It now calls get-magic on SvRV(sv) if
what is passed in is a reference, so open(fh, ">&", \$tied) will work.
Interestingly, open supports multiple levels of references:
\\\\\\\\\\\\open+f,">&",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\\\\\\\\\\\*STDOUT;print{f}"Just another Perl hacker,\n",.\\\\\\\y\\\
Father Chrysostomos [Sat, 19 Nov 2011 20:26:21 +0000 (12:26 -0800)]
perldiag: Assertions are not trappable
In perldiag, the assertion failure messages are listed with (P) in
front of them, indicating trappable internal errors. Assertions are
not trappable, but are followed by SIGABRT.
Father Chrysostomos [Sat, 19 Nov 2011 19:59:54 +0000 (11:59 -0800)]
Remove comment added by mistake in
c7abbf64
Chris 'BinGOs' Williams [Sat, 19 Nov 2011 17:13:28 +0000 (17:13 +0000)]
Update Unicode-Collate to CPAN version 0.85
[DELTA]
0.85 Sat Nov 19 20:01:57 2011
- U::C::Locale newly supports locales: bn, sa.
- added loc_bn.t, loc_cjk.t, loc_sa.t in t.
- updated some locales to CLDR 2.0 : zh__pinyin, zh__stroke.
* supported compatibility decomposable characters and U+FDD0 indexes.
* updated CJK/Pinyin.pm and CJK/Stroke.pm.
Zefram [Sat, 19 Nov 2011 16:00:32 +0000 (16:00 +0000)]
narrower localisation of PL_compcv around eval
PL_compcv used to be localised around the entire string eval process,
and hence at runtime of the evaled code would refer to the evaled code
rather than code of a surrounding compilation. This interfered with the
ability of string-evaled code in a BEGIN block to affect the surrounding
compilation, in a similar way to the localisation of $^H and %^H that
was fixed in
f45b078d20.
Similar to the fix there, this change moves the localisation of PL_compcv
inside the new evalcomp scope. A couple of things were relying on
PL_compcv to find the running code when in a string-eval scope; they now
need to find it from cx->blk_eval.cv, which was already being populated.
Father Chrysostomos [Sat, 19 Nov 2011 14:59:59 +0000 (06:59 -0800)]
sv.c: More consistent use of spaces after dots
in apidocs, plus other tweaks
Father Chrysostomos [Sat, 19 Nov 2011 14:39:48 +0000 (06:39 -0800)]
Correct sv_catsv_flags docs
Get-magic is only called on ssv. SV_SMAGIC is accepted, too.
Father Chrysostomos [Sat, 19 Nov 2011 14:36:39 +0000 (06:36 -0800)]
Correct sv_catpv_flags docs
SV_SMAGIC, not SV_GMAGIC.
Father Chrysostomos [Sat, 19 Nov 2011 14:35:23 +0000 (06:35 -0800)]
Correct sv_catpvn_flags docs
It respects SV_SMAGIC flag, not SV_GMAGIC (which it ignores).
Father Chrysostomos [Sat, 19 Nov 2011 08:30:14 +0000 (00:30 -0800)]
Avoid a redundant copy in pp_glob
Most of the time, the argument to glob() won’t be tied, so we don’t
need to copy it. So only copy it if it is gmagical.
Father Chrysostomos [Sat, 19 Nov 2011 08:20:04 +0000 (00:20 -0800)]
perldelta for var names in @a=~// warning
Father Chrysostomos [Sat, 19 Nov 2011 08:17:44 +0000 (00:17 -0800)]
Mention variable names in @a =~ // warnings
Father Chrysostomos [Sat, 19 Nov 2011 08:03:00 +0000 (00:03 -0800)]
perldelta for y///r implicit $_ uninit warning
Father Chrysostomos [Sat, 19 Nov 2011 07:57:41 +0000 (23:57 -0800)]
Mention implicit $_ in y///r uninit warning
This brings it into conformity with y without the /r.
Father Chrysostomos [Sat, 19 Nov 2011 07:22:17 +0000 (23:22 -0800)]
Merge two adjacent #ifdefs in embed.fnc
d08d57ef added a new #ifdef right after and #endif with the same con-
dition. There is no need for the separation.
Father Chrysostomos [Sat, 19 Nov 2011 06:03:04 +0000 (22:03 -0800)]
Mention the variable name in the new length warnings
Father Chrysostomos [Sat, 19 Nov 2011 04:27:15 +0000 (20:27 -0800)]
Don’t create an AV for unfiltered code
When there are no source filters, we don’t need to create an AV to
hold them. The code for adding a filter already does a null check.
Father Chrysostomos [Sat, 19 Nov 2011 01:57:11 +0000 (17:57 -0800)]
Tweaks to find_uninit_var docs
• Typos
• Double space after fullstop, as that is how nroff renders
a fullstop at the end of a line in mid-paragraph.
Father Chrysostomos [Sat, 19 Nov 2011 01:49:35 +0000 (17:49 -0800)]
perldelta for new length() warning
Father Chrysostomos [Sat, 19 Nov 2011 00:38:49 +0000 (16:38 -0800)]
Fix pp_goto crash with orphaned GV
a7999c089 inadvertently made pp_goto crash if the GV had no
stash pointer.
Father Chrysostomos [Sat, 19 Nov 2011 00:33:58 +0000 (16:33 -0800)]
util.c:get_db_sub: correct comment
This comment was copied from pp_goto by commit
005a8a35, but was not
adjusted to make sense in its new surroundings.
Father Chrysostomos [Sat, 19 Nov 2011 00:18:46 +0000 (16:18 -0800)]
perldelta for GV scalar localisation
Father Chrysostomos [Sat, 19 Nov 2011 00:17:22 +0000 (16:17 -0800)]
Copy magic during localisation even for GVs
The magic-copying is skipped for GVs. This logic goes back to perl
5.000 (patch
a0d0e21e). I think it has always been wrong.
Father Chrysostomos [Thu, 17 Nov 2011 21:03:39 +0000 (13:03 -0800)]
Test length() warning with pad vars
Father Chrysostomos [Thu, 17 Nov 2011 20:43:15 +0000 (12:43 -0800)]
perldiag: Rewrap ‘length() used on %s’
splain output looks better in an 80-column terminal this way.
Matthew Horsfall (alh) [Thu, 17 Nov 2011 04:06:33 +0000 (23:06 -0500)]
Throw a helpful warning when someone tries length(@array) or length(%hash)
Nicholas Clark [Tue, 15 Nov 2011 18:44:18 +0000 (19:44 +0100)]
Tweak the cBOOL() macro to avoid problems with the AIX compiler.
(cherry picked from commit
0cebf65582f924952bfee1472749d442d51e43e6)
Father Chrysostomos [Fri, 18 Nov 2011 23:55:08 +0000 (15:55 -0800)]
Fix threaded build
Commit
a7999c0893, you are at fault!
Father Chrysostomos [Fri, 18 Nov 2011 20:42:45 +0000 (12:42 -0800)]
perldelta: fix for $DB::sub with bad subname
Paul Green [Thu, 10 Nov 2011 22:34:19 +0000 (17:34 -0500)]
Update several test cases to not generate failures on VOS.
Father Chrysostomos [Fri, 18 Nov 2011 17:08:32 +0000 (09:08 -0800)]
Make sure $DB::sub is callable
When DB::sub is about to be called (to handle a subroutine call under
the debugger), $DB::sub is set to the name of the subroutine or a ref-
erence to it.
Sometimes $DB::sub is set to the name when the subroutine is not call-
able under that name. That should not happen.
This logic in util.c:Perl_get_db_sub decides whether a reference
should be used:
if ( svp && ((CvFLAGS(cv) & (CVf_ANON | CVf_CLONED))
|| strEQ(GvNAME(gv), "END")
|| ((GvCV(gv) != cv) && /* Could be imported, and old sub redefined. */
!( (SvTYPE(*svp) == SVt_PVGV)
&& (GvCV((const GV *)*svp) == cv)
&& (gv = (GV *)*svp)
)
)
)) {
/* Use GV from the stack as a fallback. */
(That comment about using the GV from the stack as a fallback applies
to the assignment to gv, but was mistakenly divorced from it in commit
3de9ffa12.)
This logic (introduced in
71be2cbc7 [inseparable changes from
perl5.003_13 to perl5.003_14] and integrated into blead in
491527d02)
tries to find a GV that points to the CV, trying the CV’s own GV
first, and falling back to what is on the stack. But it does not
account for GVs that are not found under their names, which can hap-
pen when a glob is copied and the original is undefined ($foo = *bar;
undef *bar; &$foo) or when a stash element or package is deleted, such
as via Symbol::delete_package.
If the subroutine is not locatable under its own name or the name
under which it was called (the name of the GV argument to entersub),
then a reference should be passed. Otherwise a name that can access
the sub should be passed.
So this commit adds more (no, not more!) conditions to make sure the
gv is actually reachable under its name before using a string.
Since, for effiency, those conditions do not perform an actual symbol
lookup, but simply look inside the GV’s stash, we can no longer rely
on gv_efullname (or even gv_fullname), as the stash may have been
moved around, but use HvENAME and construct the GV name ourselves.
Father Chrysostomos [Fri, 18 Nov 2011 00:38:42 +0000 (16:38 -0800)]
Remove redundant check in pp_hot.c:pp_entersub
PVGVs are always globs now.
Chris 'BinGOs' Williams [Fri, 18 Nov 2011 20:11:08 +0000 (20:11 +0000)]
Update IO-Compress to CPAN version 2.042
[DELTA]
2.042 17 November 2011
* IO::Compress::Zip
- Added exUnixN option to allow creation of the "ux" extra field.
This allows 32-bit UID/GID to be stored.
- In one-shot mode use exUnixN rather than exUnix2 for the UID/GID.
* IO::Compress::Zlib::Extra::parseExtraField
- Fixed bad test for length of ID field
[RT# 72329 & #72505]
Chris 'BinGOs' Williams [Fri, 18 Nov 2011 20:06:18 +0000 (20:06 +0000)]
Update Compress-Raw-Zlib to CPAN version 2.042
[DELTA]
2.042 17 November 2011
* No Changes
Chris 'BinGOs' Williams [Fri, 18 Nov 2011 19:59:16 +0000 (19:59 +0000)]
Update Compress-Raw-Bzip2 to CPAN version 2.042
[DELTA]
2.042 17 November 2011
* No Changes
Nicholas Clark [Fri, 18 Nov 2011 10:22:58 +0000 (11:22 +0100)]
Separate the build and non-build functionality of pod/buildtoc
pod/buildtoc now now only generates pod/perltoc.pod
All the other file (re)generation code is now in Porting/pod_rules.pl
Porting/new-perldelta.pl automates adding a new perldelta
This should simplify the release manager's work.
Nicholas Clark [Tue, 15 Nov 2011 12:17:41 +0000 (13:17 +0100)]
Note the changes to pod/buildtoc in the perldelta.
Principally to note that no-one should notice the difference, but give a clue
as to what might be wrong if they do.