line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::Application::Plugin::Stash; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
29054
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
41
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
5
|
1
|
|
|
1
|
|
4
|
use vars qw($VERSION @EXPORT); |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
198
|
|
6
|
|
|
|
|
|
|
require Exporter; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
@EXPORT = qw(stash); |
9
|
|
|
|
|
|
|
$VERSION = '0.01'; |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
60
|
sub import { goto &Exporter::import } |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub stash{ |
14
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# First use? Create new __PARAMS! |
17
|
0
|
0
|
|
|
|
|
$self->{__PARAMS} = {} unless (exists($self->{__PARAMS})); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# This code stolen from Catalyst::Engine |
20
|
0
|
0
|
|
|
|
|
if (@_) { |
21
|
0
|
0
|
|
|
|
|
my $stash = @_ > 1 ? {@_} : $_[0]; |
22
|
0
|
|
|
|
|
|
while ( my ( $key, $val ) = each %$stash ) { |
23
|
0
|
|
|
|
|
|
$self->{__PARAMS}->{$key} = $val; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
return $self->{__PARAMS}; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |