line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Livedoor::Wiki::Plugin::Inline; |
2
|
|
|
|
|
|
|
|
3
|
12
|
|
|
12
|
|
34090
|
use warnings; |
|
12
|
|
|
|
|
25
|
|
|
12
|
|
|
|
|
360
|
|
4
|
12
|
|
|
12
|
|
68
|
use strict; |
|
12
|
|
|
|
|
21
|
|
|
12
|
|
|
|
|
636
|
|
5
|
12
|
|
|
12
|
|
63
|
use base qw(Class::Data::Inheritable); |
|
12
|
|
|
|
|
24
|
|
|
12
|
|
|
|
|
4785
|
|
6
|
12
|
|
|
12
|
|
13465
|
use Text::Livedoor::Wiki::Utils; |
|
12
|
|
|
|
|
123
|
|
|
12
|
|
|
|
|
303
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata('regex'); |
9
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata('n_args'); |
10
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata('dependency'); |
11
|
|
|
|
|
|
|
|
12
|
2
|
|
|
2
|
1
|
66
|
sub process { die 'implement me' } |
13
|
21
|
|
|
21
|
1
|
490
|
sub process_mobile { shift->process(@_) } |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub uid { |
16
|
3
|
|
|
3
|
1
|
32
|
return $Text::Livedoor::Wiki::scratchpad->{core}{inline_uid}; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
sub opts { |
19
|
5
|
|
|
5
|
1
|
40
|
return $Text::Livedoor::Wiki::opts; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
1; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 NAME |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Text::Livedoor::Wiki::Plugin::Inline - Inline Plugin Base Class |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 DESCRIPTION |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
you can use this class as base to create Inline Plugin. |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 SYNOPSIS |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
package Text::Livedoor::Wiki::Plugin::Inline::Del; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
use warnings; |
36
|
|
|
|
|
|
|
use strict; |
37
|
|
|
|
|
|
|
use base qw(Text::Livedoor::Wiki::Plugin::Inline); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__PACKAGE__->regex(q{%%([^%]*)%%}); |
40
|
|
|
|
|
|
|
__PACKAGE__->n_args(1); |
41
|
|
|
|
|
|
|
__PACKAGE__->dependency( 'Text::Livedoor::Wiki::Plugin::Inline::Underbar' ); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub process { |
44
|
|
|
|
|
|
|
my ( $class , $inline , $line ) = @_; |
45
|
|
|
|
|
|
|
$line = $inline->parse($line); |
46
|
|
|
|
|
|
|
return "$line"; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
1; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 FUNCTION |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head2 regex |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
set regex for your inline formatter rule |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head2 n_args |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
set how many args you take |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head2 dependency |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
set dependency plugin which must check before your plugin |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 process |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
return HTML you want to display |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head2 process_mobile |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
If you did not use it, then $class->process() is run. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 uid |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
get unique id |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head2 opts |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
get opts |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 AUTHOR |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
polocky |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=cut |