>>>>> "Michael" == Michael A Chase <[EMAIL PROTECTED]> writes:
Michael> He's trying to subclass HTML::Parser, so creating an HTML::Parser object is
Michael> not what he's wants to do, just add HTML::Parser capabilities to his own
Michael> class. The init() method in HTML::Parser was added for that purpose.
But still, this subroutine should work for that:
package MyClass;
sub new {
my $class = shift;
my $self = $class->SUPER::new(@_);
$self->my_init();
$self;
}
If $self is not blessed into MyClass at this point, HTML::Parser is
*broken*. And MyClass->my_init should be found as well.
And please stop using that broken "$proto = " template. That
mechanism adds unnecessary overhead and complexity to the 98% of uses
that don't need it. Put the instance-cloning protocol into ->clone or
->copy, not ->new.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!