Bloodnok has asked for the wisdom of the Perl Monks concerning the following question:
Yep, tis that time of week again when I get my candidacy for the 'stupidest question of the decade' award.
My question/quandary is, simply put, this...
Is the most scaleable, implementation agnostic (thanx bart), future proof way of determining whether, or not, a variable represents an object, the following...
?eval { $ref->isa() }; if ($@) { # Isnt an object } else { # Is an object }
There, that's it, what could be simpler (apart from me;-)
TIA & rgds to all
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: To be, or not to be, an object ?
by moritz (Cardinal) on Jul 24, 2008 at 11:34 UTC | |
by Bloodnok (Vicar) on Jul 25, 2008 at 13:32 UTC | |
by moritz (Cardinal) on Jul 27, 2008 at 20:18 UTC | |
by Bloodnok (Vicar) on Jul 27, 2008 at 23:14 UTC | |
|
Re: To be, or not to be, an object ?
by Corion (Patriarch) on Jul 24, 2008 at 11:33 UTC | |
|
Re: To be, or not to be, an object ?
by Bloodnok (Vicar) on Jul 24, 2008 at 11:54 UTC | |
by betterworld (Curate) on Jul 24, 2008 at 14:30 UTC | |
by Bloodnok (Vicar) on Jul 24, 2008 at 14:33 UTC | |
|
Re: To be, or not to be, an object ?
by kyle (Abbot) on Jul 24, 2008 at 15:42 UTC |