lib/Biblio/ILL/ISO/ReasonLocsProvided.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/ProtocolVersionNum.pm ↑ Summary lib/Biblio/ILL/ISO/ReasonNoReport.pm »
1 package Biblio::ILL::ISO::ReasonLocsProvided;
2  
3 =head1 NAME
4  
5 Biblio::ILL::ISO::ReasonLocsProvided
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.07.26 - original version
24 #---------------------------------------------------------------------------
25  
26 =head1 DESCRIPTION
27  
28 Biblio::ILL::ISO::ReasonLocsProvided 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::LocationsResults
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 Reason-Locs-Provided ::= ENUMERATED {
46 in-use-on-loan (1),
47 in-process (2),
48 lost (3),
49 non-circulating (4),
50 not-owned (5),
51 on-order (6),
52 volume-issue-not-yet-available (7),
53 at-bindery (8),
54 lacking (9),
55 not-on-shelf (10),
56 on-reserve (11),
57 poor-condition (12),
58 cost-exceeds-limit (13),
59 on-hold (19),
60 other (27),
61 responder-specific (28)
62 }
63  
64 =cut
65  
66 =head1 METHODS
67  
68 =cut
69  
70 #---------------------------------------------------------------
71 #
72 #---------------------------------------------------------------
73 =head1
74  
75 =head2 new( $s )
76  
77 Creates a new ReasonLocsProvided object.
78 Valid paramaters are listed in the FROM THE ASN DEFINITION section
79 (e.g. "in-use-on-loan").
80  
81 =cut
82 1 ▶sub new {
Subroutine new: called CC=4 SCAR=14.8
Pod documented
83 1 my $class = shift;
84 1 my $self = {};
85  
86 1 $self->{"ENUM_LIST"} = { "in-use-on-loan" => 1,
87 "in-process" => 2,
88 "lost" => 3,
89 "non-circulating" => 4,
90 "not-owned" => 5,
91 "on-order" => 6,
92 "volume-issue-not-yet-available" => 7,
93 "at-bindery" => 8,
94 "lacking" => 9,
95 "not-on-shelf" => 10,
96 "on-reserve" => 11,
97 "poor-condition" => 12,
98 "cost-exceeds-limit" => 13,
99 "on-hold" => 19,
100 "other" => 27,
101 "responder-specific" => 28
102 };
103  
104 1 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 1 0 1
105 1 my $s = shift;
106
107 1 ▶ if ( exists $self->{"ENUM_LIST"}->{$s} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{'ENUM_LIST'}{$s}) { } 1 0 1
108 1 $self->{"ENUMERATED"} = $self->{"ENUM_LIST"}->{$s};
109 } else {
110 0 croak "invalid ReasonLocsProvided type: [$s]";
111 }
112 }
113  
114 1 ▶ bless($self, ref($class) || $class);
Condition33%1/3
ref $class || $class
l!l&&r!l&&!r
010
MC/DC0%0/2
ref $class || $class
ref $class $class
Truth table33%1/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
115 1 return ($self);
116 }
117  
118 =head1 SEE ALSO
119  
120 See the README for system design notes.
121 See the parent class(es) for other available methods.
122  
123 For more information on Interlibrary Loan standards (ISO 10160/10161),
124 a good place to start is:
125  
126 http://www.nlc-bnc.ca/iso/ill/main.htm
127  
128 =cut
129  
130 =head1 AUTHOR
131  
132 David Christensen, <DChristensenSPAMLESS@westman.wave.ca>
133  
134 =cut
135  
136  
137 =head1 COPYRIGHT AND LICENSE
138  
139 Copyright 2003 by David Christensen
140  
141 This library is free software; you can redistribute it and/or modify it
142 under the same terms as Perl itself.
143  
144 =cut
145  
146 4 1;
« lib/Biblio/ILL/ISO/ProtocolVersionNum.pm ↑ Summary lib/Biblio/ILL/ISO/ReasonNoReport.pm »