##
package FunClass;
sub new {
my $class = shift;
my $self = {};
bless($self, $class);
}
sub DESTROY {
my $self = shift;
print "Destroying $self!\n";
}
sub new {
my $proto = shift;
my $class = ref ($proto) || $proto;
my $this = FunClass->new();
tie %{$this}, $class;
return $this;
}
####
Destroying FunClass=HASH(0x80f173c)!
Calling DESTROY by SillyClass=HASH(0x80f600c)