File Coverage

blib/lib/Biblio/ILL/ISO/ReasonUnfilled.pm
Criterion Covered Total %
statement 19 20 95.0
branch 2 4 50.0
condition 1 3 33.3
subroutine 5 5 100.0
pod 1 1 100.0
total 28 33 84.8


line stmt bran cond sub pod time code
1             package Biblio::ILL::ISO::ReasonUnfilled;
2              
3             =head1 NAME
4              
5             Biblio::ILL::ISO::ReasonUnfilled
6              
7             =cut
8              
9 4     4   20 use Biblio::ILL::ISO::ILLASNtype;
  4         7  
  4         160  
10 4     4   19 use Biblio::ILL::ISO::ENUMERATED;
  4         8  
  4         68  
11              
12 4     4   20 use Carp;
  4         6  
  4         348  
13              
14             =head1 VERSION
15              
16             Version 0.01
17              
18             =cut
19              
20             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::ReasonUnfilled 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::UnfilledResults
37              
38             =cut
39              
40 4     4   872 BEGIN{@ISA = qw ( Biblio::ILL::ISO::ENUMERATED
41             Biblio::ILL::ISO::ILLASNtype );} # inherit from ILLASNtype
42              
43             =head1 FROM THE ASN DEFINITION
44            
45             Reason-Unfilled ::= 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             charges (14),
60             prepayment-required (15),
61             lacks-copyright-compliance (16),
62             not-found-as-cited (17),
63             locations-not-found (18),
64             on-hold (19),
65             policy-problem (20),
66             mandatory-messaging-not-supported (21),
67             expiry-not-supported (22) ,
68             requested-delivery-services-not-supported (23),
69             preferred-delivery-time-not-possible (24),
70             other (27),
71             responder-specific (28)
72             }
73              
74             =cut
75              
76             =head1 METHODS
77              
78             =cut
79              
80             #---------------------------------------------------------------
81             #
82             #---------------------------------------------------------------
83             =head1
84              
85             =head2 new( $s )
86              
87             Creates a new ReasonUnfilled object.
88             Valid paramaters are listed in the FROM THE ASN DEFINITION section
89             (e.g. "in-use-on-loan").
90              
91             =cut
92             sub new {
93 1     1 1 10 my $class = shift;
94 1         1 my $self = {};
95              
96 1         17 $self->{"ENUM_LIST"} = {"in-use-on-loan" => 1,
97             "in-process" => 2,
98             "lost" => 3,
99             "non-circulating" => 4,
100             "not-owned" => 5,
101             "on-order" => 6,
102             "volume-issue-not-yet-available" => 7,
103             "at-bindery" => 8,
104             "lacking" => 9,
105             "not-on-shelf" => 10,
106             "on-reserve" => 11,
107             "poor-condition" => 12,
108             "cost-exceeds-limit" => 13,
109             "charges" => 14,
110             "prepayment-required" => 15,
111             "lacks-copyright-compliance" => 16,
112             "not-found-as-cited" => 17,
113             "locations-not-found" => 18,
114             "on-hold" => 19,
115             "policy-problem" => 20,
116             "mandatory-messaging-not-supported" => 21,
117             "expiry-not-supported" => 22,
118             "requested-delivery-services-not-supported" => 23,
119             "preferred-delivery-time-not-possible" => 24,
120             "other" => 27,
121             "responder-specific" => 28
122             };
123              
124 1 50       3 if (@_) {
125 1         2 my $s = shift;
126            
127 1 50       9 if ( exists $self->{"ENUM_LIST"}->{$s} ) {
128 1         3 $self->{"ENUMERATED"} = $self->{"ENUM_LIST"}->{$s};
129             } else {
130 0         0 croak "invalid ReasonUnfilled type: [$s]";
131             }
132             }
133              
134 1   33     6 bless($self, ref($class) || $class);
135 1         9 return ($self);
136             }
137              
138             =head1 SEE ALSO
139              
140             See the README for system design notes.
141             See the parent class(es) for other available methods.
142              
143             For more information on Interlibrary Loan standards (ISO 10160/10161),
144             a good place to start is:
145              
146             http://www.nlc-bnc.ca/iso/ill/main.htm
147              
148             =cut
149              
150             =head1 AUTHOR
151              
152             David Christensen,
153              
154             =cut
155              
156              
157             =head1 COPYRIGHT AND LICENSE
158              
159             Copyright 2003 by David Christensen
160              
161             This library is free software; you can redistribute it and/or modify it
162             under the same terms as Perl itself.
163              
164             =cut
165              
166             1;