line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Livedoor::Wiki::Plugin::Function::Size; |
2
|
11
|
|
|
11
|
|
61
|
use warnings; |
|
11
|
|
|
|
|
25
|
|
|
11
|
|
|
|
|
348
|
|
3
|
11
|
|
|
11
|
|
60
|
use strict; |
|
11
|
|
|
|
|
25
|
|
|
11
|
|
|
|
|
416
|
|
4
|
11
|
|
|
11
|
|
65
|
use base qw/Text::Livedoor::Wiki::Plugin::Function/; |
|
11
|
|
|
|
|
21
|
|
|
11
|
|
|
|
|
1699
|
|
5
|
|
|
|
|
|
|
__PACKAGE__->function_name('size'); |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub prepare_args { |
8
|
12
|
|
|
12
|
1
|
30
|
my $class= shift; |
9
|
12
|
|
|
|
|
18
|
my $args = shift; |
10
|
12
|
100
|
|
|
|
240
|
die 'no arg' unless scalar @$args ; |
11
|
11
|
|
|
|
|
26
|
my $size = $args->[0]; |
12
|
11
|
100
|
|
|
|
74
|
die 'must be number' unless $size =~ /^[0-9]+$/; |
13
|
10
|
|
|
|
|
52
|
return { size => $size } ; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
sub process { |
16
|
7
|
|
|
7
|
1
|
19
|
my ( $class, $inline, $data ) = @_; |
17
|
7
|
|
|
|
|
18
|
my $size = $data->{args}{size}; |
18
|
7
|
|
|
|
|
16
|
my $value = $data->{value}; |
19
|
7
|
|
|
|
|
29
|
$value = $inline->parse($value); |
20
|
7
|
|
|
|
|
58
|
return qq|$value|; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub process_mobile { |
24
|
3
|
|
|
3
|
1
|
8
|
my ( $class, $inline, $data ) = @_; |
25
|
3
|
|
|
|
|
7
|
my $size = $data->{args}{size}; |
26
|
3
|
|
|
|
|
7
|
my $value = $data->{value}; |
27
|
3
|
|
|
|
|
12
|
$value = $inline->parse($value); |
28
|
3
|
|
|
|
|
25
|
return qq|$value|; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 NAME |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Text::Livedoor::Wiki::Plugin::Function::Size - Size Function Plugin |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 SYNOPSIS |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
&size(20){text here} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 DESCRIPTION |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
make your text bigger or smaller |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 FUNCTION |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 prepare_args |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head2 process |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 process_mobile |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 AUTHOR |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
polocky |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=cut |