in reply to Inheritance and Internal object methods
If you use a normal (non-OO) subroutine invocation, then you're invoking a subroutine, not a method. It's fine for a package to include subroutines as well as methods, though it makes the code harder to subclass and extend.
Since you seem to want access to $self from within the private method, you probably want to do something like
and invoke it from your public method viasub _bar { my $self = shift; ... }
Note that I've written _bar instead of bar. That's a convention that some use to designate that a method is private.$self->_bar("do something");
|
|---|