summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-12-27 00:10:05 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-12-27 00:43:06 -0800
commitce65bc731d80b5e2fa455f1e1f4feb618c82d259 (patch)
tree86d217a00a7189c0471eb1364978e2eddd3300cc /t
parentf8c105437c52640c37fa90070a272985d8ecc321 (diff)
downloadperl-ce65bc731d80b5e2fa455f1e1f4feb618c82d259.tar.gz
Turn on AvREAL for tied arrays
It turns out that it is possible to trigger the av_reify warning: ./perl -Ilib -lwe ' sub TIEARRAY{bless[]} sub { tie @_, ""; \@_; }->(1); ' av_reify called on tied array at -e line 7.
Diffstat (limited to 't')
-rw-r--r--t/op/tie.t10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/op/tie.t b/t/op/tie.t
index bbd789c8d3..db155f3fda 100644
--- a/t/op/tie.t
+++ b/t/op/tie.t
@@ -1209,3 +1209,13 @@ $tyre = \tie $tied, "";
print "ok\n" if \tied $tied == $tyre;
EXPECT
ok
+########
+
+# tied arrays should always be AvREAL
+$^W=1;
+sub TIEARRAY{bless[]}
+sub {
+ tie @_, "";
+ \@_; # used to produce: av_reify called on tied array at - line 7.
+}->(1);
+EXPECT