Add the original source packages to maemo, source lenny
[dh-make-perl] / dev / i386 / libtest-harness-perl / libtest-harness-perl-3.12 / t / lib / TAP / Parser / SubclassTest.pm
1 # subclass for testing subclassing
2
3 package TAP::Parser::SubclassTest;
4
5 use strict;
6 use vars qw(@ISA);
7
8 use TAP::Parser;
9
10 use MyCustom;
11 use MySource;
12 use MyPerlSource;
13 use MyGrammar;
14 use MyIteratorFactory;
15 use MyResultFactory;
16
17 @ISA = qw( TAP::Parser MyCustom );
18
19 sub _default_source_class           {'MySource'}
20 sub _default_perl_source_class      {'MyPerlSource'}
21 sub _default_grammar_class          {'MyGrammar'}
22 sub _default_iterator_factory_class {'MyIteratorFactory'}
23 sub _default_result_factory_class   {'MyResultFactory'}
24
25 sub make_source      { shift->SUPER::make_source(@_)->custom }
26 sub make_perl_source { shift->SUPER::make_perl_source(@_)->custom }
27 sub make_grammar     { shift->SUPER::make_grammar(@_)->custom }
28 sub make_iterator    { shift->SUPER::make_iterator(@_)->custom }
29 sub make_result      { shift->SUPER::make_result(@_)->custom }
30
31 sub _initialize {
32     my $self = shift;
33     $self->SUPER::_initialize(@_);
34     $main::INIT{ ref($self) }++;
35     $self->{initialized} = 1;
36     return $self;
37 }
38
39 1;