In perl.git, the branch sprout/misc-post-5.16 has been created
<http://perl5.git.perl.org/perl.git/commitdiff/1c4a52909591badb773c1e5c4bdddad6839cee3e?hp=0000000000000000000000000000000000000000>
at 1c4a52909591badb773c1e5c4bdddad6839cee3e (commit)
- Log -----------------------------------------------------------------
commit 1c4a52909591badb773c1e5c4bdddad6839cee3e
Author: Father Chrysostomos <[email protected]>
Date: Thu May 17 22:26:20 2012 -0700
Move SvAMAGIC flag from object to stash
By putting the flag on the stash, we can allow the overloaded status
of all objects of a particular class to change without having to
change the flag on every object (which would require traversing arenas
or keeping caches).
This partially fixes bug #112708, in that objects that existed before
their class had any overloading will start working after overloading
is introduced if other objects are blessed into that class.
Without blessings of other objects, they still donât work yet. The
fix for that is yet to come....
This was also a good excuse for deleting a comment that contained two
typos. :-)
M gv.c
M lib/overload.t
M sv.h
commit fafa9fcf8c3f0c9511136480e5b64f357e569774
Author: Father Chrysostomos <[email protected]>
Date: Thu May 17 20:44:48 2012 -0700
To-do tests for method/isa/overload updates and overloading
Changes to methods, @ISA, or overload settings should affect objects
that are already blessed into the class.
Currently, objects that existed before any overload settings were in
place do not do overloading at all (bug #112708). Objects that were
blessed when overload settings were in place are not affected by
changes to methods or @ISA until another object is blessed into the
same class.
M lib/overload.t
commit a10241334ad2507e1b2c19e441efb458d2cd2a2c
Author: Father Chrysostomos <[email protected]>
Date: Tue May 15 12:52:13 2012 -0700
Donât let method-BLOCK read beyond the stack
$ ./perl -Ilib -e 'use B::Deparse; warn for new{}'
Can't call method "new" on an undefined value at -e line 1.
$ ./perl -Ilib -e 'use B::Deparse; warn for "foo", new{}'
Can't call method "new" without a package or object reference at -e line 1.
Now, why did adding "foo" there change the error message? Because
new{} looks one past the end of the stack. Adding "foo" just caused
it to look at the next dropping left behind by B::Deparse, which just
happened to be some non-ref that was not recognised as a package name.
In fact, I can even do this to control what value it picks up:
$ ./perl -Ilib -e '@_ = ("foo"); new{}'
Can't locate object method "new" via package "foo" (perhaps you forgot to
load "foo"?) at -e line 1.
And then it calls a method with literally no arguments in @_:
$ ./perl -Ilib -we 'use B::Deparse; @_ = "B::Deparse"; warn new{}'
Use of uninitialized value $class in bless at lib/B/Deparse.pm line 569.
Explicit blessing to '' (assuming package main) at lib/B/Deparse.pm line
569.
Can't locate object method "init" via package "main" at lib/B/Deparse.pm
line 588.
And the ultimate:
$ ./perl -Ilib -we 'for(1..1000000) {eval " warn +(1)x$_, new{}"}'
Bus error
$ ./perl -Ilib -we 'for(866..1018) { eval { warn +(1)x$_, new{} }}'
Bus error
OK, thatâs enough fun.
With this commit, Iâm making it an error to call a method this way
with no arguments. Iâm using the âwithout a package or object refer-
enceâ error message, as opposed to âon an undefined valueâ, because
there isnât any undefined value; thereâs nothing at all.
M pp_hot.c
M t/op/method.t
commit c8ae588c612e12cb98bc005eae32881059b42f6b
Author: jkeenan <[email protected]>
Date: Fri May 11 22:32:38 2012 -0700
Document hashref_locked() and hashref_unlocked(). Add tests for them,
include debugging by Father C++.
Make lock_hash_recurse() unlock_hash_recurse() exportable; include them in
SYNOPSIS; write tests for them.
Revise 'carp test' test. In general, tests of error messages should be
written
with like() rather than is(). Why? Because we rarely want to test for the
complete error message if that requires us to exactly calculate strings such
as the line number at which an error occurred.
M ext/Hash-Util/lib/Hash/Util.pm
M ext/Hash-Util/t/Util.t
commit bee087e27a5f47fc467f7f767801e1b1c7d5dc52
Author: Father Chrysostomos <[email protected]>
Date: Mon Apr 30 17:07:31 2012 -0700
Correct comment typo in op.h
M op.h
commit f19ae2d42b005845e89a069d8c4a77bd29532c48
Author: Father Chrysostomos <[email protected]>
Date: Sat Apr 28 14:33:17 2012 -0700
DosGlob.pm: Fix pod syntax
M lib/File/DosGlob.pm
commit 8b31cfc4e3b663d41eb3f1f2519c19a43fbc9f48
Author: Father Chrysostomos <[email protected]>
Date: Fri Apr 27 13:18:36 2012 -0700
Remove obsolete comment from DosGlob.pm
This comment was added by commit 37248846, without explanation.
DosGlob.pm already had âuse strictâ three days before that, added in
commit b75c8c73, three days earlier.
I can only assume that 37248846 was written before b75c8c73 was
applied, and that simply adding âuse strictâ didnât work, considering
that b75c8c73 changed quite a few things to make things strict-safe.
M lib/File/DosGlob.pm
commit 42b7ddf90af39b567c6fdf36624cd55c7f514512
Author: Father Chrysostomos <[email protected]>
Date: Fri Apr 27 13:18:07 2012 -0700
Increase $File::DosGlob::VERSION to 1.07
M lib/File/DosGlob.pm
commit b162962cbb0d1ad8f01e52d88502e0ad0afc3b68
Author: Father Chrysostomos <[email protected]>
Date: Wed Apr 25 18:29:12 2012 -0700
Make lvalue subs copy returned PADTMPs in rvalue cx
I was trying to write a JAPH, but did not get what I expected:
$ ./perl -Ilib -e '@UNIVERSAL::ISA = CORE; print "just another "->ucfirst,
"perl hacker,\n"->ucfirst'
Perl hacker,
Perl hacker,
This happened because coresubs use leavesublv, to avoid copying the
return value wastefully.
But since this is exactly the same ucfirst op being called each time
(the one in &CORE::ucfirstâs op tree), and since ucfirst uses TARG, we
end up with the same scalar.
We have the same problem with lvalue subs:
$ ./perl -Ilib -e 'sub UNIVERSAL::ucfirst :lvalue { ucfirst $_[0] } print
"just another "->ucfirst, "perl hacker,\n"->ucfirst'
Perl hacker,
Perl hacker,
(This is not a regression, as 5.14 gave âCan't modify ucfirst in
lvalue subroutine returnâ.)
So âfixingâ coresubs would not be a solution, but a workaround.
The solution therefore is for leavesublv to copy PADTMPs in
rvalue context.
Commit 80422e24c fixed this for potential lvalue list context (i.e.,
for(lvsub()) {...}), but it wasnât sufficient.
M pp_ctl.c
M t/op/coresubs.t
M t/op/sub_lval.t
commit e525071b853816c3624366f0f7e811e53c1b2a99
Author: Father Chrysostomos <[email protected]>
Date: Wed Apr 25 14:08:48 2012 -0700
scope.c: Simplify and clarify comment
This comment seems to imply that this code is just working around a
problem in gv.c, which we could simply correct there. Iâve already
tried making the quoted code in gv.c handle *^H without a hash, but it
doesnât actually solve the problem. The real problem is that rv2hv
could also add a hash to *^H, via GvHVn, and that is simply not set up
to deal with autovivifying magic at all, and probably shouldnât be.
Also, quoting a piece of code that occurs elsewhere is just asking for
it to drift apart. By this time, the code in gv.c that is quoted in
scope.c is actually three times the length now, and looks completely
different.
M scope.c
commit 35c278a2db772f2f585b8b1cd0eb370111dbb2ab
Author: Dagfinn Ilmari Mannsåker <[email protected]>
Date: Mon Apr 16 01:05:52 2012 +0100
Don't warn about "ambiguous without parens" for ctrl-glob
This fixes the following bogus warning [perl #112456]:
$ perl -e 'undef *^H'
Warning: Use of "undef" without parentheses is ambiguous at -e line 1.
Compare to the non-warning variant:
$ perl -e 'undef *{^H}'
M t/lib/warnings/toke
M toke.c
commit f33990b0c1ee62c0f5ef78486f3cba1fd26b3c86
Author: Father Chrysostomos <[email protected]>
Date: Tue Apr 24 18:10:21 2012 -0700
[perl #112418] Fix POD paragraph formatting
There was no empty line before a verbatim paragraph, making it
not verbatim.
M pod/perlfunc.pod
commit a5c2a16091e2bf2401efe68c051eeace117b5a35
Author: Father Chrysostomos <[email protected]>
Date: Tue Apr 24 18:01:50 2012 -0700
Increase $Hash::Util::VERSION to 0.12
M ext/Hash-Util/lib/Hash/Util.pm
commit 3ba19878cead7b972f3e18a075ddfd04f52c17ee
Author: jkeenan <[email protected]>
Date: Sun Apr 22 20:59:33 2012 -0400
Add subroutines hash_locked() and hashref_locked() to Hash::Util.
Make @EXPORT_OK, synopsis, and list of functions tested with
can_ok() consistent with one another. Rationalize the way
functions are grouped within @EXPORT_OK and the other locations.
Add tests for hash_locked(), hashref_locked(), hash_unlocked() and
hashref_unlocked(). Add descriptions for several unit tests which
lacked them.
For RT #112126.
M ext/Hash-Util/lib/Hash/Util.pm
M ext/Hash-Util/t/Util.t
commit fe5f15169d8ecb652b0e19ec723cf30ff63b109c
Author: Father Chrysostomos <[email protected]>
Date: Tue Apr 24 17:58:04 2012 -0700
File::Find: typo
M lib/File/Find.pm
commit 5b96e7066bfc0d9d95b2327cfb5eecd551f0c0ac
Author: jkeenan <[email protected]>
Date: Fri Apr 6 20:20:59 2012 -0400
Individual files may appear in list of directories to be searched.
Document that, then demonstrate that with additional tests.
For RT #59750.
M lib/File/Find.pm
commit aa9e2c451127a408894a98c41bee42f878cdc2c1
Author: jkeenan <[email protected]>
Date: Thu Apr 5 20:41:14 2012 -0400
Individual files may appear in list of directories to be searched.
Document that, then demonstrate that with additional tests.
For RT #59750.
M lib/File/Find/t/find.t
commit 3a2d66cc04891a6fadebc8bfb262becd96db0de1
Author: Father Chrysostomos <[email protected]>
Date: Tue Apr 24 17:01:00 2012 -0700
Increase $File::Find::VERSION to 1.21
M lib/File/Find.pm
commit ee4bd93b871297e5e257ad92903f3e8963b93989
Author: Father Chrysostomos <[email protected]>
Date: Tue Apr 24 16:00:36 2012 -0700
[perl #112358] Storable: Donât create RV with no refcnt
Otherwise assigning to it will cause the referent to be freed, because
nothing but Storable knows that it has no reference count.
Storable.xs was creating a new RV without increasing the refe-
rence count on the referent. It was then using it to call the
STORABLE_freeze method on the object. Since Perl passes arguments
by reference, it was possible to unref the reference by assigning to
$_[0] within STORABLE_freeze. That would cause the objectâs reference
count to go down.
M dist/Storable/Storable.xs
M dist/Storable/t/blessed.t
commit 113584ed6c35e8cc3b0d90fbf8fee3ebd245f670
Author: Father Chrysostomos <[email protected]>
Date: Tue Apr 24 16:00:13 2012 -0700
Increase $Storable::VERSION to 2.35
M dist/Storable/Storable.pm
commit dbf897874e8d2354c68dfe689b9143b1247dada1
Author: Father Chrysostomos <[email protected]>
Date: Tue Apr 24 13:48:19 2012 -0700
Remove todo for UTF8 source filters
Source filters donât really make sense on character streams. They are
designed for streams of bytes coming straight from a file. Things
stop making sense if you have âuse utf8â in a UTF-8 scalar (does that
mean double-decode?).
Itâs for this reason that evalbytes respects source filters, while
eval does not. (It doesnât outside the unicode_eval feature, because
it was never really thought about and the implementation didnât take
it into account, resulting in strange behaviour. It doesnât with the
unicode_eval feature, because it was intentionally prohibited.)
M Porting/todo.pod
commit 109ec8ca755245ba4cf70c52cc5ee56e339b7eb0
Author: Father Chrysostomos <[email protected]>
Date: Tue Apr 24 13:31:45 2012 -0700
[perl #112184] Handle $^N in Perl_magic_set
$^N is a magical variable, like $1 and $2, with the usual âsvâ
magic. So it is handled by Perl_magic_get and Perl_magic_set. But
Perl_magic_set didnât have a case for it, so it simply ignored it and
did nothing, like a tied variable with an empty STORE method.
Now assigning to $^N has the same affect as assigned to the numbered
variable to which it corresponds. If there is no corresponding cap-
ture from the last match, or in the absence of regexp plugins, it
croaks with âModification of a read-only valueâ.
M mg.c
M t/re/pat.t
commit 1aa4c0bf2c4be052b80eb93b65b81b1f95bcfa93
Author: Father Chrysostomos <[email protected]>
Date: Mon Apr 23 23:03:17 2012 -0700
perldata: Consistent spaces after dots
M pod/perldata.pod
commit 6e77f388099dc379554d774f72907aef57963b4b
Author: Father Chrysostomos <[email protected]>
Date: Mon Apr 23 20:29:13 2012 -0700
Copy call checker when cloning closure prototype
Otherwise cv_set_call_checker has no effect inside an attribute han-
dler for a closure.
M embed.fnc
M embed.h
M ext/XS-APItest/t/call_checker.t
M mg.c
M mg_raw.h
M mg_vtable.h
M op.c
M pad.c
M pod/perlguts.pod
M proto.h
M regen/mg_vtable.pl
commit 6178382ed5215d2e0c0180d8666d1fd99bf4d856
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 22 22:32:09 2012 -0700
[perl #111000] Let hv_store work on hint hashes
Magic attached to hash elements has its key stored differently depend-
ing on how it was supplied to hv_common. hv_store passes a string/
length pair to hv_common, while hv_store_ent passes an SV.
magic_clearhint wasnât able to handle string/length pairs, and only
worked with SVs, resulting in assertion failures or crashes.
This commit fixes magic_clearhint, so that XS code can use hv_store on
hint hashes.
M ext/XS-APItest/t/hash.t
M mg.c
commit c4c2fdeec15c97a34810d02db09d726bfe40b766
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 22 22:27:50 2012 -0700
mg.c:magic_clearhint: remove redundant PERL_UNUSED_ARG
M mg.c
commit 4803c6df3a706ec53491ac7bdcd6094734582883
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 22 22:06:57 2012 -0700
XS-APItest/t/hash.t: comment typo
M t/op/hash.t
commit 2ecbc78192056c61297991a37cf3aa52363e131c
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 22 22:05:24 2012 -0700
Increase $XS::APItest::VERSION to 0.39
M ext/XS-APItest/APItest.pm
commit bd8b52b3fcf2d6592489c9a286b79fb6e7f16a90
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 22 20:35:43 2012 -0700
pp_ctl.c:pp_goto: Donât repeat yourself
No need to say DIE three times.
M pp_ctl.c
commit 43888cebd08ac944ae61c8141cc02813867b0a98
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 22 20:34:24 2012 -0700
Produce the right error for goto "\0"
Since we have supported for embedded nulls in strings, we shouldnât
be using if(*label) to see whether label has a non-zero length.
Itâs probably not possible to get a null into a label, but we should
still say âcanât findâ rather than âmust haveâ in that case.
M op.c
M pp_ctl.c
M t/op/goto.t
commit 4a82347d935961c94a77b5c36f002e2d992d3141
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 22 20:19:15 2012 -0700
[perl #111794] Make goto "" like goto ${\""}
The logic was written in such a way that goto "" just happened to slip
past all the checks and cause pp_goto to return NULL for the next op,
which means the end of the program.
goto ${\""} dies with âgoto must have labelâ, so goto ""
should as well.
This also adds other tests for that error, which was apparently
untested till now.
M pp_ctl.c
M t/op/goto.t
commit efaeae90ab7f270a6d8deba1afc2f4bb1d18e428
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 22 20:00:14 2012 -0700
Teach B::Concise about UTF8 labels
M ext/B/B/Concise.pm
commit c5bcfa129897cebcb4007bcb2e4eac5b8c2241d1
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 22 19:58:26 2012 -0700
Increase $B::Concise::VERSION to 0.90
M ext/B/B/Concise.pm
commit dd9d722fe4a2d28407562e5281b6d5f7f61e5582
Author: Father Chrysostomos <[email protected]>
Date: Sun Apr 22 15:47:38 2012 -0700
Corrections to AUTHORS should go to perlbug
M AUTHORS
commit 9c462dbc6f61986a0b7b8d5a3b202a932989d4c4
Author: Father Chrysostomos <[email protected]>
Date: Sat Apr 21 23:28:51 2012 -0700
regen/opcodes: Rmv evalonce comment
This goes all the way back to when perl 5.0 was being polished up.
The idea behind evalonce is that eval "constant string" should be
optimisable by being compiled ahead of time, just like eval { ... }.
But this could never work properly, because BEGIN blocks would only
fire once. Also, eval '$x .. $y' is an easy way to create two separ-
ate flip-flops. There are undoubtedly many other reasons why this
could never work.
So there is no reason to keep this comment any longer, as it is not
(or should not be) a to-do item.
M regen/opcodes
commit aafb3ecf65204b1085bf8ea5bb2e27184d2a6f22
Author: Father Chrysostomos <[email protected]>
Date: Sat Apr 21 23:25:33 2012 -0700
pp_hot.c:pp_entersub: Rmv comment about setting PL_compcv
PL_compcv is meant to point to the currently compiling sub, even dur-
ing an evalâs run time. (See commit 676a678.) Therefore, this com-
mentâs suggestion is incorrect.
M pp_hot.c
commit ffa7c49c49bb655497e7e671bf3ef88bbb1f829a
Author: Father Chrysostomos <[email protected]>
Date: Thu Apr 19 22:30:00 2012 -0700
podcheck.t: Allow usually-skipped files on cmd line
M t/porting/podcheck.t
commit 0b0763f2434e0313108362779ef2c74bd4a1b962
Author: Alan Haggai Alavi <[email protected]>
Date: Tue Feb 28 21:18:58 2012 +0530
Removed a redundant 'once'
M pod/perlhist.pod
-----------------------------------------------------------------------
--
Perl5 Master Repository