blib/lib/App/Prove/Plugin/Idempotent.pm

filter: Statementstmt 64.0% 16 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 100% 1 / 1 totaltotal 66.6% 22 / 33 CC 1 SCAR 1.8
CC
1
Cov
64%
__ANON__
2.0
load
1.4
BEGIN
1.0
CRAP 1.2
↑ Summary
1 package App::Prove::Plugin::Idempotent;
2  
3 2 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 ▶use Test::More;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 our $VERSION = '0.01';
10  
11 # Problem to solve: overwrite _output *after* TAP::Formatter::Base is loaded
12  
13 0 ▶sub load {
Subroutine load: not called CC=1 SCAR=3.5
Pod documented
14 0 my ($class, $p) = @_;
15 0 my @args = @{ $p->{args} };
16 0 my $app = $p->{app_prove};
17  
18 # That's currently quoting *all* output, regardless where it comes from
19 2 ▶ no warnings 'redefine';
Subroutine BEGIN: called CC=1 SCAR=0.0
20 0 require TAP::Formatter::Session; # load first, then overwrite
21 0 ▶ *{TAP::Formatter::Session::_make_ok_line} = sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
22 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 2 1; # End of App::Prove::Plugin::Idempotent
↑ Summary