No it's not. That's not a class method--that's a fully-qualified subroutine 'whiz' in the class 'Foo::BarMod'. Very much not a class method. You're saying, "call the function 'whiz' in the package 'Foo::BarMod'". But such a function doesn't exist, so Perl doesn't like that.> Undefined subroutine Foo::BarMod::whiz at line 17. > ... > Well, it's a class method, so the first one doesn't really > apply.
If you want inheritance, call it as a class method, which is calling it like this:
(Or indirect object syntax, but that's generally not used much.)Foo::BarMod->whiz
In other words: you came to the right conclusion, but you may have spared yourself quite a bit of confusion and frustration if you had your terms right. Inheritance--ie., checking in @ISA--only occurs for class methods (and object methods). Not for fully-qualified subroutines.
In reply to Re: @ISA, Inheritance, and Class Methods
by btrott
in thread @ISA, Inheritance, and Class Methods
by clwolfe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |