File Coverage

blib/lib/HTTP/Proxy/BodyFilter.pm
Criterion Covered Total %
statement 13 14 92.8
branch 4 4 100.0
condition n/a
subroutine 5 6 83.3
pod 4 4 100.0
total 26 28 92.8


line stmt bran cond sub pod time code
1             package HTTP::Proxy::BodyFilter;
2             $HTTP::Proxy::BodyFilter::VERSION = '0.303';
3 16     16   2420 use strict;
  16         19  
  16         417  
4 16     16   52 use Carp;
  16         19  
  16         2095  
5              
6             sub new {
7 66     66 1 179792 my $class = shift;
8 66         167 my $self = bless {}, $class;
9 66 100       363 $self->init(@_) if $self->can('init');
10 54         142 return $self;
11             }
12              
13             sub proxy {
14 66     66 1 123 my ( $self, $new ) = @_;
15 66 100       433 return $new ? $self->{_hpbf_proxy} = $new : $self->{_hpbf_proxy};
16             }
17              
18             sub filter {
19 0     0 1 0 croak "HTTP::Proxy::HeaderFilter cannot be used as a filter";
20             }
21              
22 1     1 1 3 sub will_modify { 1 } # by default, we expect the filter to modify data
23              
24             1;
25              
26             __END__