in reply to Re^3: How to tell if a variable is blessed ?
in thread How to tell if a variable is blessed ?
Because if you're merely interested in finding out if the reference is to an instance of some class (as opposed to a hashref, arrayref, ...), what do you put on the other side of the eq? Not to mention the problems with that if you want to gracefully handle subclasses (in which case you really want UNIVERSAL::isa()).
And ++ to xdg; I'd forgotten all about Scalar::Util::blessed. Much better answer than mine.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How to tell if a variable is blessed ?
by xdg (Monsignor) on Mar 02, 2006 at 15:34 UTC |