File Coverage

blib/lib/App/Prove/Plugin/Idempotent.pm
Criterion Covered Total %
statement 15 24 62.5
branch n/a
condition n/a
subroutine 5 7 71.4
pod 1 1 100.0
total 21 32 65.6


line stmt bran cond sub pod time code
1             package App::Prove::Plugin::Idempotent;
2              
3 1     1   25276 use 5.010;
  1         4  
  1         41  
4 1     1   6 use strict;
  1         2  
  1         99  
5 1     1   6 use warnings;
  1         6  
  1         40  
6              
7 1     1   6 use Test::More;
  1         2  
  1         6  
8              
9             our $VERSION = '0.01';
10              
11             # Problem to solve: overwrite _output *after* TAP::Formatter::Base is loaded
12              
13             sub load {
14 0     0 1   my ($class, $p) = @_;
15 0           my @args = @{ $p->{args} };
  0            
16 0           my $app = $p->{app_prove};
17              
18             # That's currently quoting *all* output, regardless where it comes from
19 1     1   456 no warnings 'redefine';
  1         3  
  1         131  
20 0           require TAP::Formatter::Session; # load first, then overwrite
21             *{TAP::Formatter::Session::_make_ok_line} = sub {
22 0     0     my ( $self, $suffix ) = @_;
23 0           return "";
24 0           };
25 0           return $class;
26             }
27              
28             # development on plugin:
29             # perl -Ilib `which prove` -Ilib -vl -e cat -P Idempotent t/failed_IPv6.tap
30             # normally activate plugin:
31             # prove -Ilib -vl -e cat -P Idempotent t/failed_IPv6.tap
32              
33             1; # End of App::Prove::Plugin::Idempotent