diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-10-13 00:11:45 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-10-13 00:30:55 -0700 |
commit | f52e41ad9f6ea1eecc514a6c1d9e2ba332cef2be (patch) | |
tree | 0deb62efa0eb51c4ce05e22c9e13dda76a526380 /t/op/tie_fetch_count.t | |
parent | f3dab52a514ffb23bcde784e897bc8ff4c2018f2 (diff) | |
download | perl-f52e41ad9f6ea1eecc514a6c1d9e2ba332cef2be.tar.gz |
Call get-magic once for .. in list context
In addition to using _nomg calls in pp_flop, I had to modify
looks_like_number, which was clearly buggy: it was ignoring get-magic
completely, *except* in the case of SvPOKp. But checking SvPOKp
before calling magic does not make sense, as it may change during the
magic call.
Diffstat (limited to 't/op/tie_fetch_count.t')
-rw-r--r-- | t/op/tie_fetch_count.t | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/t/op/tie_fetch_count.t b/t/op/tie_fetch_count.t index ed070e0a2c..85d88d63b9 100644 --- a/t/op/tie_fetch_count.t +++ b/t/op/tie_fetch_count.t @@ -7,7 +7,7 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; require './test.pl'; - plan (tests => 283); + plan (tests => 287); } use strict; @@ -62,6 +62,11 @@ $dummy = $var >> 1 ; check_count '>>'; $dummy = $var x 1 ; check_count 'x'; @dummy = ($var) x 1 ; check_count 'x'; $dummy = $var . 1 ; check_count '.'; +@dummy = $var .. 1 ; check_count '$tied..1'; +@dummy = 1 .. $var; check_count '1..$tied'; +tie my $v42 => 'main', "z"; +@dummy = $v42 .. "a"; check_count '$tied.."a"'; +@dummy = "a" .. $v42; check_count '"a"..$tied'; # Pre/post in/decrement $var ++ ; check_count 'post ++'; |