In perl.git, the branch smartmatch has been updated <http://perl5.git.perl.org/perl.git/commitdiff/203d1e89388de309200a88815a95943bd5b59d86?hp=6ac83b6344167664acd39ef656560e3f3bbc361c>
- Log ----------------------------------------------------------------- commit 203d1e89388de309200a88815a95943bd5b59d86 Author: Rafael Garcia-Suarez <[email protected]> Date: Tue Mar 17 15:11:05 2009 +0100 Test that in "~~ sub", the sub is not called on empty hashes and arrays ----------------------------------------------------------------------- Summary of changes: t/op/smartmatch.t | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/t/op/smartmatch.t b/t/op/smartmatch.t index 7736269..c480e0e 100644 --- a/t/op/smartmatch.t +++ b/t/op/smartmatch.t @@ -220,8 +220,12 @@ __DATA__ @ undef \&fatal @ 1 \&fatal @ [1] \&fatal +@ {a=>1} \&fatal @ "foo" \&fatal @ qr// \&fatal +# sub is not called on empty hashes / arrays + [] \&fatal + +{} \&fatal # - null-prototyped subs ! undef \&FALSE -- Perl5 Master Repository
