line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Template::Plugin::Lingua::EN::NameCase; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
218399
|
use strict; |
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
222
|
|
4
|
6
|
|
|
6
|
|
33
|
use warnings; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
203
|
|
5
|
|
|
|
|
|
|
|
6
|
6
|
|
|
6
|
|
32
|
use vars qw($VERSION); |
|
6
|
|
|
|
|
17
|
|
|
6
|
|
|
|
|
393
|
|
7
|
|
|
|
|
|
|
$VERSION = 0.01; |
8
|
|
|
|
|
|
|
|
9
|
6
|
|
|
6
|
|
35
|
use base qw(Template::Plugin); |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
12975
|
|
10
|
6
|
|
|
6
|
|
33034
|
use Template::Plugin; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
148
|
|
11
|
6
|
|
|
6
|
|
5741
|
use Template::Stash; |
|
6
|
|
|
|
|
131583
|
|
|
6
|
|
|
|
|
210
|
|
12
|
6
|
|
|
6
|
|
7703
|
use Lingua::EN::NameCase qw( nc ); |
|
6
|
|
|
|
|
11097
|
|
|
6
|
|
|
|
|
1146
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
$Template::Stash::SCALAR_OPS->{'nc'} = \&_nc; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub new { |
17
|
2
|
|
|
2
|
1
|
8346
|
my ($class, $context, $options) = @_; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# now define the filter and return the plugin |
20
|
2
|
|
|
|
|
15
|
$context->define_filter('nc', \&_nc); |
21
|
2
|
|
|
|
|
54
|
return bless {}, $class; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub _nc { |
25
|
4
|
50
|
|
4
|
|
5892
|
my $options = ref $_[-1] eq 'HASH' ? pop : {}; |
26
|
4
|
|
|
|
|
19
|
return nc(join('', @_)); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |