line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::FreeDB2::Match; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Copyright 2002, Vincenzo Zocca. |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# See LICENSE section for usage and distribution rights. |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
require 5.005_62; |
8
|
5
|
|
|
5
|
|
30
|
use strict; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
172
|
|
9
|
5
|
|
|
5
|
|
23
|
use warnings; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
403
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
require Exporter; |
12
|
5
|
|
|
5
|
|
1378
|
use AutoLoader qw(AUTOLOAD); |
|
5
|
|
|
|
|
3595
|
|
|
5
|
|
|
|
|
31
|
|
13
|
5
|
|
|
5
|
|
1625
|
use Error qw (:try); |
|
5
|
|
|
|
|
13756
|
|
|
5
|
|
|
|
|
31
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Items to export into callers namespace by default. Note: do not export |
18
|
|
|
|
|
|
|
# names by default without a very good reason. Use EXPORT_OK instead. |
19
|
|
|
|
|
|
|
# Do not simply export all your public functions/methods/constants. |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# This allows declaration use Net::FreeDB2::Match ':all'; |
22
|
|
|
|
|
|
|
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK |
23
|
|
|
|
|
|
|
# will save memory. |
24
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( 'all' => [ qw( |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
) ] ); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
our @EXPORT = qw( |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
); |
33
|
|
|
|
|
|
|
our ( $VERSION ) = '$Revision: 0.8.2.3 $ ' =~ /\$Revision:\s+([^\s]+)/; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub new { |
36
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
my $self = {}; |
39
|
0
|
|
0
|
|
|
|
bless ($self, (ref($class) || $class)); |
40
|
0
|
|
|
|
|
|
return ($self->_initialize (@_)); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub _initialize { |
44
|
0
|
|
|
0
|
|
|
my $self = shift; |
45
|
0
|
|
0
|
|
|
|
my $opt = shift || {}; |
46
|
|
|
|
|
|
|
|
47
|
0
|
0
|
|
|
|
|
defined ($opt->{categ}) && $self->setCateg ($opt->{categ}); |
48
|
0
|
0
|
|
|
|
|
defined ($opt->{discid}) && $self->setDiscid ($opt->{discid}); |
49
|
0
|
0
|
|
|
|
|
defined ($opt->{dtitle}) && $self->setDtitle ($opt->{dtitle}); |
50
|
0
|
|
|
|
|
|
return ($self); |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub setCateg { |
54
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
55
|
|
|
|
|
|
|
|
56
|
0
|
|
|
|
|
|
$self->{Net_FreeDB2_Match}{categ} = shift; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub getCateg { |
60
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
61
|
|
|
|
|
|
|
|
62
|
0
|
|
|
|
|
|
return ($self->{Net_FreeDB2_Match}{categ}); |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub setDiscid { |
66
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
67
|
|
|
|
|
|
|
|
68
|
0
|
|
|
|
|
|
$self->{Net_FreeDB2_Match}{discid} = shift; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub getDiscid { |
72
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
73
|
|
|
|
|
|
|
|
74
|
0
|
|
|
|
|
|
return ($self->{Net_FreeDB2_Match}{discid}); |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub setDtitle { |
78
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
79
|
|
|
|
|
|
|
|
80
|
0
|
|
|
|
|
|
$self->{Net_FreeDB2_Match}{dtitle} = shift; |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
sub getDtitle { |
84
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
85
|
|
|
|
|
|
|
|
86
|
0
|
|
|
|
|
|
return ($self->{Net_FreeDB2_Match}{dtitle}); |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
1; |
90
|
|
|
|
|
|
|
__END__ |