in reply to OOP method usage

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

Replies are listed 'Best First'.
Re^2: OOP method usage
by Anonymous Monk on Jul 07, 2012 at 09:37 UTC
    OK, Ill fix the code