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