| 1 | package Biblio::ILL::ISO::CurrentState; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | =head1 NAME | ||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | Biblio::ILL::ISO::CurrentState | ||||||||||||||||||||
| 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.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 | ▶ | 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 | 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 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=4 SCAR=14.8
Pod
documented
| |||||||||||||||||||||
| 87 | 2 | my $class = shift; | |||||||||||||||||||
| 88 | 2 | my $self = {}; | |||||||||||||||||||
| 89 | |||||||||||||||||||||
| 90 | 2 | $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 | ▶ | if (@_) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 111 | 2 | my $s = shift; | |||||||||||||||||||
| 112 | |||||||||||||||||||||
| 113 | 2 | ▶ | if ( exists $self->{"ENUM_LIST"}->{$s} ) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 114 | 2 | $self->{"ENUMERATED"} = $self->{"ENUM_LIST"}->{$s}; | |||||||||||||||||||
| 115 | } else { | ||||||||||||||||||||
| 116 | 0 | croak "invalid CurrentState type: [$s]"; | |||||||||||||||||||
| 117 | } | ||||||||||||||||||||
| 118 | } | ||||||||||||||||||||
| 119 | |||||||||||||||||||||
| 120 | 2 | ▶ | bless($self, ref($class) || $class); | ||||||||||||||||||
|
Condition33%1/3
ref $class || $class
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table33%1/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||
| 121 | 2 | 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, <DChristensenSPAMLESS@westman.wave.ca> | ||||||||||||||||||||
| 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 | 4 | 1; | |||||||||||||||||||