Add the original source packages to maemo, source lenny
[dh-make-perl] / dev / i386 / libtest-harness-perl / libtest-harness-perl-3.12 / examples / harness-hook / lib / Harness / Hook.pm
diff --git a/dev/i386/libtest-harness-perl/libtest-harness-perl-3.12/examples/harness-hook/lib/Harness/Hook.pm b/dev/i386/libtest-harness-perl/libtest-harness-perl-3.12/examples/harness-hook/lib/Harness/Hook.pm
new file mode 100644 (file)
index 0000000..1f8f63f
--- /dev/null
@@ -0,0 +1,30 @@
+package Harness::Hook;
+
+use strict;
+use warnings;
+use Carp;
+
+sub new {
+    my ( $class, $harness ) = @_;
+    my $self = bless {}, $class;
+
+    $harness->callback(
+        'before_runtests',
+        sub {
+            my ($aggregate) = @_;
+            warn "Before runtests\n";
+        }
+    );
+
+    $harness->callback(
+        'after_runtests',
+        sub {
+            my ( $aggregate, $results ) = @_;
+            warn "After runtests\n";
+        }
+    );
+
+    return $self;
+}
+
+1;