blib/lib/Plack/Middleware/RearrangeHeaders.pm

filter: Statementstmt 100% 23 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 1 / 1 totaltotal 100% 31 / 31 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Plack/Handler/Standalone.pm ↑ Summary eg/dot-psgi/Hello.psgi »
1 package Plack::Middleware::RearrangeHeaders;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use parent qw( Plack::Middleware );
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use HTTP::Headers;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶sub call {
Subroutine call: called CC=1 SCAR=0.0
Pod documented
9 1 my $self = shift;
10  
11 1 my $res = $self->app->(@_);
12 1 ▶ $self->response_cb($res, sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
13 1 my $res = shift;
14  
15 1 my $h = HTTP::Headers->new(@{$res->[1]});
16 1 my @new_headers;
17 1 ▶ $h->scan(sub { push @new_headers, @_ });
Subroutine __ANON__: called CC=1 SCAR=0.0
18  
19 1 $res->[1] = \@new_headers;
20 1 });
21 }
22  
23 1 1;
24  
25 __END__
« blib/lib/Plack/Handler/Standalone.pm ↑ Summary eg/dot-psgi/Hello.psgi »