lib/Biblio/ILL/ISO/MostRecentService.pm

filter: Statementstmt 95.4% 21 / 22 Branchbran 50.0% 2 / 4 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 81.0% 30 / 37 CC 4 SCAR 9.9
CC
4
Cov
83%
new
4.4
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
« lib/Biblio/ILL/ISO/MediumType.pm ↑ Summary lib/Biblio/ILL/ISO/PlaceOnHoldType.pm »
1 package Biblio::ILL::ISO::MostRecentService;
2  
3 =head1 NAME
4  
5 Biblio::ILL::ISO::MostRecentService
6  
7 =cut
8  
9 4 ▶use Biblio::ILL::ISO::ILLASNtype;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 4 ▶use Biblio::ILL::ISO::ENUMERATED;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 4 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 =head1 VERSION
15  
16 Version 0.01
17  
18 =cut
19  
20 4 our $VERSION = '0.01';
21 #---------------------------------------------------------------------------
22 # Mods
23 # 0.01 - 2003.08.11 - original version
24 #---------------------------------------------------------------------------
25  
26 =head1 DESCRIPTION
27  
28 Biblio::ILL::ISO::MostRecentService is a derivation of Biblio::ILL::ISO::ENUMERATED.
29  
30 =head1 USES
31  
32 None.
33  
34 =head1 USED IN
35  
36 Biblio::ILL::ISO::HistoryReport
37  
38 =cut
39  
40 4 ▶BEGIN{@ISA = qw ( Biblio::ILL::ISO::ENUMERATED
Subroutine BEGIN: called CC=1 SCAR=0.0
41 Biblio::ILL::ISO::ILLASNtype );} # inherit from ILLASNtype
42  
43 =head1 FROM THE ASN DEFINITION
44
45 (part of History-Report)
46 most-recent-service [6] IMPLICIT ENUMERATED {
47 iLL-REQUEST (1),
48 fORWARD (21),
49 fORWARD-NOTIFICATION (2),
50 sHIPPED (3),
51 iLL-ANSWER (4),
52 cONDITIONAL-REPLY (5),
53 cANCEL (6),
54 cANCEL-REPLY (7),
55 rECEIVED (8),
56 rECALL (9),
57 rETURNED (10),
58 cHECKED-IN (11),
59 rENEW-ANSWER (14),
60 lOST (15),
61 dAMAGED (16),
62 mESSAGE (17),
63 sTATUS-QUERY (18),
64 sTATUS-OR-ERROR-REPORT (19),
65 eXPIRED (20)
66 }
67  
68 =cut
69  
70 =head1 METHODS
71  
72 =cut
73 #---------------------------------------------------------------
74 #
75 #---------------------------------------------------------------
76 =head1
77  
78 =head2 new( $service )
79  
80 Creates a new MostRecentService object.
81 Valid paramaters are listed in the FROM THE ASN DEFINITION section
82 (e.g. "iLL-REQUEST").
83  
84 =cut
85 3 ▶sub new {
Subroutine new: called CC=4 SCAR=14.8
Pod documented
86 3 my $class = shift;
87 3 my $self = {};
88  
89 3 $self->{"ENUM_LIST"} = {"iLL-REQUEST" => 1,
90 "fORWARD-NOTIFICATION" => 2,
91 "sHIPPED" => 3,
92 "iLL-ANSWER" => 4,
93 "cONDITIONAL-REPLY" => 5,
94 "cANCEL" => 6,
95 "cANCEL-REPLY" => 7,
96 "rECEIVED" => 8,
97 "rECALL" => 9,
98 "rETURNED" => 10,
99 "cHECKED-IN" => 11,
100 "rENEW-ANSWER" => 14,
101 "lOST" => 15,
102 "dAMAGED" => 16,
103 "mESSAGE" => 17,
104 "sTATUS-QUERY" => 18,
105 "sTATUS-OR-ERROR-REPORT" => 19,
106 "eXPIRED" => 20,
107 "fORWARD" => 21
108 };
109  
110 3 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 3 0 3
111 3 my $s = shift;
112
113 3 ▶ if ( exists $self->{"ENUM_LIST"}->{$s} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{'ENUM_LIST'}{$s}) { } 3 0 3
114 3 $self->{"ENUMERATED"} = $self->{"ENUM_LIST"}->{$s};
115 } else {
116 0 croak "invalid MostRecentService type: [$s]";
117 }
118 }
119  
120 3 ▶ bless($self, ref($class) || $class);
Condition33%1/3
ref $class || $class
l!l&&r!l&&!r
030
MC/DC0%0/2
ref $class || $class
ref $class $class
Truth table33%1/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
121 3 return ($self);
122 }
123  
124 =head1 SEE ALSO
125  
126 See the README for system design notes.
127 See the parent class(es) for other available methods.
128  
129 For more information on Interlibrary Loan standards (ISO 10160/10161),
130 a good place to start is:
131  
132 http://www.nlc-bnc.ca/iso/ill/main.htm
133  
134 =cut
135  
136 =head1 AUTHOR
137  
138 David Christensen, <DChristensenSPAMLESS@westman.wave.ca>
139  
140 =cut
141  
142  
143 =head1 COPYRIGHT AND LICENSE
144  
145 Copyright 2003 by David Christensen
146  
147 This library is free software; you can redistribute it and/or modify it
148 under the same terms as Perl itself.
149  
150 =cut
151  
152 4 1;
« lib/Biblio/ILL/ISO/MediumType.pm ↑ Summary lib/Biblio/ILL/ISO/PlaceOnHoldType.pm »