blib/lib/Net/FreeDB2/Response.pm

filter: Statementstmt 60.0% 21 / 35 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 40.0% 4 / 10 Podpod 100% 5 / 5 totaltotal 54.5% 30 / 55 CC 2 SCAR 8.6
CC
2
Cov
55%
new
6.0
_initialize
2.0
setError
2.0
CRAP 2.4
« blib/lib/Net/FreeDB2/Connection/CDDBP.pm ↑ Summary Connection/CDDBP/test.pl »
1 package Net::FreeDB2::Response;
2  
3 # Copyright 2002, Vincenzo Zocca.
4  
5 # See LICENSE section for usage and distribution rights.
6  
7 8 require 5.005_62;
8 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 8 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 8 ▶use Error qw (:try);
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 8 require Exporter;
13 8 ▶use AutoLoader qw(AUTOLOAD);
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 8 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::Response ':all';
22 # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
23 # will save memory.
24 8 our %EXPORT_TAGS = ( 'all' => [ qw(
25
26 ) ] );
27  
28 8 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
29  
30 8 our @EXPORT = qw(
31
32 );
33 8 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=1 SCAR=6.9
44 0 my $self = shift;
45  
46 0 return ($self);
47 }
48  
49 0 ▶sub setError {
Subroutine setError: not called CC=1 SCAR=6.9
Pod documented
50 0 my $self = shift;
51  
52 0 $self->{Net_FreeDB2_Response}{error} = int (shift);
53 }
54  
55 0 ▶sub hasError {
Subroutine hasError: not called CC=1 SCAR=6.9
Pod documented
56 0 my $self = shift;
57  
58 0 return ($self->{Net_FreeDB2_Response}{error});
59 }
60  
61 0 ▶sub setResult {
Subroutine setResult: not called CC=1 SCAR=6.9
Pod documented
62 0 my $self = shift;
63  
64 0 $self->{Net_FreeDB2_Response}{result} = shift;
65 }
66  
67 0 ▶sub getResult {
Subroutine getResult: not called CC=1 SCAR=6.9
Pod documented
68 0 my $self = shift;
69  
70 0 return ($self->{Net_FreeDB2_Response}{result});
71 }
72  
73 8 1;
74 __END__
« blib/lib/Net/FreeDB2/Connection/CDDBP.pm ↑ Summary Connection/CDDBP/test.pl »