File Coverage

blib/lib/Biblio/ILL/ISO/ReasonNotAvailable.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::ReasonNotAvailable;
2              
3             =head1 NAME
4              
5             Biblio::ILL::ISO::ReasonNotAvailable
6              
7             =cut
8              
9 4     4   21 use Biblio::ILL::ISO::ILLASNtype;
  4         9  
  4         94  
10 4     4   21 use Biblio::ILL::ISO::ENUMERATED;
  4         8  
  4         88  
11              
12 4     4   18 use Carp;
  4         8  
  4         376  
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::ReasonNotAvailable 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::RetryResults
37              
38             =cut
39              
40 4     4   1152 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-Not-Available ::= ENUMERATED {
46             in-use-on-loan (1),
47             in-process (2),
48             on-order (6),
49             volume-issue-not-yet-available (7),
50             at-bindery (8),
51             cost-exceeds-limit (13),
52             charges (14),
53             prepayment-required (15),
54             lacks-copyright-compliance (16),
55             not-found-as-cited (17),
56             on-hold (19),
57             other (27),
58             responder-specific (28)
59             }
60              
61             =cut
62              
63             =head1 METHODS
64              
65             =cut
66              
67             #---------------------------------------------------------------
68             #
69             #---------------------------------------------------------------
70             =head1
71              
72             =head2 new( $s )
73              
74             Creates a new ReasonNotAvailable object.
75             Valid paramaters are listed in the FROM THE ASN DEFINITION section
76             (e.g. "in-use-on-loan").
77              
78             =cut
79             sub new {
80 1     1 1 10 my $class = shift;
81 1         1 my $self = {};
82              
83 1         10 $self->{"ENUM_LIST"} = {"in-use-on-loan" => 1,
84             "in-process" => 2,
85             "on-order" => 6,
86             "volume-issue-not-yet-available" => 7,
87             "at-bindery" => 8,
88             "cost-exceeds-limit" => 13,
89             "charges" => 14,
90             "prepayment-required" => 15,
91             "lacks-copyright-compliance" => 16,
92             "not-found-as-cited" => 17,
93             "on-hold" => 19,
94             "other" => 27,
95             "responder-specific" => 28
96             };
97              
98 1 50       4 if (@_) {
99 1         1 my $s = shift;
100            
101 1 50       14 if ( exists $self->{"ENUM_LIST"}->{$s} ) {
102 1         3 $self->{"ENUMERATED"} = $self->{"ENUM_LIST"}->{$s};
103             } else {
104 0         0 croak "invalid ReasonNotAvailable type: [$s]";
105             }
106             }
107              
108 1   33     15 bless($self, ref($class) || $class);
109 1         5 return ($self);
110             }
111              
112             =head1 SEE ALSO
113              
114             See the README for system design notes.
115             See the parent class(es) for other available methods.
116              
117             For more information on Interlibrary Loan standards (ISO 10160/10161),
118             a good place to start is:
119              
120             http://www.nlc-bnc.ca/iso/ill/main.htm
121              
122             =cut
123              
124             =head1 AUTHOR
125              
126             David Christensen,
127              
128             =cut
129              
130              
131             =head1 COPYRIGHT AND LICENSE
132              
133             Copyright 2003 by David Christensen
134              
135             This library is free software; you can redistribute it and/or modify it
136             under the same terms as Perl itself.
137              
138             =cut
139              
140             1;