On Sun, Aug 31, 2014 at 04:13:03PM -0400, Lincoln A Baxter wrote: > Sys::SigAction has one instance of a call to UNIVERSAL::isa (line 135 of > SigAction.pm) in a function context: > > die '$action is not a POSIX::SigAction' if not UNIVERSAL::isa( $action > ,'POSIX::SigAction' ); > > This call is in set_sigaction() which is in a private function and it is > essentially just defensive programming. I don't think I have had a > problem with this since is was first released. The reason > UNIVERSAL::isa is called as a function here is that that within the > scope of this function how might one know if the scaler $action is > blessed reference, just a reference, or something else. UNIVERSAL::isa() > answers all of these questions in one statement. > > If UNIVERSAL::isa() is now deemed "incorrect" in a context like this, > I'm curious, given the requirements this line of code meets, what those > on this list think this line of code should be converted to.
... if not (blessed($action) and $action->isa('POSIX::SigAction')) ...which is a little longer, so exactly why Safe::Isa was written :) (note: I'm not the author, just the most recent releaser)