in reply to accessing superclass data

Is the data really in the superclass? Nope. At least not in your boiled down example. Since your HandlerMethods is inheriting its new method, the anon array containing _cgi is blessed into HandlerMethods. It should be enough for "sub cgi" to just return $self->{_cgi}. Try this little driver on your example:

#!/usr/bin/perl use Handler; use Data::Dumper; $x = HandlerMethods->new(); print Dumper( $x );

-derby

Replies are listed 'Best First'.
Re: Re: accessing superclass data
by geektron (Curate) on Jul 30, 2003 at 19:53 UTC
    too much boiling down. yes, the data is in the superclass.

    the subclass isn't inheriting the  new() method in the actual code. and, that seems to be the best fix.

      Did you override new() in the derived class and forget to call SUPER::new?

        yep. that's what i did.

        i just removed the overridden  new() since it was just a basic stub anyway ....