| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Text::Livedoor::Wiki::Plugin; |
|
2
|
|
|
|
|
|
|
|
|
3
|
13
|
|
|
13
|
|
57937
|
use warnings; |
|
|
13
|
|
|
|
|
25
|
|
|
|
13
|
|
|
|
|
484
|
|
|
4
|
13
|
|
|
13
|
|
61
|
use strict; |
|
|
13
|
|
|
|
|
23
|
|
|
|
13
|
|
|
|
|
348
|
|
|
5
|
13
|
|
|
13
|
|
21819
|
use Module::Pluggable::Object; |
|
|
13
|
|
|
|
|
136801
|
|
|
|
13
|
|
|
|
|
466
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub inline_plugins { |
|
8
|
13
|
|
|
13
|
1
|
9853
|
my $self = shift; |
|
9
|
13
|
|
|
|
|
30
|
my $opts = shift; |
|
10
|
13
|
|
|
|
|
56
|
$self->_load_plugins( 'Inline' , $opts ); |
|
11
|
|
|
|
|
|
|
} |
|
12
|
|
|
|
|
|
|
sub function_plugins { |
|
13
|
15
|
|
|
15
|
1
|
1906
|
my $self = shift; |
|
14
|
15
|
|
|
|
|
31
|
my $opts = shift; |
|
15
|
15
|
|
|
|
|
82
|
$self->_load_plugins( 'Function' , $opts ); |
|
16
|
|
|
|
|
|
|
} |
|
17
|
|
|
|
|
|
|
sub block_plugins { |
|
18
|
7
|
|
|
7
|
1
|
768
|
my $self = shift; |
|
19
|
7
|
|
|
|
|
15
|
my $opts = shift; |
|
20
|
7
|
|
|
|
|
33
|
$self->_load_plugins( 'Block' , $opts ); |
|
21
|
|
|
|
|
|
|
} |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
#{{{ private |
|
24
|
|
|
|
|
|
|
sub _load_plugins { |
|
25
|
35
|
|
|
35
|
|
77
|
my $self = shift; |
|
26
|
35
|
|
|
|
|
66
|
my $type = shift; |
|
27
|
35
|
|
|
|
|
63
|
my $opts = shift; |
|
28
|
35
|
|
|
|
|
175
|
my @search_path = ( 'Text::Livedoor::Wiki::Plugin::' . $type ); |
|
29
|
|
|
|
|
|
|
# XXX |
|
30
|
35
|
|
|
|
|
83
|
my @except = ( 'Text::Livedoor::Wiki::Plugin::Block::ListBase' ); |
|
31
|
|
|
|
|
|
|
|
|
32
|
35
|
100
|
|
|
|
133
|
if( $opts->{search_path} ) { |
|
33
|
1
|
|
|
|
|
2
|
push @search_path , @{$opts->{search_path}}; |
|
|
1
|
|
|
|
|
3
|
|
|
34
|
|
|
|
|
|
|
} |
|
35
|
|
|
|
|
|
|
|
|
36
|
35
|
100
|
|
|
|
117
|
if( $opts->{except} ) { |
|
37
|
1
|
|
|
|
|
2
|
push @except , @{$opts->{except}}; |
|
|
1
|
|
|
|
|
2
|
|
|
38
|
|
|
|
|
|
|
} |
|
39
|
|
|
|
|
|
|
|
|
40
|
35
|
|
|
|
|
287
|
my $finder |
|
41
|
|
|
|
|
|
|
= Module::Pluggable::Object->new( search_path => \@search_path , except => \@except ); |
|
42
|
35
|
|
|
|
|
386
|
my @plugins = $finder->plugins; |
|
43
|
|
|
|
|
|
|
|
|
44
|
35
|
100
|
|
|
|
314697
|
if( $opts->{addition} ) { |
|
45
|
3
|
|
|
|
|
8
|
push @plugins , @{ $opts->{addition} } ; |
|
|
3
|
|
|
|
|
10
|
|
|
46
|
|
|
|
|
|
|
} |
|
47
|
|
|
|
|
|
|
|
|
48
|
35
|
|
|
|
|
1330
|
return \@plugins; |
|
49
|
|
|
|
|
|
|
} |
|
50
|
|
|
|
|
|
|
#}}} |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 NAME |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Text::Livedoor::Wiki::Plugin - Getting Plugin List |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
my $block_plugins = Text::Livedoor::Wiki::Plugin->block_plugins; |
|
61
|
|
|
|
|
|
|
my $inline_plugins = Text::Livedoor::Wiki::Plugin->inline_plugins; |
|
62
|
|
|
|
|
|
|
my $function_plugins= Text::Livedoor::Wiki::Plugin->function_plugins; |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
my $custom_block_plugins |
|
65
|
|
|
|
|
|
|
= Text::Livedoor::Wiki::Plugin->block_plugins({ |
|
66
|
|
|
|
|
|
|
except => ['My::Plugin::Hoge'], search_path => [ 'My::Plugin' ] , addition => [ 'My::Plugin::Hage' ] |
|
67
|
|
|
|
|
|
|
}) |
|
68
|
|
|
|
|
|
|
; |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
this module only return plugin list . |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 FUNCTIONS |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head2 block_plugins |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
return block plugin list |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head2 inline_plugins |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
return inline plugin list |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 function_plugins |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
return inline function list |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 ARGS |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head2 search_path |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
SEE L search_path option. |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head2 except |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
SEE L except option. |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head2 addition |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
set list of plugin you want to set |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
L |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head1 AUTHOR |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
polocky |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=cut |