gildir has asked for the wisdom of the Perl Monks concerning the following question:
I tried a test, and UNIVERSAL::can is aware of inheritance. And I'm little bit confused now. UNIVERSAL::can('Test', 'foo') looks like a bad practice when compared to Test->can('foo'). Is it just a hack in UNIVERSAL::can that make it work in the 'bad' way or is it a planned feature? Is UNIVERSAL::can('Test', 'foo') used for performance reasons (to avoid traversing ISA hierarchy twice)?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Calling can method
by jeroenes (Priest) on May 30, 2001 at 13:03 UTC | |
by gildir (Pilgrim) on May 30, 2001 at 13:52 UTC | |
by merlyn (Sage) on May 30, 2001 at 17:01 UTC | |
by gildir (Pilgrim) on May 30, 2001 at 17:48 UTC | |
by merlyn (Sage) on May 30, 2001 at 17:58 UTC | |
| |
by chipmunk (Parson) on May 30, 2001 at 21:19 UTC | |
|