CmdLine/Plugin/BreakOnFailure.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 2 / 2 totaltotal 100% 21 / 21 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Plugin/BreakOnFailure.pm ↑ Summary
1 package Test::Run::CmdLine::Plugin::BreakOnFailure;
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 ▶use 5.008;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 =head1 NAME
9  
10 Test::Run::CmdLine::Plugin::BreakOnFailure - break on the first test failure.
11  
12 =head1 DESCRIPTION
13  
14 This is a L<Test::Run::CmdLine> plugin that terminates the test suite after
15 the first failing test script. This way, you can know more quickly in case
16 something went wrong.
17  
18 To enable, add C<BreakOnFailure> to the C<HARNESS_PLUGINS> environment
19 variable and set the C<HARNESS_BREAK> environment variable to a true value.
20  
21 =head1 METHODS
22  
23 =cut
24  
25 3 our $VERSION = '0.0.6';
26  
27 =head2 $self->private_backend_plugins()
28  
29 Returns the Backend Plugins as specified by this plugin. See
30 L<Test::Run::CmdLine> for more information.
31  
32 =cut
33  
34 sub private_backend_plugins
35 2 ▶{
Subroutine private_backend_plugins: called CC=1 SCAR=0.0
Pod documented
36 2 my $self = shift;
37  
38 2 return [qw(BreakOnFailure)];
39 }
40  
41 =head2 $self->private_direct_backend_env_mapping()
42  
43 Returns the non-direct Backend Environment Mappings, that will specify
44 the YAML information. See L<Test::Run::CmdLine> for more information.
45  
46 =cut
47  
48 sub private_direct_backend_env_mapping
49 2 ▶{
Subroutine private_direct_backend_env_mapping: called CC=1 SCAR=0.0
Pod documented
50 2 my $self = shift;
51  
52 return
53 [
54 {
55 2 env => 'HARNESS_BREAK',
56 arg => 'should_break_on_failure',
57 },
58 ];
59 }
60  
61 =head1 AUTHOR
62  
63 Shlomi Fish, C<< <shlomif at cpan.org> >>
64  
65 =head1 ACKNOWLEDGEMENTS
66  
67 My work for Reask which inspired this module.
68  
69 =head1 SEE ALSO
70  
71 L<Test::Run::Plugin::BreakOnFailure>, L<Test::Run>,
72 L<Test::Run::CmdLine>, L<TAP::Parser>
73  
74 =head1 COPYRIGHT & LICENSE
75  
76 Copyright 2010 Shlomi Fish.
77  
78 This program is distributed under the MIT (Expat) License:
79 L<http://www.opensource.org/licenses/mit-license.php>
80  
81 Permission is hereby granted, free of charge, to any person
82 obtaining a copy of this software and associated documentation
83 files (the "Software"), to deal in the Software without
84 restriction, including without limitation the rights to use,
85 copy, modify, merge, publish, distribute, sublicense, and/or sell
86 copies of the Software, and to permit persons to whom the
87 Software is furnished to do so, subject to the following
88 conditions:
89  
90 The above copyright notice and this permission notice shall be
91 included in all copies or substantial portions of the Software.
92  
93 =cut
94  
95 3 1;
96  
« Plugin/BreakOnFailure.pm ↑ Summary