| 1 |
By default when you write an AUTOLOAD, the functions that are available |
| 2 |
from it are not visible to UNIVERSAL::can. Worse yet, if you try to use |
| 3 |
AUTOLOAD in a subclass, you hide the AUTOLOAD in a superclass (or in |
| 4 |
classes farther down the tree in multiple inheritance) so AUTOLOAD and |
| 5 |
inheritance do not play well together. See |
| 6 |
http://www.perlmonks.org/?node_id=342804 for a full explanation of the |
| 7 |
problems. |
| 8 |
|
| 9 |
This module attempts to solve that. Import this module somewhere in the |
| 10 |
class hierarchy that you wish to have your AUTOLOAD, and write a CAN |
| 11 |
which takes arguments and returns a function that will do that. This |
| 12 |
module will then provide an AUTOLOAD and UNIVERSAL::can that cooperate |
| 13 |
and work properly. |