| 1 | package MARC::Spec::Subspec; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 13 | ▶ | use Moo; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 13 | ▶ | use namespace::clean; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 13 | our $VERSION = '1.0.0'; | |||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | has left => ( | ||||||||||||||||||||||||||||
| 9 | is => 'rw', | ||||||||||||||||||||||||||||
| 10 | isa => sub { | ||||||||||||||||||||||||||||
| 11 | 92 | ▶ | croak ('Left subterm is not an instance of MARC::Spec or MARC::Spec::Comparisonstring.') | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=14.2
Branch: 1 branch
Condition33%1/3
ref $_[0] eq "MARC::Spec" or ref $_[0] eq "MARC::Spec::Comparisonstring"
MC/DC0%0/2
ref $_[0] eq "MARC::Spec" or ref $_[0] eq "MARC::Spec::Comparisonstring"
ref $_[0] eq "MARC::Spec"
ref $_[0] eq "MARC::Spec::Comparisonstring"
Truth table33%1/3
A or B
A= ref $_[0] eq "MARC::Spec"B= ref $_[0] eq "MARC::Spec::Comparisonstring"
| |||||||||||||||||||||||||||||
| 12 | unless(ref $_[0] eq 'MARC::Spec' or ref $_[0] eq 'MARC::Spec::Comparisonstring') | ||||||||||||||||||||||||||||
| 13 | } | ||||||||||||||||||||||||||||
| 14 | 13 | ); | |||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | has right => ( | ||||||||||||||||||||||||||||
| 17 | is => 'rw', | ||||||||||||||||||||||||||||
| 18 | isa => sub { | ||||||||||||||||||||||||||||
| 19 | 100 | ▶ | croak ('Right subterm is not an instance of MARC::Spec or MARC::Spec::Comparisonstring.') | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=12.0
Branch: 1 branch
Condition66%2/3
ref $_[0] eq "MARC::Spec" or ref $_[0] eq "MARC::Spec::Comparisonstring"
MC/DC0%0/2
ref $_[0] eq "MARC::Spec" or ref $_[0] eq "MARC::Spec::Comparisonstring"
ref $_[0] eq "MARC::Spec"
ref $_[0] eq "MARC::Spec::Comparisonstring"
Truth table66%2/3
A or B
A= ref $_[0] eq "MARC::Spec"B= ref $_[0] eq "MARC::Spec::Comparisonstring"
| |||||||||||||||||||||||||||||
| 20 | unless(ref $_[0] eq 'MARC::Spec' or ref $_[0] eq 'MARC::Spec::Comparisonstring') | ||||||||||||||||||||||||||||
| 21 | } | ||||||||||||||||||||||||||||
| 22 | 13 | ); | |||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | has operator => ( | ||||||||||||||||||||||||||||
| 25 | is => 'rw', | ||||||||||||||||||||||||||||
| 26 | 100 | ▶ | default => sub { "?" } | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 27 | 13 | ); | |||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | sub to_string { | ||||||||||||||||||||||||||||
| 31 | 4 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
to_string: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 32 | 4 | my $string = $self->left->to_string().$self->operator.$self->right->to_string(); | |||||||||||||||||||||||||||
| 33 | 4 | return $string; | |||||||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||||||
| 35 | 13 | 1; | |||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | __END__ | ||||||||||||||||||||||||||||