+*aieee = 4;
+pass('Can assign integers to typeglobs');
+*aieee = 3.14;
+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{} };
+ eval { $a = undef }; # workaround for untie($handle) bug
+ untie $a;
+ eval { $a = "bar" };
+ ::is $a, "bar",
+ "[perl #77812] Globs in tied scalars can be reified if STORE dies"
+}
+
+# These two crashed prior to 5.13.6. In 5.13.6 they were fatal errors. They
+# were fixed in 5.13.7.
+ok eval {
+ my $glob = \*heen::ISA;
+ delete $::{"heen::"};
+ *$glob = *bar;
+}, "glob-to-*ISA assignment works when *ISA has lost its stash";
+ok eval {
+ my $glob = \*slare::ISA;
+ delete $::{"slare::"};
+ *$glob = [];
+}, "array-to-*ISA assignment works when *ISA has lost its stash";
+# These two crashed in 5.13.6. They were likewise fixed in 5.13.7.
+ok eval {
+ sub greck;
+ my $glob = do { no warnings "once"; \*phing::foo};
+ delete $::{"phing::"};
+ *$glob = *greck;
+}, "Assigning a glob-with-sub to a glob that has lost its stash warks";
+ok eval {
+ sub pon::foo;
+ my $glob = \*pon::foo;
+ delete $::{"pon::"};
+ *$glob = *foo;
+}, "Assigning a glob to a glob-with-sub that has lost its stash warks";
+
+{
+ package Tie::Alias;
+ sub TIESCALAR{ bless \\pop }
+ sub FETCH { $${$_[0]} }
+ sub STORE { $${$_[0]} = $_[1] }
+ package main;
+ tie my $alias, 'Tie::Alias', my $var;
+ no warnings 'once';
+ $var = *galobbe;
+ {
+ local *$alias = [];
+ $var = 3;
+ is $alias, 3, "[perl #77926] Glob reification during localisation";
+ }
+}
+