SPUG: Does a class module support a method?
andy at n2h2.com
Wed Jan 26 16:17:58 CST 2000
On Jan 26, 2000 @ 2:49pm, Sanford Morton wrote:
> I have a module which creates an internal or private object from a
> class module. In my module, I can use can() to determine if the object
> supports certain methods.
> What can I do in the script which uses my module, but which does not
> routinely have access to the internal object, to determine if that
> private object supports certain methods? Presumably, I cannot use
> can() in the script without creating a useless instance from the class
How about an instance method defined in your class that calls the can()
method on the private object hidden within your class. Your class's can()
would override UNIVERSAL::can() then. I know Damian would probably frown
at me and express serious doubts about my upbringing. Come on everybody,
let's do the can(can())!
> I hope to make the E-spug meeting tonight.
See you there.
Andrew Sweger <andy at n2h2.com> | N2H2, Incorporated
v=206.336.2947 f=206.336.1541 | 900 Fourth Avenue, Suite 3400
Advanced Technologies | Seattle WA 98164-1059
Development | http://www.n2h2.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
Email to majordomo at pm.org: ACTION spug-list your_address
More information about the spug-list