File Coverage

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