From 0936ef8b60a303fb904c7a44b7e4f55e8191503c Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Mon, 25 Oct 2010 14:21:57 -0700 Subject: [PATCH] [perl #77812] Globs in tied scalars can be reified if STORE dies This commit just adds tests. This was fixed by 2acc3314e31a9. --- t/op/gv.t | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/t/op/gv.t b/t/op/gv.t index 8762469..d8450ab 100644 --- a/t/op/gv.t +++ b/t/op/gv.t @@ -12,7 +12,7 @@ BEGIN { use warnings; -plan( tests => 225 ); +plan( tests => 226 ); # type coersion on assignment $foo = 'foo'; @@ -817,6 +817,20 @@ pass('Can assign floats to typeglobs'); *aieee = 'pi'; pass('Can assign strings to typeglobs'); +{ + package thrext; + sub TIESCALAR{bless[]} + sub STORE{ die "No!"} + sub FETCH{ no warnings 'once'; *thrit } + tie my $a, "thrext"; + () = "$a"; # do a fetch; now $a holds a glob + eval { *$a = sub{} }; + untie $a; + eval { $a = "bar" }; + ::is $a, "bar", + "[perl #77812] Globs in tied scalars can be reified if STORE dies" +} + __END__ Perl Rules -- 2.7.4