lib/Biblio/ILL/ISO/UnableToPerform.pm

filter: Statementstmt 95.4% 21 / 22 Branchbran 50.0% 2 / 4 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 81.0% 30 / 37 CC 4 SCAR 9.9
CC
4
Cov
83%
new
4.4
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
« lib/Biblio/ILL/ISO/TransactionType.pm ↑ Summary lib/Biblio/ILL/ISO/ILLServiceTypeSequence.pm »
1 package Biblio::ILL::ISO::UnableToPerform;
2  
3 =head1 NAME
4  
5 Biblio::ILL::ISO::UnableToPerform
6  
7 =cut
8  
9 4 ▶use Biblio::ILL::ISO::ILLASNtype;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 4 ▶use Biblio::ILL::ISO::ENUMERATED;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 4 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 =head1 VERSION
15  
16 Version 0.01
17  
18 =cut
19  
20 4 our $VERSION = '0.01';
21 #---------------------------------------------------------------------------
22 # Mods
23 # 0.01 - 2003.08.12 - original version
24 #---------------------------------------------------------------------------
25  
26 =head1 DESCRIPTION
27  
28 Biblio::ILL::ISO::UnableToPerform is a derivation of Biblio::ILL::ISO::ENUMERATED.
29 (and has nothing to do with Viagra....)
30  
31 =head1 USES
32  
33 None.
34  
35 =head1 USED IN
36  
37 Biblio::ILL::ISO::UserErrorReport
38  
39 =cut
40  
41 4 ▶BEGIN{@ISA = qw ( Biblio::ILL::ISO::ENUMERATED
Subroutine BEGIN: called CC=1 SCAR=0.0
42 Biblio::ILL::ISO::ILLASNtype );} # inherit from ILLASNtype
43  
44 =head1 FROM THE ASN DEFINITION
45
46 Unable-To-Perform ::= ENUMERATED {
47 not-available (1),
48 resource-limitation (2),
49 other (3)
50 }
51  
52 =cut
53  
54 =head1 METHODS
55  
56 =cut
57  
58 #---------------------------------------------------------------
59 #
60 #---------------------------------------------------------------
61 =head1
62  
63 =head2 new( $s )
64  
65 Creates a new UnableToPerform object.
66 Valid paramaters are listed in the FROM THE ASN DEFINITION section
67 (e.g. "not-available").
68  
69 =cut
70 1 ▶sub new {
Subroutine new: called CC=4 SCAR=14.8
Pod documented
71 1 my $class = shift;
72 1 my $self = {};
73  
74 1 $self->{"ENUM_LIST"} = {"not-available" => 1,
75 "resource-limitation" => 2,
76 "other" => 3
77 };
78  
79 1 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 1 0 1
80 1 my $s = shift;
81
82 1 ▶ if ( exists $self->{"ENUM_LIST"}->{$s} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{'ENUM_LIST'}{$s}) { } 1 0 1
83 1 $self->{"ENUMERATED"} = $self->{"ENUM_LIST"}->{$s};
84 } else {
85 0 croak "invalid UnableToPerform type: [$s]";
86 }
87 }
88  
89 1 ▶ bless($self, ref($class) || $class);
Condition33%1/3
ref $class || $class
l!l&&r!l&&!r
010
MC/DC0%0/2
ref $class || $class
ref $class $class
Truth table33%1/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
90 1 return ($self);
91 }
92  
93 =head1 SEE ALSO
94  
95 See the README for system design notes.
96 See the parent class(es) for other available methods.
97  
98 For more information on Interlibrary Loan standards (ISO 10160/10161),
99 a good place to start is:
100  
101 http://www.nlc-bnc.ca/iso/ill/main.htm
102  
103 =cut
104  
105 =head1 AUTHOR
106  
107 David Christensen, <DChristensenSPAMLESS@westman.wave.ca>
108  
109 =cut
110  
111  
112 =head1 COPYRIGHT AND LICENSE
113  
114 Copyright 2003 by David Christensen
115  
116 This library is free software; you can redistribute it and/or modify it
117 under the same terms as Perl itself.
118  
119 =cut
120  
121 4 1;
« lib/Biblio/ILL/ISO/TransactionType.pm ↑ Summary lib/Biblio/ILL/ISO/ILLServiceTypeSequence.pm »