diff options
author | 2013-03-25 20:06:16 +0000 | |
---|---|---|
committer | 2013-03-25 20:06:16 +0000 | |
commit | 898184e3e61f9129feb5978fad5a8c6865f00b92 (patch) | |
tree | 56f32aefc1eed60b534611007c7856f82697a205 /gnu/usr.bin/perl/cpan/Test-Harness/t/lib/MyPerlSourceHandler.pm | |
parent | PGSHIFT -> PAGE_SHIFT (diff) | |
download | wireguard-openbsd-898184e3e61f9129feb5978fad5a8c6865f00b92.tar.xz wireguard-openbsd-898184e3e61f9129feb5978fad5a8c6865f00b92.zip |
import perl 5.16.3 from CPAN - worked on by Andrew Fresh and myself
Diffstat (limited to 'gnu/usr.bin/perl/cpan/Test-Harness/t/lib/MyPerlSourceHandler.pm')
-rw-r--r-- | gnu/usr.bin/perl/cpan/Test-Harness/t/lib/MyPerlSourceHandler.pm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gnu/usr.bin/perl/cpan/Test-Harness/t/lib/MyPerlSourceHandler.pm b/gnu/usr.bin/perl/cpan/Test-Harness/t/lib/MyPerlSourceHandler.pm new file mode 100644 index 00000000000..e5a34bedb64 --- /dev/null +++ b/gnu/usr.bin/perl/cpan/Test-Harness/t/lib/MyPerlSourceHandler.pm @@ -0,0 +1,24 @@ +# subclass for testing customizing & subclassing + +package MyPerlSourceHandler; + +use strict; +use vars '@ISA'; + +use MyCustom; +use TAP::Parser::IteratorFactory; +use TAP::Parser::SourceHandler::Perl; + +@ISA = qw( TAP::Parser::SourceHandler::Perl MyCustom ); + +TAP::Parser::IteratorFactory->register_handler(__PACKAGE__); + +sub can_handle { + my $class = shift; + my $vote = $class->SUPER::can_handle(@_); + $vote += 0.1 if $vote > 0; # steal the Perl handler's vote + return $vote; +} + +1; + |