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