| 1 | # subclass for testing customizing & subclassing |
| 2 | |
| 3 | package MyPerlSourceHandler; |
| 4 | |
| 5 | use strict; |
| 6 | use vars '@ISA'; |
| 7 | |
| 8 | use MyCustom; |
| 9 | use TAP::Parser::IteratorFactory; |
| 10 | use TAP::Parser::SourceHandler::Perl; |
| 11 | |
| 12 | @ISA = qw( TAP::Parser::SourceHandler::Perl MyCustom ); |
| 13 | |
| 14 | TAP::Parser::IteratorFactory->register_handler(__PACKAGE__); |
| 15 | |
| 16 | sub can_handle { |
| 17 | my $class = shift; |
| 18 | my $vote = $class->SUPER::can_handle(@_); |
| 19 | $vote += 0.1 if $vote > 0; # steal the Perl handler's vote |
| 20 | return $vote; |
| 21 | } |
| 22 | |
| 23 | 1; |
| 24 | |