Commit | Line | Data |
---|---|---|
6d313664 CBW |
1 | # subclass for testing customizing & subclassing |
2 | ||
3 | package MyPerlSourceHandler; | |
4 | ||
5 | use strict; | |
befb5359 | 6 | use warnings; |
6d313664 | 7 | |
6d313664 | 8 | use TAP::Parser::IteratorFactory; |
6d313664 | 9 | |
befb5359 | 10 | use parent qw( TAP::Parser::SourceHandler::Perl MyCustom ); |
6d313664 CBW |
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 |