PICA/Writer/Patch.pm

filter: Statementstmt 62.5% 10 / 16 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 52.0% 13 / 25 CC 3 SCAR 18.7
CC
3
Cov
50%
write_field
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 6.5
« PICA/Parser/Base.pm ↑ Summary PICA/Error.pm »
1 package PICA::Writer::Patch;
2 16 ▶use v5.14.1;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 16 our $VERSION = '2.12';
5  
6 16 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 16 ▶use parent 'PICA::Writer::Plain';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 0 ▶sub write_field {
Subroutine write_field: not called CC=3 SCAR=24.8
Pod undocumented
11 0 my ($self, $field) = @_;
12  
13 0 ▶ if (@$field % 2) {
Branch: 1 branch
BranchTrueFalseTotal
if (@$field % 2) { } 0 0 0
14 0 my $char = $field->[$#$field];
15 0 ▶ croak "Invalid annotation: '$char'" if $char !~ /^[ +-]$/;
Branch: 1 branch
BranchTrueFalseTotal
unless $char =~ /^[ +-]$/u 0 0 0
16 }
17 else {
18 0 $field = [@$field, " "];
19 }
20 0 PICA::Writer::Base::write_field($self, $field);
21 }
22  
23 16 1;
24 __END__
« PICA/Parser/Base.pm ↑ Summary PICA/Error.pm »