line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Template::Plugin::Text::Greeking; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
191200
|
use warnings; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
118
|
|
4
|
3
|
|
|
3
|
|
18
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
108
|
|
5
|
3
|
|
|
3
|
|
47
|
use v5.8.0; |
|
3
|
|
|
|
|
16
|
|
|
3
|
|
|
|
|
159
|
|
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
17
|
use base "Template::Plugin"; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
3034
|
|
8
|
3
|
|
|
3
|
|
13422
|
use Text::Greeking; |
|
3
|
|
|
|
|
9540
|
|
|
3
|
|
|
|
|
88
|
|
9
|
3
|
|
|
3
|
|
2910
|
use UNIVERSAL::require; |
|
3
|
|
|
|
|
5842
|
|
|
3
|
|
|
|
|
31
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '1.0'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
2
|
|
|
2
|
1
|
85
|
my ($class, $context, $options) = @_; |
15
|
2
|
|
|
|
|
4
|
my $greeking_class = "Text::Greeking"; |
16
|
2
|
|
50
|
|
|
26
|
$options ||= { lang => "en" }; |
17
|
|
|
|
|
|
|
return sub { |
18
|
2
|
100
|
|
2
|
|
96
|
my $opt = { %$options, %{ $_[0] || {} } }; |
|
2
|
|
|
|
|
16
|
|
19
|
|
|
|
|
|
|
|
20
|
2
|
50
|
|
|
|
16
|
if ($opt) { |
21
|
2
|
100
|
|
|
|
9
|
if ($opt->{lang} eq 'zh_TW') { |
22
|
1
|
|
|
|
|
2
|
$greeking_class = "Text::Greeking::zh_TW"; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
2
|
|
|
|
|
16
|
$greeking_class->require(); |
27
|
2
|
|
|
|
|
34938
|
my $g = $greeking_class->new; |
28
|
2
|
|
|
|
|
143
|
for (qw(words paragraphs sentences)) { |
29
|
6
|
100
|
|
|
|
27
|
if ($opt->{$_}) { |
30
|
1
|
|
|
|
|
2
|
$g->$_(@{ $opt->{$_} }) |
|
1
|
|
|
|
|
6
|
|
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
$g->generate() |
34
|
2
|
|
|
|
|
18
|
}; |
|
2
|
|
|
|
|
10
|
|
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; # Magic true value required at end of module |
38
|
|
|
|
|
|
|
__END__ |