Moose/Field/Control.pm

filter: Statementstmt 55.5% 10 / 18 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 33.3% 1 / 3 Podpod n/a totaltotal 47.8% 11 / 23 CC 2 SCAR 13.2
CC
2
Cov
50%
__ANON__
6.0
__ANON__
2.0
BEGIN
1.0
CRAP 3.8
« Moose/Record.pm ↑ Summary Moose/Formater/Text.pm »
1 package MARC::Moose::Field::Control;
2 # ABSTRACT: Control Marc field (tag < 010)
3 4 $MARC::Moose::Field::Control::VERSION = '1.0.46';
4 4 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 4 extends 'MARC::Moose::Field';
7  
8 4 has value => ( is => 'rw', isa => 'Str' );
9  
10 override 'as_formatted' => sub {
11 0 ▶ my $self = shift;
Subroutine __ANON__: not called CC=1 SCAR=6.9
12  
13 0 join ' ', ( $self->tag, $self->value );
14 4 };
15  
16  
17 override 'clone' => sub {
18 0 ▶ my ($self, $tag) = @_;
Subroutine __ANON__: not called CC=2 SCAR=17.9
19 0 my $field = MARC::Moose::Field::Control->new( tag => $self->tag );
20 0 ▶ $field->tag($tag) if $tag;
Branch: 1 branch
BranchTrueFalseTotal
if $tag 0 0 0
21 0 my $value = $self->value . '';
22 0 $field->value($value);
23 0 return $field;
24 4 };
25  
26  
27 4 __PACKAGE__->meta->make_immutable;
28  
29 4 1;
30  
31 __END__
32  
33 =pod
34  
35 =encoding UTF-8
36  
37 =head1 NAME
38  
39 MARC::Moose::Field::Control - Control Marc field (tag < 010)
40  
41 =head1 VERSION
42  
43 version 1.0.46
44  
45 =head1 AUTHOR
46  
47 Frédéric Demians <f.demians@tamil.fr>
48  
49 =head1 COPYRIGHT AND LICENSE
50  
51 This software is copyright (c) 2022 by Frédéric Demians.
52  
53 This is free software; you can redistribute it and/or modify it under
54 the same terms as the Perl 5 programming language system itself.
55  
56 =cut
« Moose/Record.pm ↑ Summary Moose/Formater/Text.pm »