He's trying to subclass HTML::Parser, so creating an HTML::Parser object is
not what he's wants to do, just add HTML::Parser capabilities to his own
class.  The init() method in HTML::Parser was added for that purpose.
--
Mac :})
----- Original Message -----
From: "Randal L. Schwartz" <[EMAIL PROTECTED]>
To: "Michael A. Chase" <[EMAIL PROTECTED]>
Cc: "KIMURA Takeshi" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, April 17, 2000 3:55 AM
Subject: Re: HTML::Parse overwriting sub parse


> >>>>> "Michael" == Michael A Chase <[EMAIL PROTECTED]> writes:
>
> Michael> By call ing HTML::Parser's new(), you are creating a new object,
not adding
> Michael> the HTML::Parser information.  You also have to bless $self into
something
> Michael> before you can use "$self->" Use this instead:
>
> Michael> sub new {
> Michael>    my $proto = shift;
> Michael>    my $class = ref( $proto ) || $proto;
> Michael>    my $self   = bless {}, $class;
>
> Michael>    $self -> SUPER::init(@_);
> Michael> }
>
> No, that's not it.  $self->SUPER::new(@_) should work fine if $self is
> a classname (string).  Try a different answer.


Reply via email to