blib/lib/AudioFile/Info/Ogg/Vorbis/Header/PurePerl.pm

filter: Statementstmt 100% 25 / 25 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 87.5% 7 / 8 Podpod 100% 1 / 1 totaltotal 94.4% 34 / 36 CC 2 SCAR 2.0
CC
2
Cov
96%
AUTOLOAD
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« lib/AudioFile/Info/Build.pm ↑ Summary
1 =head1 NAME
2  
3 AudioFile::Info::Ogg::Vorbis::Header::PurePerl - Perl extension to get
4 info from Ogg Vorbis files.
5  
6 =head1 DESCRIPTION
7  
8 Extracts data from an Ogg Vorbis file using the CPAN module
9 Ogg::Vorbis::Header::PurePerl.
10  
11 See L<AudioFile::Info> for more details.
12  
13 =cut
14  
15 package AudioFile::Info::Ogg::Vorbis::Header::PurePerl;
16  
17 2 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 2 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 2 ▶use Ogg::Vorbis::Header::PurePerl;
Subroutine BEGIN: called CC=1 SCAR=0.0
23  
24 2 our $VERSION = '1.5.5';
25  
26 2 my %data = (artist => 'ARTIST',
27 title => 'TITLE',
28 album => 'ALBUM',
29 track => 'TRACKNUMBER',
30 year => 'DATE',
31 genre => 'GENRE');
32  
33 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
34 1 my $class = shift;
35 1 my $file = shift;
36 1 my $obj = Ogg::Vorbis::Header::PurePerl->new($file);
37  
38 1 bless { obj => $obj }, $class;
39 }
40  
41 0 ▶sub DESTROY {}
Subroutine DESTROY: not called CC=1 SCAR=0.0
42  
43 6 ▶sub AUTOLOAD {
Subroutine AUTOLOAD: called CC=2 SCAR=7.0
44 6 our $AUTOLOAD;
45  
46 6 my ($pkg, $sub) = $AUTOLOAD =~ /(.*)::(\w+)/;
47  
48 6 ▶ die "Invalid attribute $sub" unless $data{$sub};
Branch: 1 branch
BranchTrueFalseTotal
unless $data{$sub} 0 6 6
49  
50 6 return ($_[0]->{obj}->comment($data{$sub}))[0];
51 }
52  
53  
54 2 1;
55 __END__
« lib/AudioFile/Info/Build.pm ↑ Summary