line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# $Id: PurePerl.pm 17 2008-04-20 16:03:59Z dave $ |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
AudioFile::Info::Ogg::Vorbis::Header::PurePerl - Perl extension to get |
8
|
|
|
|
|
|
|
info from Ogg Vorbis files. |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 DESCRIPTION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Extracts data from an Ogg Vorbis file using the CPAN module |
13
|
|
|
|
|
|
|
Ogg::Vorbis::Header::PurePerl. |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
See L for more details. |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=cut |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
package AudioFile::Info::Ogg::Vorbis::Header::PurePerl; |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
1
|
|
1440
|
use 5.006; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
63
|
|
22
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
40
|
|
23
|
1
|
|
|
1
|
|
26
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
24
|
1
|
|
|
1
|
|
5
|
use Carp; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
644
|
|
25
|
|
|
|
|
|
|
|
26
|
1
|
|
|
1
|
|
1536
|
use Ogg::Vorbis::Header::PurePerl; |
|
1
|
|
|
|
|
4347
|
|
|
1
|
|
|
|
|
2129
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
our $VERSION = sprintf "%d", '$Revision: 17 $ ' =~ /(\d+)/; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
my %data = (artist => 'ARTIST', |
31
|
|
|
|
|
|
|
title => 'TITLE', |
32
|
|
|
|
|
|
|
album => 'ALBUM', |
33
|
|
|
|
|
|
|
track => 'TRACKNUMBER', |
34
|
|
|
|
|
|
|
year => 'DATE', |
35
|
|
|
|
|
|
|
genre => 'GENRE'); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub new { |
38
|
1
|
|
|
1
|
1
|
23
|
my $class = shift; |
39
|
1
|
|
|
|
|
3
|
my $file = shift; |
40
|
1
|
|
|
|
|
10
|
my $obj = Ogg::Vorbis::Header::PurePerl->new($file); |
41
|
|
|
|
|
|
|
|
42
|
1
|
|
|
|
|
7220
|
bless { obj => $obj }, $class; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
0
|
|
|
0
|
|
0
|
sub DESTROY {} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub AUTOLOAD { |
48
|
6
|
|
|
6
|
|
543
|
our $AUTOLOAD; |
49
|
|
|
|
|
|
|
|
50
|
6
|
|
|
|
|
44
|
my ($pkg, $sub) = $AUTOLOAD =~ /(.*)::(\w+)/; |
51
|
|
|
|
|
|
|
|
52
|
6
|
50
|
|
|
|
26
|
die "Invalid attribute $sub" unless $data{$sub}; |
53
|
|
|
|
|
|
|
|
54
|
6
|
|
|
|
|
36
|
return ($_[0]->{obj}->comment($data{$sub}))[0]; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |
59
|
|
|
|
|
|
|
__END__ |