I'm troubleshooting some old code and I'm getting mixed up about method inheritance. My example is summarized below, which represent two packages in different .pm files.
Package two inherits from package one. But when the "run" method is called, which in turn calls "_dosomething", the AUTOLOAD sub runs instead of "_dosomething". Does the call to "_dosomething" need to be prefixed by an explicit package name or self object?
(Of course the problem could be something else, but I want to make sure my understanding of inheritance is correct.)
package one; sub _dosomething {...}; sub AUTOLOAD {...}; package two; use one; @ISA = qw(one); sub run { _dosomething ... }
In reply to Method inheritance by alafarm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |