package A::Class; sub some_method { my ($self, $object) = @_; die "Object is not what I expect" unless UNIVERSAL::isa( $object, 'Some::Class' ); $object->some_other_method(); $object->some_method_or_other(); }