File Coverage

blib/lib/Test/Effects/VERBOSE.pm
Criterion Covered Total %
statement 10 10 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 15 15 100.0


line stmt bran cond sub pod time code
1             package Test::Effects::VERBOSE;
2              
3 1     1   811 no if $] >= 5.018, 'warnings', "experimental";
  1         2  
  1         7  
4 1     1   76 use 5.014;
  1         11  
5 1     1   5 use warnings;
  1         2  
  1         83  
6              
7             our $VERSION = '0.000001';
8              
9 1     1   106 sub import { $^H{'Test::Effects::VERBOSE'} = 1; }
10 1     1   1684 sub unimport { $^H{'Test::Effects::VERBOSE'} = 0; }
11              
12              
13             1; # Magic true value required at end of module
14             __END__
15              
16             =head1 NAME
17              
18             Test::Effects::VERBOSE - Lexically set Test::Effects verbosity
19              
20              
21             =head1 VERSION
22              
23             This document describes Test::Effects::VERBOSE version 0.000001
24              
25              
26             =head1 SYNOPSIS
27              
28             {
29             use Test::Effects::VERBOSE;
30             # Test::Effects defaults to verbose in this scope
31              
32             {
33             no Test::Effects::VERBOSE;
34             # Test::Effects defaults to non-verbose in this scope
35             }
36              
37             # Test::Effects still verbose here
38              
39             }
40             # Test::Effects reverts to original behaviour here
41              
42              
43             =head1 DESCRIPTION
44              
45             Using this module changes the default behaviour of Test::Effects's
46             C<effects_ok()> test.
47              
48             Normally this test reports tersely (unless explicitly told otherwise via
49             the use of C<VERBOSE()>). If this module is used in a code block,
50             C<effects_ok()> defaults to verbose reporting in that block's lexical scope.
51              
52             Note, however, that an explicit C<< VERBOSE => $boolean >> option in
53             any call to C<<effects_ok()> overrides this lexical default.
54              
55             =head1 INTERFACE
56              
57             =head2 C<use Test::Effects::VERBOSE;>
58              
59             C<effects_ok> defaults to verbose reporting within the rest of the
60             current lexical scope.
61              
62              
63             =head2 C<no Test::Effects::VERBOSE;>
64              
65             C<effects_ok> defaults to non-verbose reporting within the rest of
66             the current lexical scope.
67              
68              
69             =head1 DIAGNOSTICS
70              
71             None.
72              
73              
74             =head1 CONFIGURATION AND ENVIRONMENT
75              
76             Test::Effects::VERBOSE requires no configuration files or environment variables.
77              
78              
79             =head1 DEPENDENCIES
80              
81             Requires Perl 5.14 (or better).
82              
83             Does not require, but is meaningless without, the Test::Effects module.
84              
85              
86             =head1 INCOMPATIBILITIES
87              
88             None reported.
89              
90              
91             =head1 BUGS AND LIMITATIONS
92              
93             No bugs have been reported.
94              
95             Please report any bugs or feature requests to
96             C<bug-lib-test-effects@rt.cpan.org>, or through the web interface at
97             L<http://rt.cpan.org>.
98              
99              
100             =head1 AUTHOR
101              
102             Damian Conway C<< <DCONWAY@cpan.org> >>
103              
104              
105             =head1 LICENCE AND COPYRIGHT
106              
107             Copyright (c) 2012, Damian Conway C<< <DCONWAY@cpan.org> >>. All rights reserved.
108              
109             This module is free software; you can redistribute it and/or
110             modify it under the same terms as Perl itself. See L<perlartistic>.
111              
112              
113             =head1 DISCLAIMER OF WARRANTY
114              
115             BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
116             FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
117             OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
118             PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
119             EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
120             WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
121             ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
122             YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
123             NECESSARY SERVICING, REPAIR, OR CORRECTION.
124              
125             IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
126             WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
127             REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
128             LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
129             OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
130             THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
131             RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
132             FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
133             SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
134             SUCH DAMAGES.