* demerphq <[EMAIL PROTECTED]> [2006-04-07T08:32:35] > Actually afaik there is no good way to find out what dereferencing > operators an object supports. The best that I know of is reftype(), > but that only tells you the objects underlying intrinsic type, it > doesnt tell you if you can dereference the type other ways.
I actually just ranted about this recently in my journal: http://use.perl.org/~rjbs/journal/29229 This code should be relatively demonstrative: sub _CALLABLE { (Scalar::Util::reftype($_[0])||'') eq 'CODE' or Scalar::Util::blessed($_[0]) and overload::Method($_[0],'&{}') ? $_[0] : undef; } -- rjbs
signature.asc
Description: Digital signature