package Null; use strict; use Carp; our $AUTOLOAD; sub AUTOLOAD { carp __PACKAGE__ . " $AUTOLOAD CALLED" } package Foo; use strict; use Carp; sub new { bless [], __PACKAGE__ } sub DESTROY { my $self = shift; carp (__PACKAGE__ . " DESTROY CALLED"); bless $self, 'Null'; } package main; my $s1 = Foo->new; my $s2 = $s1; $s1->DESTROY; $s2->DoSomething();