File Coverage

blib/lib/AtomicParsley/Command/Tags.pm
Criterion Covered Total %
statement 16 16 100.0
branch 2 2 100.0
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 23 23 100.0


line stmt bran cond sub pod time code
1 2     2   104016 use strict;
  2         4  
  2         54  
2 2     2   11 use warnings;
  2         4  
  2         148  
3              
4             package AtomicParsley::Command::Tags;
5             $AtomicParsley::Command::Tags::VERSION = '1.153400';
6             # ABSTRACT: represent the mp4 metatags
7              
8 2         16 use Object::Tiny qw{
9             artist
10             title
11             album
12             genre
13             tracknum
14             disk
15             comment
16             year
17             lyrics
18             composer
19             copyright
20             grouping
21             artwork
22             bpm
23             albumArtist
24             compilation
25             advisory
26             stik
27             description
28             longdesc
29             TVNetwork
30             TVShowName
31             TVEpisode
32             TVSeasonNum
33             TVEpisodeNum
34             podcastFlag
35             category
36             keyword
37             podcastURL
38             podcastGUID
39             purchaseDate
40             encodingTool
41             gapless
42 2     2   1495 };
  2         631  
43              
44             sub prepare {
45 1     1 1 1195 my $self = shift;
46              
47             # loop through all accessors and generate parameters for AP
48 1         2 my @out;
49 1         10 while ( my ( $key, $value ) = each(%$self) ) {
50 4 100       12 next unless ( defined $value );
51              
52 3         7 push @out, "--$key";
53 3         11 push @out, $value;
54             }
55              
56 1         5 return @out;
57             }
58              
59             1;
60              
61             __END__