in reply to Arrgh, can() appears to work for non-object !!
Scalar::Util::blessed can be your friend:
sub can_it { blessed($_[0]) && $_[0]->can('can') }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Arrgh, can() appears to work for non-object !!
by Bloodnok (Vicar) on Jan 07, 2009 at 11:29 UTC | |
by ysth (Canon) on Jan 07, 2009 at 11:32 UTC | |
by Bloodnok (Vicar) on Jan 07, 2009 at 11:39 UTC | |
by JavaFan (Canon) on Jan 07, 2009 at 12:44 UTC | |
by shmem (Chancellor) on Jan 07, 2009 at 12:39 UTC |