1# subclass for testing subclassing 2 3package TAP::Parser::SubclassTest; 4 5use strict; 6use vars qw(@ISA); 7 8use TAP::Parser; 9 10use MyCustom; 11use MySourceHandler; 12use MyPerlSourceHandler; 13use MyGrammar; 14use MyResultFactory; 15 16@ISA = qw( TAP::Parser MyCustom ); 17 18sub _default_source_class {'MySourceHandler'} # deprecated 19sub _default_perl_source_class {'MyPerlSourceHandler'} # deprecated 20sub _default_grammar_class {'MyGrammar'} 21sub _default_result_factory_class {'MyResultFactory'} 22 23sub make_source { shift->SUPER::make_source(@_)->custom } # deprecated 24 25sub make_perl_source { 26 shift->SUPER::make_perl_source(@_)->custom; 27} # deprecated 28sub make_grammar { shift->SUPER::make_grammar(@_)->custom } 29sub make_iterator { shift->SUPER::make_iterator(@_)->custom } # deprecated 30sub make_result { shift->SUPER::make_result(@_)->custom } 31 32sub _initialize { 33 my $self = shift; 34 $self->SUPER::_initialize(@_); 35 $main::INIT{ ref($self) }++; 36 $self->{initialized} = 1; 37 return $self; 38} 39 401; 41