Moose/Field.pm

filter: Statementstmt 63.1% 12 / 19 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 3 / 6 Podpod 50.0% 1 / 2 totaltotal 55.1% 16 / 29 CC 2 SCAR 9.5
CC
2
Cov
57%
clone
6.0
as_formatted
2.0
__ANON__
1.1
CRAP 2.6
« Moose/Formater/Json.pm ↑ Summary Moose.pm »
1 package MARC::Moose::Field;
2 # ABSTRACT: Marc field base object
3 4 $MARC::Moose::Field::VERSION = '1.0.49';
4 4 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 ▶use Moose::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 subtype 'Tag'
8 => as 'Str'
9 160 ▶ => where { $_ =~ /^\w{3}$/ }
Subroutine __ANON__: called CC=1 SCAR=0.0
10 0 ▶ => message { 'A 3 alphanumeric characters is required' };
Subroutine __ANON__: not called CC=1 SCAR=1.2
11  
12 4 has tag => ( is => 'rw', isa => 'Tag', required => 1, );
13  
14  
15 0 ▶sub clone {
Subroutine clone: not called CC=2 SCAR=17.9
Pod documented
16 0 my ($self, $tag) = @_;
17  
18 0 my $field = MARC::Moose::Field->new( tag => $self->tag );
19 0 ▶ $field->tag($tag) if $tag;
Branch: 1 branch
BranchTrueFalseTotal
if $tag 0 0 0
20 0 return $field;
21 }
22  
23  
24 0 ▶sub as_formatted {
Subroutine as_formatted: not called CC=1 SCAR=6.9
Pod undocumented
25 0 my $self = shift;
26 0 return $self->tag;
27 }
28  
29 4 __PACKAGE__->meta->make_immutable;
30  
31 4 1;
32  
33 __END__
« Moose/Formater/Json.pm ↑ Summary Moose.pm »