require Module; Module -> import (args...) if Module -> can ("import"); #### sub AUTOLOAD { ... for my $class (@ISA) { if ($class -> can ("AUTOLOAD")) { no strict 'refs'; my $auto = $class . "::AUTOLOAD"; $$auto = $AUTOLOAD; $self -> $auto (@_); last; } } } #### # For single inheritance. sub new { if (@ISA && $ISA [0] -> can ("new")) { return shift -> SUPER::new (@_) } else { return bless \(my $foo) => shift; } }