Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > b629ba3dbba0478ecfc3f47522206b3f > files > 85

perl-Test-Harness-3.290.0-2.mga4.x86_64.rpm

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;