It's one thing to gloss over details. It's quite another to say that base doesn't create an inheritance relationship ("it looks like you are trying to base an object and hope that it inherits its methods, and that is not right.") and that its purpose is to make the following work ("Use base is intended to include code from another another package into your current one.")
>type WWW.pm package WWW; sub www_func { print("woot!\n"); } 1; >type Admin.pm package Admin; use base 'WWW'; www_func(); 1; >perl -e"use Admin" Undefined subroutine &Admin::www_func called at Admin.pm line 3. Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1.
And the OP's problem didn't even have anything to do with inheritance.
In reply to Re^4: Confused by use base, I think.
by ikegami
in thread Confused by use base, I think.
by hesco
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |