This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Rename ext/Test/Harness to ext/Test-Harness
[perl5.git] / ext / Test-Harness / t / lib / EmptyParser.pm
diff --git a/ext/Test-Harness/t/lib/EmptyParser.pm b/ext/Test-Harness/t/lib/EmptyParser.pm
new file mode 100644 (file)
index 0000000..2f7ec24
--- /dev/null
@@ -0,0 +1,30 @@
+package EmptyParser;
+
+use strict;
+use vars qw(@ISA);
+
+use TAP::Parser ();
+
+@ISA = qw(TAP::Parser);
+
+sub _initialize {
+    shift->_set_defaults;
+}
+
+# this should really be in TAP::Parser itself...
+sub _set_defaults {
+    my $self = shift;
+
+    for my $key (
+        qw( source_class perl_source_class grammar_class
+        iterator_factory_class result_factory_class )
+      )
+    {
+        my $default_method = "_default_$key";
+        $self->$key( $self->$default_method() );
+    }
+
+    return $self;
+}
+
+1;