Your code in sub sub2 ... is calling _sub1() without arguments. It should probably look more like:
my $self = shift; return $self->_sub1();
I'll also point out that prototypes are meaningless when used with OO methods: see perlsub - Prototypes. I'd suggest changing all instances of:
sub XXX() { ... }
to
sub XXX { ... }
-- Ken
In reply to Re: OOP method usage
by kcott
in thread OOP method usage
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |