File Coverage

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