Tag/Option.pm

filter: Statementstmt 100% 25 / 25 Branchbran 100% 4 / 4 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 6 / 6 Podpod 100% 2 / 2 totaltotal 100% 42 / 42 CC 4 SCAR 8.5
CC
4
Cov
100%
set_tag
4.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.3
« Tag/Auto.pm ↑ Summary
1 package Music::Tag::Option;
2 4 ▶use strict; use warnings; use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
3 4 our $VERSION = '.4101';
4 4 ▶use base qw(Music::Tag::Generic);
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 # Copyright © 2006,2010 Edward Allen III. Some rights reserved.
7  
8 #
9 # You may distribute under the terms of either the GNU General Public
10 # License or the Artistic License, as specified in the README file.
11 #
12  
13  
14  
15 4 ▶sub set_tag {
Subroutine set_tag: called CC=4 SCAR=13.9
Pod documented
16 4 my $self = shift;
17 4 my $okmethods = { map { lc($_) => 1 } @{ $self->info->datamethods } };
18 4 ▶ while ( my ( $k, $v ) = each %{ $self->options } ) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = each %{$self->options;}) 45 4 49
19 45 ▶ if ( ( defined $v ) and ( $okmethods->{ lc($k) } ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $v and $$okmethods{lc $k}) 8 37 45
Condition100%3/3
defined $v and $$okmethods{lc $k}
!ll&&!rl&&r
1368
MC/DC100%2/2
defined $v and $$okmethods{lc $k}
defined $v $$okmethods{lc $k}
Truth table100%3/3
A and B
A= defined $vB= $$okmethods{lc $k}
ABresult
0X0
100
111
20 8 my $method = lc($k);
21 8 $self->info->set_data($method,$v);
22 8 $self->tagchange($method);
23 }
24 }
25 }
26  
27 4 ▶sub get_tag { goto &set_tag; }
Subroutine get_tag: called CC=1 SCAR=0.0
Pod documented
28  
29 4 1;
30 __END__
« Tag/Auto.pm ↑ Summary