File Coverage

blib/lib/Biblio/ILL/ISO/ReasonLocsProvided.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::ReasonLocsProvided;
2              
3             =head1 NAME
4              
5             Biblio::ILL::ISO::ReasonLocsProvided
6              
7             =cut
8              
9 4     4   51 use Biblio::ILL::ISO::ILLASNtype;
  4         10  
  4         110  
10 4     4   23 use Biblio::ILL::ISO::ENUMERATED;
  4         7  
  4         115  
11              
12 4     4   21 use Carp;
  4         8  
  4         388  
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::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     4   964 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-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             sub new {
83 1     1 1 9 my $class = shift;
84 1         2 my $self = {};
85              
86 1         7 $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 50       4 if (@_) {
105 1         2 my $s = shift;
106            
107 1 50       2 if ( exists $self->{"ENUM_LIST"}->{$s} ) {
108 1         9 $self->{"ENUMERATED"} = $self->{"ENUM_LIST"}->{$s};
109             } else {
110 0         0 croak "invalid ReasonLocsProvided type: [$s]";
111             }
112             }
113              
114 1   33     6 bless($self, ref($class) || $class);
115 1         10 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,
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             1;