Help for this page
*isa=*UNIVERSAL::isa; ... elsif (isa($foo,'Type2')) { return $foo->method2 } else { return $foo->method3 } }
sub Type1::generic_method { $_[0]->method1 } sub Type2::generic_method { $_[0]->method2 } ... ... return $foo->generic_method }