# we gratuitously break modules like Scalar::Defer, which would be
# un-perlish.
return unless blessed($obj);
+ return $obj->isa(@_) if lc($method) eq 'does' and not $obj->can($method);
return $obj->$method(@_);
};
sub { my $obj = shift; $obj->$_call_if_object($method => @_) }
} qw(isa can does DOES);
+1;
+__END__
+
+=pod
+
=head1 NAME
Safe::Isa - Call isa, can, does and DOES safely on things that may not be objects