| 1 | package Apache::Action::State; | ||||||||||
| 2 | |||||||||||
| 3 | 3 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 3 | ▶ | use vars qw(@ISA); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 3 | ▶ | use Exporter; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 3 | @ISA = qw(Exporter); | |||||||||
| 8 | |||||||||||
| 9 | # Not a DB object! | ||||||||||
| 10 | |||||||||||
| 11 | 2 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=4 SCAR=15.2
Pod
undocumented
| |||||||||||
| 12 | 2 | my $class = shift; | |||||||||
| 13 | 0 | ▶ | my $self = ($#_ == 0) ? { %{ (shift) } } : { @_ }; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | 2 | ▶ | die "No Request accessible to state" unless $self->{Request}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | 2 | ▶ | die "No Session accessible to state" unless $self->{Session}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | 2 | return bless $self, $class; | |||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 1 | ▶ | sub error { | ||||||||
|
Subroutine
error: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 20 | 1 | my $self = shift; | |||||||||
| 21 | 1 | push( @{ $self->{Errors} }, @_ ); | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 1 | ▶ | sub errors { | ||||||||
|
Subroutine
errors: called CC=2 SCAR=7.4
Pod
undocumented
| |||||||||||
| 25 | 1 | my $self = shift; | |||||||||
| 26 | 1 | ▶ | if ($self->{Errors}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 27 | 1 | return @{ $self->{Errors} }; | |||||||||
| 28 | } | ||||||||||
| 29 | 0 | return (); | |||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | 1 | ▶ | sub set { | ||||||||
|
Subroutine
set: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 33 | 1 | my ($self, $key, $data) = @_; | |||||||||
| 34 | 1 | $self->{Data}->{$key} = $data; | |||||||||
| 35 | } | ||||||||||
| 36 | |||||||||||
| 37 | 1 | ▶ | sub get { | ||||||||
|
Subroutine
get: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 38 | 1 | my ($self, $key) = @_; | |||||||||
| 39 | 1 | return $self->{Data}->{$key}; | |||||||||
| 40 | } | ||||||||||
| 41 | |||||||||||
| 42 | 3 | 1; | |||||||||