diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-11-26 18:17:45 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-11-26 19:43:32 -0800 |
commit | dc456155af24d5c772439d33c322bd72cb0fcdfe (patch) | |
tree | 9e5df9c1ec384c281da2522619d6d4cdcbf1bff9 /t | |
parent | 98be996420b2ebfac029a00d114efce509421622 (diff) | |
download | perl-dc456155af24d5c772439d33c322bd72cb0fcdfe.tar.gz |
[perl #97980] Stop tied() from returning a copy
Now tied() returns the actual scalar used to hold the tie object,
so one can write weaken(tied $foo).
Diffstat (limited to 't')
-rw-r--r-- | t/op/tie.t | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/op/tie.t b/t/op/tie.t index b6567fc282..887fa96926 100644 --- a/t/op/tie.t +++ b/t/op/tie.t @@ -1180,3 +1180,11 @@ fetching before at - line 8. fetching after at - line 10. +######## + +# tied returns same value as tie +sub TIESCALAR{bless[]} +$tyre = \tie $tied, ""; +print "ok\n" if \tied $tied == $tyre; +EXPECT +ok |