Wma/Tag.pm

filter: Statementstmt 100% 26 / 26 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 87.1% 34 / 39 CC 3 SCAR 6.3
CC
3
Cov
90%
init
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.9
↑ Summary Wma.pm »
1 package Audio::File::Wma::Tag;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use base qw( Audio::File::Tag );
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Audio::WMA;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 our $VERSION = '0.02';
9  
10 1 ▶sub init {
Subroutine init: called CC=3 SCAR=11.1
Pod documented
11 1 my $self = shift;
12 1 ▶ $self->{wma} = Audio::WMA->new( $self->{filename} ) or return;
Branch: 1 branch
BranchTrueFalseTotal
$self->{"wma"} = "Audio::WMA"->new($self->{"filename"}) or return 1 0 1
13 1 my $tags = $self->{wma}->tags;
14  
15 1 $self->title( $tags->{TITLE} );
16 1 $self->artist( $tags->{AUTHOR} );
17 1 ▶ $self->album( $tags->{ALBUMTITLE} || $tags->{ALBUM} );
Condition33%1/3
$tags->{'ALBUMTITLE'} || $tags->{'ALBUM'}
l!l&&r!l&&!r
001
MC/DC0%0/2
$tags->{'ALBUMTITLE'} || $tags->{'ALBUM'}
$tags->{'ALBUMTITLE'} $tags->{'ALBUM'}
Truth table33%1/3
A || B
A= $tags->{'ALBUMTITLE'}B= $tags->{'ALBUM'}
ABresult
1X1
011
000
18 1 $self->comment( $tags->{DESCRIPTION} );
19 1 $self->genre( $tags->{GENRE} );
20 # It may be possible to parse the date out of
21 # $obj->info->{creation_date} but I don't know the format:
22 # it does not appear to be epoch seconds.
23 # creation_date_unix also exists, but does not appear to be correct.
24 1 $self->year( $tags->{DATE} );
25 1 $self->track( $tags->{TRACKNUMBER} );
26 1 $self->total( $tags->{TRACKTOTAL} );
27  
28 1 return 1;
29 }
30  
31 1 1;
↑ Summary Wma.pm »