line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MP3::Tag::LastResort; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
42
|
use strict; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
210
|
|
4
|
6
|
|
|
6
|
|
31
|
use vars qw /$VERSION @ISA/; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
780
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
$VERSION="1.00"; |
7
|
|
|
|
|
|
|
@ISA = 'MP3::Tag::__hasparent'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=pod |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 NAME |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
MP3::Tag::LastResort - Module for using other fields to fill autoinfo fields. |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 SYNOPSIS |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $mp3extra = MP3::Tag::LastResort::new_with_parent($filename, $parent); |
18
|
|
|
|
|
|
|
$comment = $mp3inf->comment(); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
see L |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 DESCRIPTION |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
MP3::Tag::LastResort is designed to be called from the MP3::Tag module. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
It uses the artist_collection() as comment() if comment() is not otherwise |
27
|
|
|
|
|
|
|
defined. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=cut |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
# Constructor |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub new_with_parent { |
35
|
85
|
|
|
85
|
0
|
179
|
my ($class, $filename, $parent) = @_; |
36
|
85
|
|
|
|
|
289
|
bless {parent => $parent}, $class; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
# Destructor |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
0
|
|
|
sub DESTROY {} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
for my $elt ( qw( title track artist album year genre ) ) { |
44
|
6
|
|
|
6
|
|
42
|
no strict 'refs'; |
|
6
|
|
|
|
|
16
|
|
|
6
|
|
|
|
|
582
|
|
45
|
41
|
|
|
41
|
|
119
|
*$elt = sub (;$) { return }; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub comment { |
49
|
|
|
|
|
|
|
shift->{parent}->artist_collection() |
50
|
14
|
|
|
14
|
0
|
89
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |