blib/lib/TAP/Harness/BailOnFail.pm

filter: Statementstmt 100% 21 / 21 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 100% 32 / 32 SCAR 11.0
CC
3
Cov
100%
__ANON__
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
↑ Summary
1 package TAP::Harness::BailOnFail;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use parent qw(TAP::Harness::Restricted);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 our $VERSION = '0.001';
8  
9 sub new {
10 1 ▶ my $class = shift;
Subroutine new: called CC=1 SCAR=0.0
Pod documented
11 1 my $self = $class->SUPER::new(@_);
12  
13 $self->callback(made_parser => sub {
14 3 ▶ my $parser = shift;
Subroutine __ANON__: called CC=1 SCAR=0.0
15  
16 # Continue parsing after the first failure until just before the
17 # next test, to capture any pending diagnositcs.
18 3 my $failure;
19 $parser->callback(test => sub {
20 12 ▶ my $test = shift;
Subroutine __ANON__: called CC=3 SCAR=11.0
21 12 ▶ $self->_bailout($failure) if $failure;
Branch: 1 branch
BranchTrueFalseTotal
if $failure 2 10 12
22 10 ▶ $failure = $test unless $test->is_ok;
Branch: 1 branch
BranchTrueFalseTotal
unless $test->is_ok 2 8 10
23 3 });
24 1 });
25  
26 1 return $self;
27 }
28  
29  
30 2 1;
31  
32  
33 __END__
↑ Summary