| 1 | package Biblio::ILL::ISO::ItemType; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | =head1 NAME | ||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | Biblio::ILL::ISO::ItemType | ||||||||||||||||||||
| 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 | 4 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | =head1 VERSION | ||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | Version 0.01 | ||||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | =cut | ||||||||||||||||||||
| 18 | |||||||||||||||||||||
| 19 | 4 | our $VERSION = '0.01'; | |||||||||||||||||||
| 20 | #--------------------------------------------------------------------------- | ||||||||||||||||||||
| 21 | # Mods | ||||||||||||||||||||
| 22 | # 0.01 - 2003.07.15 - original version | ||||||||||||||||||||
| 23 | #--------------------------------------------------------------------------- | ||||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | =head1 DESCRIPTION | ||||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | Biblio::ILL::ISO::ItemType is a derivation of Biblio::ILL::ISO::ENUMERATED. | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | =head1 USES | ||||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | None. | ||||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | =head1 USED IN | ||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | Biblio::ILL::ISO::ItemId | ||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | =cut | ||||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | 4 | ▶ | BEGIN{@ISA = qw ( Biblio::ILL::ISO::ENUMERATED | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 40 | Biblio::ILL::ISO::ILLASNtype );} # inherit from ILLASNtype | ||||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | =head1 FROM THE ASN DEFINITION | ||||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | Item-Type ::= ENUMERATED { | ||||||||||||||||||||
| 45 | monograph (1), | ||||||||||||||||||||
| 46 | serial (2), | ||||||||||||||||||||
| 47 | other (3) | ||||||||||||||||||||
| 48 | } | ||||||||||||||||||||
| 49 | |||||||||||||||||||||
| 50 | =cut | ||||||||||||||||||||
| 51 | |||||||||||||||||||||
| 52 | =head1 METHODS | ||||||||||||||||||||
| 53 | |||||||||||||||||||||
| 54 | =cut | ||||||||||||||||||||
| 55 | #--------------------------------------------------------------- | ||||||||||||||||||||
| 56 | # | ||||||||||||||||||||
| 57 | #--------------------------------------------------------------- | ||||||||||||||||||||
| 58 | =head1 | ||||||||||||||||||||
| 59 | |||||||||||||||||||||
| 60 | =head2 new( $itemtype ) | ||||||||||||||||||||
| 61 | |||||||||||||||||||||
| 62 | Creates a new ItemType object. | ||||||||||||||||||||
| 63 | Valid paramaters are listed in the FROM THE ASN DEFINITION section | ||||||||||||||||||||
| 64 | (e.g. "monograph"). | ||||||||||||||||||||
| 65 | |||||||||||||||||||||
| 66 | =cut | ||||||||||||||||||||
| 67 | 3 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=4 SCAR=14.8
Pod
documented
| |||||||||||||||||||||
| 68 | 3 | my $class = shift; | |||||||||||||||||||
| 69 | 3 | my $self = {}; | |||||||||||||||||||
| 70 | |||||||||||||||||||||
| 71 | 3 | $self->{"ENUM_LIST"} = {"monograph" => 1, | |||||||||||||||||||
| 72 | "serial" => 2, | ||||||||||||||||||||
| 73 | "other" => 3 | ||||||||||||||||||||
| 74 | }; | ||||||||||||||||||||
| 75 | |||||||||||||||||||||
| 76 | 3 | ▶ | if (@_) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 77 | 3 | my $s = shift; | |||||||||||||||||||
| 78 | |||||||||||||||||||||
| 79 | 3 | ▶ | if ( exists $self->{"ENUM_LIST"}->{$s} ) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 80 | 3 | $self->{"ENUMERATED"} = $self->{"ENUM_LIST"}->{$s}; | |||||||||||||||||||
| 81 | } else { | ||||||||||||||||||||
| 82 | 0 | croak "invalid ItemType: [$s]"; | |||||||||||||||||||
| 83 | } | ||||||||||||||||||||
| 84 | } | ||||||||||||||||||||
| 85 | |||||||||||||||||||||
| 86 | 3 | ▶ | 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
| |||||||||||||||||||||
| 87 | 3 | return ($self); | |||||||||||||||||||
| 88 | } | ||||||||||||||||||||
| 89 | |||||||||||||||||||||
| 90 | =head1 SEE ALSO | ||||||||||||||||||||
| 91 | |||||||||||||||||||||
| 92 | See the README for system design notes. | ||||||||||||||||||||
| 93 | See the parent class(es) for other available methods. | ||||||||||||||||||||
| 94 | |||||||||||||||||||||
| 95 | For more information on Interlibrary Loan standards (ISO 10160/10161), | ||||||||||||||||||||
| 96 | a good place to start is: | ||||||||||||||||||||
| 97 | |||||||||||||||||||||
| 98 | http://www.nlc-bnc.ca/iso/ill/main.htm | ||||||||||||||||||||
| 99 | |||||||||||||||||||||
| 100 | =cut | ||||||||||||||||||||
| 101 | |||||||||||||||||||||
| 102 | =head1 AUTHOR | ||||||||||||||||||||
| 103 | |||||||||||||||||||||
| 104 | David Christensen, <DChristensenSPAMLESS@westman.wave.ca> | ||||||||||||||||||||
| 105 | |||||||||||||||||||||
| 106 | =cut | ||||||||||||||||||||
| 107 | |||||||||||||||||||||
| 108 | |||||||||||||||||||||
| 109 | =head1 COPYRIGHT AND LICENSE | ||||||||||||||||||||
| 110 | |||||||||||||||||||||
| 111 | Copyright 2003 by David Christensen | ||||||||||||||||||||
| 112 | |||||||||||||||||||||
| 113 | This library is free software; you can redistribute it and/or modify it | ||||||||||||||||||||
| 114 | under the same terms as Perl itself. | ||||||||||||||||||||
| 115 | |||||||||||||||||||||
| 116 | =cut | ||||||||||||||||||||
| 117 | |||||||||||||||||||||
| 118 | 4 | 1; | |||||||||||||||||||