sub Another::Module::particularMethod { my $o = shift; ... eval{ $o->method( ... ); } if( $@ =~ q[^Can't locate object method "method"] ) { do{ oneThing() }; } else { do{ anotherThing() }; } ... }