| 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
| |||||||||||
| 22 | 10 | ▶ | $failure = $test unless $test->is_ok; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | 3 | }); | |||||||||
| 24 | 1 | }); | |||||||||
| 25 | |||||||||||
| 26 | 1 | return $self; | |||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | |||||||||||
| 30 | 2 | 1; | |||||||||
| 31 | |||||||||||
| 32 | |||||||||||
| 33 | __END__ | ||||||||||