blib/lib/Net/HTTP/Spore/Middleware/Header.pm

filter: Statementstmt 87.5% 14 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 85.7% 18 / 21 CC 1 SCAR 2.2
CC
1
Cov
88%
call
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
↑ Summary
1 #
2 # This file is part of Net-HTTP-Spore-Middleware-Header
3 #
4 # This software is copyright (c) 2014 by celogeek <me@celogeek.com>.
5 #
6 # This is free software; you can redistribute it and/or modify it under
7 # the same terms as the Perl 5 programming language system itself.
8 #
9 package Net::HTTP::Spore::Middleware::Header;
10  
11 # ABSTRACT: Spore Middleware to add header on each request
12 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 our $VERSION = '0.03'; # VERSION
15  
16 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 1 extends 'Net::HTTP::Spore::Middleware';
18  
19 1 has 'header_name' => ( isa => 'Str', is => 'rw', required => 1 );
20 1 has 'header_value' => ( isa => 'Str', is => 'rw', required => 1 );
21  
22 0 ▶sub call {
Subroutine call: not called CC=1 SCAR=6.9
Pod documented
23 0 my ( $self, $req ) = @_;
24  
25 0 return $req->header( $self->header_name, $self->header_value );
26 }
27 1 1;
28  
29 __END__
↑ Summary