| 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__ | ||