in reply to Re: accessing superclass data
in thread accessing superclass data
the problem, originally, really was in an unnecessarily overridden subclass constructor. rather than calling Super::new(), the subclasses were instantiating enpty hashrefs. there *was* nothing to return via the superclass accessor that way.
next time, i'll have to take more care i nthe 'boiled down' code ... what it *should have read* is:
and there's a real issue, because there *is* no CGI object in the subclass now.package HandlerMethods; use strict; use base qw/ Handler /; sub new { my $self = shift; return bless {}, $self; } sub doSomething { my $self = shift; my $page = $self->cgi->param('foo'); return 1; }
|
|---|