line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::Application::Pluggable; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
23713
|
use strict; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
40
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
5
|
1
|
|
|
1
|
|
5
|
use base 'CGI::Application'; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
1452
|
|
6
|
1
|
|
|
1
|
|
16222
|
use UNIVERSAL::require '0.10'; |
|
1
|
|
|
|
|
1661
|
|
|
1
|
|
|
|
|
10
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub import { |
10
|
1
|
|
|
1
|
|
12
|
my ( $self, @options ) = @_; |
11
|
1
|
|
|
|
|
3
|
my $caller = caller(0); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
{ |
14
|
1
|
|
|
1
|
|
81
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
207
|
|
|
1
|
|
|
|
|
2
|
|
15
|
1
|
|
|
|
|
2
|
push @{"$caller\::ISA"}, $self; |
|
1
|
|
|
|
|
14
|
|
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
|
|
12
|
for my $option ( @options ) { |
19
|
0
|
0
|
|
|
|
|
if ( ref $option eq 'HASH') { |
20
|
0
|
|
|
|
|
|
my ($plugin,$imports) = each(%{$option}); |
|
0
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
my $plaggable = $self->_mk_plugin_name($plugin); |
22
|
0
|
0
|
|
|
|
|
$plaggable->use( @{$imports} ) or die $@; |
|
0
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
else { |
25
|
0
|
|
|
|
|
|
my $plaggable = $self->_mk_plugin_name($option); |
26
|
0
|
0
|
|
|
|
|
$plaggable->use or die $@; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub _mk_plugin_name { |
32
|
0
|
|
|
0
|
|
|
my $self = shift; |
33
|
0
|
|
|
|
|
|
my $name = shift; |
34
|
0
|
|
|
|
|
|
return "CGI::Application::Plugin::$name"; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
CGI::Application::Pluggable - support to many plugin install. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 VERSION |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
This documentation refers to CGI::Application::Pluggable version 0.03 |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 SYNOPSIS |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
use CGI::Application::Pluggable |
50
|
|
|
|
|
|
|
qw/TT LogDispatch DebugScreen Session Redirect Forward/, |
51
|
|
|
|
|
|
|
{'Config::YAML' => [ qw/ |
52
|
|
|
|
|
|
|
config_file |
53
|
|
|
|
|
|
|
config_param |
54
|
|
|
|
|
|
|
config |
55
|
|
|
|
|
|
|
/ ]}, |
56
|
|
|
|
|
|
|
; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 DESCRIPTION |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
CAP::Pluggable is auto install many plugin. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
This only has to do use |
63
|
|
|
|
|
|
|
though use base is done when CGI::Application is used usually. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
L |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
L |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
L |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 BUGS AND LIMITATIONS |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
There are no known bugs in this module. |
76
|
|
|
|
|
|
|
Please report problems to Atsushi Kobayashi (Enekokak@cpan.orgE) |
77
|
|
|
|
|
|
|
Patches are welcome. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 SEE ALSO |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
L |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
L |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
L |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 AUTHOR |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Atsushi Kobayashi, Enekokak@cpan.orgE |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Copyright (C) 2006 by Atsushi Kobayashi (Enekokak@cpan.orgE). All rights reserved. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify it |
96
|
|
|
|
|
|
|
under the same terms as Perl itself. See L. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=cut |