line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::JA::Categorize::Base; |
2
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
28
|
|
3
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
32
|
|
4
|
1
|
|
|
1
|
|
5
|
use Scalar::Util qw(weaken); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
105
|
|
5
|
1
|
|
|
1
|
|
4
|
use base qw(Class::Accessor::Fast Class::Data::ConfigHash); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
828
|
|
6
|
1
|
|
|
1
|
|
9278
|
use Carp; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
437
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors($_) for qw(context); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
11
|
1
|
|
|
1
|
1
|
4
|
my $class = shift; |
12
|
1
|
|
|
|
|
2
|
my %args = @_; |
13
|
1
|
|
|
|
|
3
|
my $config = delete $args{config}; |
14
|
1
|
|
|
|
|
15
|
my $self = $class->SUPER::new( {@_} ); |
15
|
1
|
50
|
|
|
|
18
|
$self->config($config) if $config; |
16
|
1
|
|
|
|
|
20
|
weaken( $self->{context} ); |
17
|
1
|
|
|
|
|
5
|
return $self; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub mk_virtual_methods { |
21
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
22
|
0
|
|
|
|
|
|
foreach my $method (@_) { |
23
|
0
|
|
|
|
|
|
my $slot = "${class}::${method}"; |
24
|
|
|
|
|
|
|
{ |
25
|
1
|
|
|
1
|
|
8
|
no strict 'refs'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
146
|
|
|
0
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
|
*{$slot} = sub { |
27
|
0
|
|
|
0
|
|
|
Carp::croak( ref( $_[0] ) . "::${method} is not overridden" ); |
28
|
|
|
|
|
|
|
} |
29
|
0
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
} |
31
|
0
|
|
|
|
|
|
return (); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |