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