Proxy/BodyFilter.pm

filter: Statementstmt 93.7% 15 / 16 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 100% 4 / 4 totaltotal 93.3% 28 / 30 CC 3 SCAR 4.9
CC
3
Cov
95%
new
2.0
proxy
2.0
filter
2.0
CRAP 1.6
« Proxy/HeaderFilter.pm ↑ Summary Proxy/BodyFilter/complete.pm »
1 package HTTP::Proxy::BodyFilter;
2 16 $HTTP::Proxy::BodyFilter::VERSION = '0.304';
3 16 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 16 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 66 ▶sub new {
Subroutine new: called CC=2 SCAR=6.9
Pod documented
7 66 my $class = shift;
8 66 my $self = bless {}, $class;
9 66 ▶ $self->init(@_) if $self->can('init');
Branch: 1 branch
BranchTrueFalseTotal
if $self->can("init") 55 11 66
10 54 return $self;
11 }
12  
13 66 ▶sub proxy {
Subroutine proxy: called CC=2 SCAR=6.9
Pod documented
14 66 my ( $self, $new ) = @_;
15 66 ▶ return $new ? $self->{_hpbf_proxy} = $new : $self->{_hpbf_proxy};
Branch: 1 branch
BranchTrueFalseTotal
$new ? : 38 28 66
16 }
17  
18 0 ▶sub filter {
Subroutine filter: not called CC=1 SCAR=6.9
Pod documented
19 0 croak "HTTP::Proxy::HeaderFilter cannot be used as a filter";
20 }
21  
22 1 ▶sub will_modify { 1 } # by default, we expect the filter to modify data
Subroutine will_modify: called CC=1 SCAR=0.0
Pod documented
23  
24 16 1;
25  
26 __END__
« Proxy/HeaderFilter.pm ↑ Summary Proxy/BodyFilter/complete.pm »