File Coverage

blib/lib/Biblio/ILL/ISO/CurrentState.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::CurrentState;
2              
3             =head1 NAME
4              
5             Biblio::ILL::ISO::CurrentState
6              
7             =cut
8              
9 4     4   621 use Biblio::ILL::ISO::ILLASNtype;
  4         7  
  4         108  
10 4     4   24 use Biblio::ILL::ISO::ENUMERATED;
  4         10  
  4         79  
11              
12 4     4   20 use Carp;
  4         8  
  4         402  
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.08.11 - original version
24             #---------------------------------------------------------------------------
25              
26             =head1 DESCRIPTION
27              
28             Biblio::ILL::ISO::CurrentState 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::StateTransitionProhibited
37             Biblio::ILL::ISO::StatusReport
38              
39             =cut
40              
41 4     4   1123 BEGIN{@ISA = qw ( Biblio::ILL::ISO::ENUMERATED
42             Biblio::ILL::ISO::ILLASNtype );} # inherit from ILLASNtype
43              
44             =head1 FROM THE ASN DEFINITION
45            
46             Current-State ::= ENUMERATED {
47             nOT-SUPPLIED (1),
48             pENDING (2),
49             iN-PROCESS (3),
50             fORWARD (4),
51             cONDITIONAL (5),
52             cANCEL-PENDING (6),
53             cANCELLED (7),
54             sHIPPED (8),
55             rECEIVED (9),
56             rENEW-PENDING (10),
57             nOT-RECEIVED-OVERDUE (11),
58             rENEW-OVERDUE (12),
59             oVERDUE (13),
60             rETURNED (14),
61             cHECKED-IN (15),
62             rECALL (16),
63             lOST (17),
64             uNKNOWN (18)
65             }
66              
67             =cut
68              
69             =head1 METHODS
70              
71             =cut
72              
73              
74             #---------------------------------------------------------------
75             #
76             #---------------------------------------------------------------
77             =head1
78              
79             =head2 new( $condition )
80              
81             Creates a new ConditionalResultsCondition object.
82             Valid paramaters are listed in the FROM THE ASN DEFINITION section
83             (e.g. "nOT-SUPPLIED").
84              
85             =cut
86             sub new {
87 2     2 1 17 my $class = shift;
88 2         4 my $self = {};
89              
90 2         27 $self->{"ENUM_LIST"} = {"nOT-SUPPLIED" => 1,
91             "pENDING" => 2,
92             "iN-PROCESS" => 3,
93             "fORWARD" => 4,
94             "cONDITIONAL" => 5,
95             "cANCEL-PENDING" => 6,
96             "cANCELLED" => 7,
97             "sHIPPED" => 8,
98             "rECEIVED" => 9,
99             "rENEW-PENDING" => 10,
100             "nOT-RECEIVED-OVERDUE" => 11,
101             "rENEW-OVERDUE" => 12,
102             "oVERDUE" => 13,
103             "rETURNED" => 14,
104             "cHECKED-IN" => 15,
105             "rECALL" => 16,
106             "lOST" => 17,
107             "uNKNOWN" => 18
108             };
109              
110 2 50       6 if (@_) {
111 2         4 my $s = shift;
112            
113 2 50       6 if ( exists $self->{"ENUM_LIST"}->{$s} ) {
114 2         6 $self->{"ENUMERATED"} = $self->{"ENUM_LIST"}->{$s};
115             } else {
116 0         0 croak "invalid CurrentState type: [$s]";
117             }
118             }
119              
120 2   33     15 bless($self, ref($class) || $class);
121 2         6 return ($self);
122             }
123              
124             =head1 SEE ALSO
125              
126             See the README for system design notes.
127             See the parent class(es) for other available methods.
128              
129             For more information on Interlibrary Loan standards (ISO 10160/10161),
130             a good place to start is:
131              
132             http://www.nlc-bnc.ca/iso/ill/main.htm
133              
134             =cut
135              
136             =head1 AUTHOR
137              
138             David Christensen,
139              
140             =cut
141              
142              
143             =head1 COPYRIGHT AND LICENSE
144              
145             Copyright 2003 by David Christensen
146              
147             This library is free software; you can redistribute it and/or modify it
148             under the same terms as Perl itself.
149              
150             =cut
151              
152             1;