File Coverage

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