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.302';
3 16     16   2704 use strict;
  16         22  
  16         514  
4 16     16   69 use Carp;
  16         27  
  16         2651  
5              
6             sub new {
7 66     66 1 203424 my $class = shift;
8 66         194 my $self = bless {}, $class;
9 66 100       389 $self->init(@_) if $self->can('init');
10 54         171 return $self;
11             }
12              
13             sub proxy {
14 66     66 1 107 my ( $self, $new ) = @_;
15 66 100       492 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__