in reply to Detecting Overridden Methods
If you know the set of methods you'll need to query, you could check before any of your methods are installed.
Update: But in direct answer to your question, this (surprisingly) seems to work:package MyPackage; use base "Whatever"; our $can_foo; BEGIN { $can_foo = 1 if MyPackage->can("foo"); } sub foo { 'Whee!' } sub check { return $can_foo; }
MyPackage->can("SUPER::foo")
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Detecting Overridden Methods
by ikegami (Patriarch) on Feb 05, 2007 at 19:38 UTC |
In Section
Seekers of Perl Wisdom