in reply to Invoke a method on an object
I seem to recall trying the can() approach recommended by both Corion & moritz, but the attempt failed and have not tried it since. In retrospect, I only now (it _was_ a number of years ago) realise that my attempt didn't include the class/object ref. as the first arg - Doh !!!
Or, put another way, it's nice to have one, or more, of our learned friends/colleagues/monks to occasionally point out the obvious :D
I'll bet it doesn't apply here, but one thing to beware of, as was pointed out for me elsewhere, is that using either isa or can as the method name will undoubtedly cause problems (see Arrgh, can() appears to work for non-object !! for details).
|
|---|