blib/lib/Plack/App/Proxy/Anonymous.pm

filter: Statementstmt 81.2% 13 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 77.2% 17 / 22 CC 1 SCAR 1.8
CC
1
Cov
81%
build_headers_from_env
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
↑ Summary
1 package Plack::App::Proxy::Anonymous;
2  
3 =head1 NAME
4  
5 Plack::App::Proxy::Anonymous - anonymous proxy requests
6  
7 =head1 SYNOPSIS
8  
9 =for markdown ```perl
10  
11 # In app.psgi
12 use Plack::Builder;
13 use Plack::App::Proxy::Anonymous;
14  
15 builder {
16 enable "Proxy::Requests";
17 Plack::App::Proxy::Anonymous->new->to_app;
18 };
19  
20 =for markdown ```
21  
22 =head1 DESCRIPTION
23  
24 This module extends L<Plack::App::Proxy>. It doesn't add own headers which
25 could trace an origin of the request.
26  
27 =for readme stop
28  
29 =cut
30  
31 2 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
32  
33 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
34 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
35  
36 2 our $VERSION = '0.0100';
37  
38 2 ▶use parent qw(Plack::App::Proxy);
Subroutine BEGIN: called CC=1 SCAR=0.0
39  
40 0 ▶sub build_headers_from_env {
Subroutine build_headers_from_env: not called CC=1 SCAR=6.9
Pod undocumented
41 0 my ($self, $env, $req) = @_;
42 0 my $headers = $req->headers->clone;
43 0 return +{%$headers};
44 }
45  
46 2 1;
47  
48 __END__
↑ Summary