This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to Test::Harness 3.05
[perl5.git] / lib / TAP / Parser / Result / Bailout.pm
1 package TAP::Parser::Result::Bailout;
2
3 use strict;
4
5 use vars qw($VERSION @ISA);
6 use TAP::Parser::Result;
7 @ISA = 'TAP::Parser::Result';
8
9 =head1 NAME
10
11 TAP::Parser::Result::Bailout - Bailout result token.
12
13 =head1 VERSION
14
15 Version 3.05
16
17 =cut
18
19 $VERSION = '3.05';
20
21 =head1 DESCRIPTION
22
23 This is a subclass of L<TAP::Parser::Result>.  A token of this class will be
24 returned if a bail out line is encountered.
25
26  1..5
27  ok 1 - woo hooo!
28  Bail out! Well, so much for "woo hooo!"
29
30 =head1 OVERRIDDEN METHODS
31
32 Mainly listed here to shut up the pitiful screams of the pod coverage tests.
33 They keep me awake at night.
34
35 =over 4
36
37 =item * C<as_string>
38
39 =back
40
41 =cut
42
43 ##############################################################################
44
45 =head2 Instance Methods
46
47 =head3 C<explanation>
48
49   if ( $result->is_bailout ) {
50       my $explanation = $result->explanation;
51       print "We bailed out because ($explanation)";
52   }
53
54 If, and only if, a token is a bailout token, you can get an "explanation" via
55 this method.  The explanation is the text after the mystical "Bail out!" words
56 which appear in the tap output.
57
58 =cut
59
60 sub explanation { shift->{bailout} }
61 sub as_string   { shift->{bailout} }
62
63 1;