File Coverage

blib/lib/Biblio/ILL/ISO/IntermediaryProblem.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::IntermediaryProblem;
2              
3             =head1 NAME
4              
5             Biblio::ILL::ISO::IntermediaryProblem
6              
7             =cut
8              
9 4     4   23 use Biblio::ILL::ISO::ILLASNtype;
  4         12  
  4         108  
10 4     4   25 use Biblio::ILL::ISO::ENUMERATED;
  4         9  
  4         85  
11              
12 4     4   21 use Carp;
  4         10  
  4         463  
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.12 - original version
24             # (I know it seems odd to have an ENUM with one element,
25             # but that's the way the ASN.1 definition has it....)
26             #---------------------------------------------------------------------------
27              
28             =head1 DESCRIPTION
29              
30             Biblio::ILL::ISO::IntermediaryProblem is a derivation of Biblio::ILL::ISO::ENUMERATED.
31              
32             =head1 USES
33              
34             None.
35              
36             =head1 USED IN
37              
38             Biblio::ILL::ISO::UserErrorReport
39              
40             =cut
41              
42 4     4   842 BEGIN{@ISA = qw ( Biblio::ILL::ISO::ENUMERATED
43             Biblio::ILL::ISO::ILLASNtype );} # inherit from ILLASNtype
44              
45             =head1 FROM THE ASN DEFINITION
46            
47             Intermediary-Problem ::= ENUMERATED {
48             cannot-send-onward (1)
49             }
50              
51             (I know, it's an enumerated list of 1 element. That's what the spec says, though!)
52              
53             =cut
54              
55             =head1 METHODS
56              
57             =cut
58             #---------------------------------------------------------------
59             #
60             #---------------------------------------------------------------
61             =head1
62              
63             =head2 new( $problem )
64              
65             Creates a new IntermediaryProblem object.
66             Valid paramaters are listed in the FROM THE ASN DEFINITION section
67             (e.g. "cannot-send-onward").
68              
69             =cut
70             sub new {
71 1     1 1 9 my $class = shift;
72 1         1 my $self = {};
73              
74 1         3 $self->{"ENUM_LIST"} = {"cannot-send-onward" => 1,
75             };
76              
77 1 50       2 if (@_) {
78 1         1 my $s = shift;
79            
80 1 50       3 if ( exists $self->{"ENUM_LIST"}->{$s} ) {
81 1         2 $self->{"ENUMERATED"} = $self->{"ENUM_LIST"}->{$s};
82             } else {
83 0         0 croak "invalid IntermediaryProblem type: [$s]";
84             }
85             }
86              
87 1   33     5 bless($self, ref($class) || $class);
88 1         2 return ($self);
89             }
90              
91             =head1 SEE ALSO
92              
93             See the README for system design notes.
94             See the parent class(es) for other available methods.
95              
96             For more information on Interlibrary Loan standards (ISO 10160/10161),
97             a good place to start is:
98              
99             http://www.nlc-bnc.ca/iso/ill/main.htm
100              
101             =cut
102              
103             =head1 AUTHOR
104              
105             David Christensen,
106              
107             =cut
108              
109              
110             =head1 COPYRIGHT AND LICENSE
111              
112             Copyright 2003 by David Christensen
113              
114             This library is free software; you can redistribute it and/or modify it
115             under the same terms as Perl itself.
116              
117             =cut
118              
119             1;