* WARNING: breaks RV encapsulation.
*/
- sv_upgrade(rv, SVt_RV);
+ SvUPGRADE(rv, SVt_RV);
SvRV_set(rv, sv); /* $rv = \$sv */
SvROK_on(rv);
use Storable qw(freeze thaw);
-print "1..16\n";
+print "1..19\n";
package OVERLOADED;
ok 14, ref ($t) eq 'REF';
ok 15, ref ($$t) eq 'HAS_OVERLOAD';
ok 16, $$$t eq 'snow';
+
+
+#---
+# blessed reference to overloded object.
+{
+ my $a = bless [88], 'OVERLOADED';
+ my $c = thaw freeze bless \$a, 'main';
+ ok 17, ref $c eq 'main';
+ ok 18, ref $$c eq 'OVERLOADED';
+ ok 19, "$$c" eq "88";
+
+}
+
1;