line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::Lazy::Plugin; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1327
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
4
|
use CGI::Lazy::Globals; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
379
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
#------------------------------------------------------------------------------- |
8
|
|
|
|
|
|
|
sub AUTOLOAD { |
9
|
5
|
|
|
5
|
|
8
|
my $self = shift; |
10
|
|
|
|
|
|
|
|
11
|
5
|
|
|
|
|
9
|
my $name = our $AUTOLOAD; |
12
|
5
|
50
|
|
|
|
16
|
return if $name =~ /::DESTROY$/; |
13
|
5
|
|
|
|
|
21
|
my @list = split "::", $name; |
14
|
5
|
|
|
|
|
84
|
my $value = pop @list; |
15
|
|
|
|
|
|
|
|
16
|
5
|
50
|
|
|
|
12
|
if (@_) { |
17
|
0
|
|
|
|
|
0
|
return $self->{_plugins}->{$value} = shift; |
18
|
|
|
|
|
|
|
} else { |
19
|
5
|
|
|
|
|
32
|
return $self->{_plugins}->{$value}; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
#------------------------------------------------------------ |
23
|
|
|
|
|
|
|
sub config { |
24
|
1
|
|
|
1
|
1
|
3
|
my $self = shift; |
25
|
|
|
|
|
|
|
|
26
|
1
|
|
|
|
|
5
|
return $self->q->config; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
#------------------------------------------------------------ |
30
|
|
|
|
|
|
|
sub q { |
31
|
1
|
|
|
1
|
1
|
3
|
my $self = shift; |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
|
|
11
|
return $self->{_q}; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
#------------------------------------------------------------ |
37
|
|
|
|
|
|
|
sub new { |
38
|
1
|
|
|
1
|
1
|
2
|
my $class = shift; |
39
|
1
|
|
|
|
|
3
|
my $q = shift; |
40
|
|
|
|
|
|
|
|
41
|
1
|
|
|
|
|
4
|
my $self = bless {_q => $q}, $class; |
42
|
|
|
|
|
|
|
|
43
|
1
|
|
|
|
|
6
|
$self->{_plugins} = $self->config->plugins; |
44
|
|
|
|
|
|
|
|
45
|
1
|
|
|
|
|
6
|
return $self; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1 |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
__END__ |