GX/HTTP/Request/Cookies.pm

filter: Statementstmt 100% 15 / 15 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 95.4% 21 / 22 CC 2 SCAR 3.4
CC
2
Cov
94%
create
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« GX.pm ↑ Summary GX/HTTP/Response/Cookies.pm »
1 # ----------------------------------------------------------------------------------------------------------------------
2 # GX Framework (c) 2009-2011 Jörg A. Uzarek <uzarek@runlevelnull.de>
3 # File: GX/HTTP/Request/Cookies.pm
4 # ----------------------------------------------------------------------------------------------------------------------
5  
6 package GX::HTTP::Request::Cookies;
7  
8 12 ▶use GX::HTTP::Request::Cookie;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10  
11 # ----------------------------------------------------------------------------------------------------------------------
12 # Class setup
13 # ----------------------------------------------------------------------------------------------------------------------
14  
15 12 ▶use GX::Class;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 12 extends 'GX::HTTP::Cookies';
18  
19 12 build;
20  
21  
22 # ----------------------------------------------------------------------------------------------------------------------
23 # Public methods
24 # ----------------------------------------------------------------------------------------------------------------------
25  
26 4 ▶sub create {
Subroutine create: called CC=2 SCAR=7.0
Pod documented
27  
28 4 my $self = shift;
29  
30 4 ▶ my $cookie = eval { $self->_cookie_class->new( @_ ) } or complain $@;
Branch: 1 branch
BranchTrueFalseTotal
my $cookie = eval { do { $self->_cookie_class->new(@_) } } or $@->complain 4 0 4
31  
32 4 $self->add( $cookie );
33  
34 4 return $cookie;
35  
36 }
37  
38  
39 # ----------------------------------------------------------------------------------------------------------------------
40 # Private methods
41 # ----------------------------------------------------------------------------------------------------------------------
42  
43 87 ▶sub _cookie_class {
Subroutine _cookie_class: called CC=1 SCAR=0.0
44  
45 87 return 'GX::HTTP::Request::Cookie';
46  
47 }
48  
49  
50 12 1;
51  
52 __END__
« GX.pm ↑ Summary GX/HTTP/Response/Cookies.pm »