Perl: the Markov chain saw | |
PerlMonks |
Re: How to use Inheritance with Inside-Out Classes and Hash Based Classesby ikegami (Patriarch) |
on Nov 15, 2005 at 17:13 UTC ( [id://508697]=note: print w/replies, xml ) | Need Help?? |
The short answer is that you can't. You need to dispatch the methods to the "base class" yourself instead of letting perl do it through @ISA, because you need to use ident on the invoker first. In other words, you need to wrap the "base class" instead of inheriting from it. It can be done by removing the use base and adding one of the following functions:
or
You might want to override can method to check File::Samba in addition to your class. The following should do the trick, but it's untested:
The above function have been tested (IIRC), but to a limited extent. There may be a better method. Update: Various bits added for roundness.
In Section
Seekers of Perl Wisdom
|
|