| 1 | package Biblio::ILL::ISO::ProtocolVersionNum; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | =head1 NAME | ||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | Biblio::ILL::ISO::ProtocolVersionNum | ||||||||||||||||||||
| 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.07.15 - original version | ||||||||||||||||||||
| 24 | #--------------------------------------------------------------------------- | ||||||||||||||||||||
| 25 | |||||||||||||||||||||
| 26 | =head1 DESCRIPTION | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | Biblio::ILL::ISO::ProtocolVersionNum 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::Answer | ||||||||||||||||||||
| 37 | Biblio::ILL::ISO::Cancel | ||||||||||||||||||||
| 38 | Biblio::ILL::ISO::CancelReply | ||||||||||||||||||||
| 39 | Biblio::ILL::ISO::CheckedIn | ||||||||||||||||||||
| 40 | Biblio::ILL::ISO::ConditionalReply | ||||||||||||||||||||
| 41 | Biblio::ILL::ISO::Damaged | ||||||||||||||||||||
| 42 | Biblio::ILL::ISO::Expired | ||||||||||||||||||||
| 43 | Biblio::ILL::ISO::ForwardNotification | ||||||||||||||||||||
| 44 | Biblio::ILL::ISO::Lost | ||||||||||||||||||||
| 45 | Biblio::ILL::ISO::Message | ||||||||||||||||||||
| 46 | Biblio::ILL::ISO::Overdue | ||||||||||||||||||||
| 47 | Biblio::ILL::ISO::Recall | ||||||||||||||||||||
| 48 | Biblio::ILL::ISO::Received | ||||||||||||||||||||
| 49 | Biblio::ILL::ISO::RenewAnswer | ||||||||||||||||||||
| 50 | Biblio::ILL::ISO::Renew | ||||||||||||||||||||
| 51 | Biblio::ILL::ISO::Request | ||||||||||||||||||||
| 52 | Biblio::ILL::ISO::Returned | ||||||||||||||||||||
| 53 | Biblio::ILL::ISO::Shipped | ||||||||||||||||||||
| 54 | Biblio::ILL::ISO::StatusOrErrorReport | ||||||||||||||||||||
| 55 | Biblio::ILL::ISO::StatusQuery | ||||||||||||||||||||
| 56 | |||||||||||||||||||||
| 57 | =cut | ||||||||||||||||||||
| 58 | |||||||||||||||||||||
| 59 | 4 | ▶ | BEGIN{@ISA = qw ( Biblio::ILL::ISO::ENUMERATED | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 60 | Biblio::ILL::ISO::ILLASNtype );} # inherit from ILLASNtype | ||||||||||||||||||||
| 61 | |||||||||||||||||||||
| 62 | =head1 FROM THE ASN DEFINITION | ||||||||||||||||||||
| 63 | |||||||||||||||||||||
| 64 | protocol-version-num [0] IMPLICIT INTEGER, -- { | ||||||||||||||||||||
| 65 | -- version-1 (1), | ||||||||||||||||||||
| 66 | -- version-2 (2) | ||||||||||||||||||||
| 67 | --}, | ||||||||||||||||||||
| 68 | |||||||||||||||||||||
| 69 | =cut | ||||||||||||||||||||
| 70 | |||||||||||||||||||||
| 71 | =head1 METHODS | ||||||||||||||||||||
| 72 | |||||||||||||||||||||
| 73 | =cut | ||||||||||||||||||||
| 74 | |||||||||||||||||||||
| 75 | #--------------------------------------------------------------- | ||||||||||||||||||||
| 76 | # | ||||||||||||||||||||
| 77 | #--------------------------------------------------------------- | ||||||||||||||||||||
| 78 | =head1 | ||||||||||||||||||||
| 79 | |||||||||||||||||||||
| 80 | =head2 new( $condition ) | ||||||||||||||||||||
| 81 | |||||||||||||||||||||
| 82 | Creates a new ProtocolVersionNum object. | ||||||||||||||||||||
| 83 | Valid paramaters are listed in the FROM THE ASN DEFINITION section | ||||||||||||||||||||
| 84 | (e.g. "version-1"). | ||||||||||||||||||||
| 85 | |||||||||||||||||||||
| 86 | =cut | ||||||||||||||||||||
| 87 | 20 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=4 SCAR=14.8
Pod
documented
| |||||||||||||||||||||
| 88 | 20 | my $class = shift; | |||||||||||||||||||
| 89 | 20 | my $self = {}; | |||||||||||||||||||
| 90 | |||||||||||||||||||||
| 91 | 20 | $self->{"ENUM_LIST"} = {"version-1" => 1, | |||||||||||||||||||
| 92 | "version-2" => 2 | ||||||||||||||||||||
| 93 | }; | ||||||||||||||||||||
| 94 | |||||||||||||||||||||
| 95 | 20 | ▶ | if (@_) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 96 | 20 | my $s = shift; | |||||||||||||||||||
| 97 | |||||||||||||||||||||
| 98 | 20 | ▶ | if ( exists $self->{"ENUM_LIST"}->{$s} ) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 99 | 20 | $self->{"ENUMERATED"} = $self->{"ENUM_LIST"}->{$s}; | |||||||||||||||||||
| 100 | } else { | ||||||||||||||||||||
| 101 | 0 | croak "invalid ProtocolVersionNum: [$s]"; | |||||||||||||||||||
| 102 | } | ||||||||||||||||||||
| 103 | } | ||||||||||||||||||||
| 104 | |||||||||||||||||||||
| 105 | 20 | ▶ | 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
| |||||||||||||||||||||
| 106 | 20 | 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, <DChristensenSPAMLESS@westman.wave.ca> | ||||||||||||||||||||
| 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 | 4 | 1; | |||||||||||||||||||
| 138 | |||||||||||||||||||||