On Thu, Jul 31, 2003 at 11:39:48AM +0100, Tony Bowden wrote:
> 
> Has anyone added a "./Build cover" target for Module::Build yet? I'm
> trying to move some of my stuff from MakeMaker to Build, and can't
> really work out how to pull my "make cover" equivalent across...

>From Siesta::Build, Siesta's Module::Build subclass:

sub ACTION_cover {
    my $self = shift;
    $self->depends_on('build');
    system qw( rm -rf cover_db );

    # sometimes we get failing tests, which makes Test::Harness
    # die.  catch that
    eval {
        local $ENV{PERL5OPT} = "-MDevel::Cover=-summary,0";
        $self->ACTION_test(@_);
    };
    system qw( cover -report html );
}


-- 
Richard Clamp <[EMAIL PROTECTED]>

Reply via email to