File Coverage

blib/lib/CatalystX/Utils/ContentNegotiation.pm
Criterion Covered Total %
statement 3 4 75.0
branch n/a
condition 0 3 0.0
subroutine 1 2 50.0
pod 0 1 0.0
total 4 10 40.0


line stmt bran cond sub pod time code
1             package CatalystX::Utils::ContentNegotiation;
2              
3 1     1   589 use HTTP::Headers::ActionPack;
  1         1186  
  1         84  
4              
5 0   0 0 0   sub content_negotiator { our $cn ||= HTTP::Headers::ActionPack->new->get_content_negotiator }
6              
7             1;
8              
9             =head1 NAME
10              
11             CatalystX::Utils::ContentNegotiation - Global Content Negotiation object
12              
13             =head1 SYNOPSIS
14              
15             use CatalystX::Utils::ContentNegotiation;
16              
17             =head1 DESCRIPTION
18              
19             Not really intended for end user use at this point so see source if you want more
20             info (its a handful lines of code).
21              
22             I wrote this to avoid creating the content negotiation object over and over.
23              
24             =head1 SEE ALSO
25            
26             L<CatalystX::Errors>.
27              
28             =head1 AUTHOR
29            
30             L<CatalystX::Errors>.
31            
32             =head1 COPYRIGHT & LICENSE
33            
34             L<CatalystX::Errors>.
35              
36             =cut