blib/lib/Net/FreeDB2/Match.pm

filter: Statementstmt 48.8% 21 / 43 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 5 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 33.3% 4 / 12 Podpod 100% 7 / 7 totaltotal 42.1% 32 / 76 CC 6 SCAR 23.5
CC
6
Cov
39%
_initialize
30.0
new
6.0
setCateg
2.0
CRAP 10.5
« blib/lib/Net/FreeDB2/Connection.pm ↑ Summary blib/lib/Net/FreeDB2/Connection/CDDBP.pm »
1 package Net::FreeDB2::Match;
2  
3 # Copyright 2002, Vincenzo Zocca.
4  
5 # See LICENSE section for usage and distribution rights.
6  
7 5 require 5.005_62;
8 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 5 require Exporter;
12 5 ▶use AutoLoader qw(AUTOLOAD);
Subroutine BEGIN: called CC=1 SCAR=0.0
13 5 ▶use Error qw (:try);
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 5 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 5 our %EXPORT_TAGS = ( 'all' => [ qw(
25
26 ) ] );
27  
28 5 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
29  
30 5 our @EXPORT = qw(
31
32 );
33 5 our ( $VERSION ) = '$Revision: 0.8.2.3 $ ' =~ /\$Revision:\s+([^\s]+)/;
34  
35 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod documented
36 0 my $class = shift;
37  
38 0 my $self = {};
39 0 ▶ bless ($self, (ref($class) || $class));
Condition0%0/3
ref $class || $class
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $class || $class
ref $class $class
Truth table0%0/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
40 0 return ($self->_initialize (@_));
41 }
42  
43 0 ▶sub _initialize {
Subroutine _initialize: not called CC=5 SCAR=34.0
44 0 my $self = shift;
45 0 ▶ my $opt = shift || {};
Condition0%0/2
shift() || {}
l!l
00
MC/DC0%0/1
shift() || {}
shift()
Truth table0%0/2
A
A= shift()
Aresult
11
00
46  
47 0 ▶ defined ($opt->{categ}) && $self->setCateg ($opt->{categ});
Branch: 1 branch
BranchTrueFalseTotal
defined $opt->{"categ"} and $self->setCateg($opt->{"categ"}) 0 0 0
48 0 ▶ defined ($opt->{discid}) && $self->setDiscid ($opt->{discid});
Branch: 1 branch
BranchTrueFalseTotal
defined $opt->{"discid"} and $self->setDiscid($opt->{"discid"}) 0 0 0
49 0 ▶ defined ($opt->{dtitle}) && $self->setDtitle ($opt->{dtitle});
Branch: 1 branch
BranchTrueFalseTotal
defined $opt->{"dtitle"} and $self->setDtitle($opt->{"dtitle"}) 0 0 0
50 0 return ($self);
51 }
52  
53 0 ▶sub setCateg {
Subroutine setCateg: not called CC=1 SCAR=6.9
Pod documented
54 0 my $self = shift;
55  
56 0 $self->{Net_FreeDB2_Match}{categ} = shift;
57 }
58  
59 0 ▶sub getCateg {
Subroutine getCateg: not called CC=1 SCAR=6.9
Pod documented
60 0 my $self = shift;
61  
62 0 return ($self->{Net_FreeDB2_Match}{categ});
63 }
64  
65 0 ▶sub setDiscid {
Subroutine setDiscid: not called CC=1 SCAR=6.9
Pod documented
66 0 my $self = shift;
67  
68 0 $self->{Net_FreeDB2_Match}{discid} = shift;
69 }
70  
71 0 ▶sub getDiscid {
Subroutine getDiscid: not called CC=1 SCAR=6.9
Pod documented
72 0 my $self = shift;
73  
74 0 return ($self->{Net_FreeDB2_Match}{discid});
75 }
76  
77 0 ▶sub setDtitle {
Subroutine setDtitle: not called CC=1 SCAR=6.9
Pod documented
78 0 my $self = shift;
79  
80 0 $self->{Net_FreeDB2_Match}{dtitle} = shift;
81 }
82  
83 0 ▶sub getDtitle {
Subroutine getDtitle: not called CC=1 SCAR=6.9
Pod documented
84 0 my $self = shift;
85  
86 0 return ($self->{Net_FreeDB2_Match}{dtitle});
87 }
88  
89 5 1;
90 __END__
« blib/lib/Net/FreeDB2/Connection.pm ↑ Summary blib/lib/Net/FreeDB2/Connection/CDDBP.pm »