summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/cpan/Test-Harness/t/lib/MyPerlSourceHandler.pm
diff options
context:
space:
mode:
authorsthen <sthen@openbsd.org>2013-03-25 20:06:16 +0000
committersthen <sthen@openbsd.org>2013-03-25 20:06:16 +0000
commit898184e3e61f9129feb5978fad5a8c6865f00b92 (patch)
tree56f32aefc1eed60b534611007c7856f82697a205 /gnu/usr.bin/perl/cpan/Test-Harness/t/lib/MyPerlSourceHandler.pm
parentPGSHIFT -> PAGE_SHIFT (diff)
downloadwireguard-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.pm24
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;
+