If you look at the source code for base or parent or read perltoot, you will find that inheritance in Perl does not work by copying subroutines. While it is conceptually not very far from copying the subroutines, actually Perl goes searching for methods of that name in the packages listed in @ISA until it finds one. No importing of subroutines is done.
In reply to Re^3: Subclassing, done right?
by Corion
in thread Subclassing, done right?
by isync
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |