DBIC/Util.pm

filter: Statementstmt 75.7% 25 / 33 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 53.8% 7 / 13 Podpod 0.0% 0 / 6 totaltotal 61.5% 32 / 52 CC 1 SCAR 3.8
CC
1
Cov
76%
pair_key
2.0
pair_value
2.0
create_header
2.0
CRAP 1.5
« DBIC/Role/JsonEncoder.pm ↑ Summary DBIC/Resource/Role/Item.pm »
1 package WebAPI::DBIC::Util;
2 25 $WebAPI::DBIC::Util::VERSION = '0.004002';
3 # based on webmachine-perl/lib/Web/Machine/Util.pm
4 #
5 # ABSTRACT: General Utility module
6  
7 25 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 25 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 25 ▶use Carp qw[ confess ];
Subroutine BEGIN: called CC=1 SCAR=0.0
11 25 ▶use Scalar::Util qw[ blessed ];
Subroutine BEGIN: called CC=1 SCAR=0.0
12 25 ▶use List::Util qw[ first ];
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 25 ▶use HTTP::Headers::ActionPack;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 25 ▶use Sub::Exporter -setup => {
Subroutine BEGIN: called CC=1 SCAR=0.0
17 exports => [qw[
18 first
19 pair_key
20 pair_value
21 bind_path
22 create_date
23 create_header
24 inflate_headers
25 ]]
26 25 };
27  
28 0 ▶sub pair_key { return ( keys %{ $_[0] } )[0] }
Subroutine pair_key: not called CC=1 SCAR=6.9
Pod undocumented
29 0 ▶sub pair_value { return ( values %{ $_[0] } )[0] }
Subroutine pair_value: not called CC=1 SCAR=6.9
Pod undocumented
30  
31 {
32 25 my $ACTION_PACK = HTTP::Headers::ActionPack->new;
33 0 ▶ sub create_header { return $ACTION_PACK->create( @_ ) }
Subroutine create_header: not called CC=1 SCAR=6.9
Pod undocumented
34 0 ▶ sub create_date { return $ACTION_PACK->create( 'DateHeader' => shift ) }
Subroutine create_date: not called CC=1 SCAR=6.9
Pod undocumented
35 0 ▶ sub inflate_headers { return $ACTION_PACK->inflate( @_ ) }
Subroutine inflate_headers: not called CC=1 SCAR=6.9
Pod undocumented
36 0 ▶ sub get_action_pack { return $ACTION_PACK }
Subroutine get_action_pack: not called CC=1 SCAR=6.9
Pod undocumented
37 }
38  
39 25 1;
40  
41 __END__
« DBIC/Role/JsonEncoder.pm ↑ Summary DBIC/Resource/Role/Item.pm »