line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Template::Plugin::Lingua::EN::NameCase; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
126998
|
use strict; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
271
|
|
4
|
6
|
|
|
6
|
|
32
|
use warnings; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
223
|
|
5
|
|
|
|
|
|
|
|
6
|
6
|
|
|
6
|
|
27
|
use vars qw($VERSION); |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
394
|
|
7
|
|
|
|
|
|
|
$VERSION = 0.02; |
8
|
|
|
|
|
|
|
|
9
|
6
|
|
|
6
|
|
29
|
use base qw(Template::Plugin); |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
3232
|
|
10
|
6
|
|
|
6
|
|
21065
|
use Template::Plugin; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
119
|
|
11
|
6
|
|
|
6
|
|
3176
|
use Template::Stash; |
|
6
|
|
|
|
|
64604
|
|
|
6
|
|
|
|
|
196
|
|
12
|
6
|
|
|
6
|
|
3358
|
use Lingua::EN::NameCase qw( nc ); |
|
6
|
|
|
|
|
8576
|
|
|
6
|
|
|
|
|
992
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
$Template::Stash::SCALAR_OPS->{'nc'} = \&_nc; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub new { |
17
|
2
|
|
|
2
|
1
|
8977
|
my ($class, $context, $options) = @_; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# now define the filter and return the plugin |
20
|
2
|
|
|
|
|
13
|
$context->define_filter('nc', \&_nc); |
21
|
2
|
|
|
|
|
62
|
return bless {}, $class; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub _nc { |
25
|
4
|
50
|
|
4
|
|
6215
|
my $options = ref $_[-1] eq 'HASH' ? pop : {}; |
26
|
4
|
|
|
|
|
24
|
return nc(join('', @_)); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |