in reply to Question about creating intelligent behaviors in modules WRT external objects/modules

Using isa:

if (UNIVERSAL::isa($ref, 'Foo::Bar')) { #... } elsif (UNIVERSAL::isa($ref, 'Baz::Quux')) { #... }

DWIM is Perl's answer to Gödel
  • Comment on Re: Question about creating intelligent behaviors in modules WRT external objects/modules
  • Download Code