line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MARC::Spec::Subspec; |
2
|
|
|
|
|
|
|
|
3
|
13
|
|
|
13
|
|
165
|
use Moo; |
|
13
|
|
|
|
|
36
|
|
|
13
|
|
|
|
|
73
|
|
4
|
13
|
|
|
13
|
|
4992
|
use namespace::clean; |
|
13
|
|
|
|
|
34
|
|
|
13
|
|
|
|
|
84
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.0.0'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has left => ( |
9
|
|
|
|
|
|
|
is => 'rw', |
10
|
|
|
|
|
|
|
isa => sub { |
11
|
|
|
|
|
|
|
croak ('Left subterm is not an instance of MARC::Spec or MARC::Spec::Comparisonstring.') |
12
|
|
|
|
|
|
|
unless(ref $_[0] eq 'MARC::Spec' or ref $_[0] eq 'MARC::Spec::Comparisonstring') |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has right => ( |
17
|
|
|
|
|
|
|
is => 'rw', |
18
|
|
|
|
|
|
|
isa => sub { |
19
|
|
|
|
|
|
|
croak ('Right subterm is not an instance of MARC::Spec or MARC::Spec::Comparisonstring.') |
20
|
|
|
|
|
|
|
unless(ref $_[0] eq 'MARC::Spec' or ref $_[0] eq 'MARC::Spec::Comparisonstring') |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
has operator => ( |
25
|
|
|
|
|
|
|
is => 'rw', |
26
|
|
|
|
|
|
|
default => sub { "?" } |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub to_string { |
31
|
4
|
|
|
4
|
1
|
10
|
my ($self) = @_; |
32
|
4
|
|
|
|
|
93
|
my $string = $self->left->to_string().$self->operator.$self->right->to_string(); |
33
|
4
|
|
|
|
|
16
|
return $string; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |