Perl - статьи


p Which prove command to

if ( $answer eq 'Y' ) { cleanup_dir($output_dir); }

return; }

sub build_coverage_report { my $options = shift;

my $tmp_dir = create_tmp_dir( $options->{'output-dir'}, $options->{'input-file'} );


eval { prove( $options->{'input-file'}, $options->{'prove-cmd'}, $options->{'prove-args'}, );

generate_coverage_report( $tmp_dir, $options->{'cover-cmd'}, $options->{'cover-args'}, );

open_browser( "$tmp_dir/coverage.html", $options->{'browser-cmd'}, $options->{'browser-args'}, ); };

if ($EVAL_ERROR) { print "$EVAL_ERROR\n"; cleanup_dir($tmp_dir);

exit 1; }


return; }

sub main { my $options = get_options();


return; }


__END__ =head1 NAME - Build & display test coverage report =head1 SYNOPSIS [options]  Options:    --input-file|-f Input .t or .pm file    --prove-cmd|- p Which prove command to use    --prove-args|-P prove args    --cover-cmd|-c Which cover command    --cover-args|-C cover args    --browser-cmd|-b Which browser to use    --browser-args|-B Browser args    --output-dir|-d Output directory    --help|-? Show brief help message    --man Show full documentation =head1 DESCRIPTION Run tests, build coverage report and open web-browser. =cut

Содержание  Назад  Вперед