line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Biblio::ILL::ISO::AmountString; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Biblio::ILL::ISO::AmountString |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=cut |
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
23
|
use Biblio::ILL::ISO::ILLASNtype; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
108
|
|
10
|
4
|
|
|
4
|
|
20
|
use Carp; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
405
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 VERSION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Version 0.01 |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
19
|
|
|
|
|
|
|
#--------------------------------------------------------------------------- |
20
|
|
|
|
|
|
|
# Mods |
21
|
|
|
|
|
|
|
# 0.01 - 2003.07.15 - original version |
22
|
|
|
|
|
|
|
#--------------------------------------------------------------------------- |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 DESCRIPTION |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Biblio::ILL::ISO::AmountString is a derivation of Biblio::ILL::ISO::ILLASNtype. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 USES |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
None. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 USED IN |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Biblio::ILL::ISO::Amount |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=cut |
37
|
|
|
|
|
|
|
|
38
|
4
|
|
|
4
|
|
1234
|
BEGIN{@ISA = qw ( Biblio::ILL::ISO::ILLASNtype );} # inherit from ILLASNtype |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 FROM THE ASN DEFINITION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
AmountString ::= PrintableString -- (FROM ("1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"|"0"|" "|"."|",")) |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=cut |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 METHODS |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=cut |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
51
|
|
|
|
|
|
|
# |
52
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
53
|
|
|
|
|
|
|
=head1 |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head2 new( [$string] ) |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Creates a new AmountString object. Expects either no parameters, or |
58
|
|
|
|
|
|
|
a text string. Currently does not implement the character restrictions. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=cut |
61
|
|
|
|
|
|
|
sub new { |
62
|
11
|
|
|
11
|
1
|
19
|
my $class = shift; |
63
|
11
|
|
|
|
|
17
|
my $self = {}; |
64
|
|
|
|
|
|
|
|
65
|
11
|
50
|
|
|
|
26
|
if (@_) { |
66
|
11
|
|
|
|
|
26
|
$self->{"PrintableString"} = shift; |
67
|
|
|
|
|
|
|
} |
68
|
11
|
|
33
|
|
|
59
|
bless($self, ref($class) || $class); |
69
|
11
|
|
|
|
|
35
|
return ($self); |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
73
|
|
|
|
|
|
|
# |
74
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
75
|
|
|
|
|
|
|
=head1 |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head2 set($string) |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Sets the object's PrintableString. Currently does not implement the |
80
|
|
|
|
|
|
|
ASN.1 AmountString character restrictions. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=cut |
83
|
|
|
|
|
|
|
sub set { |
84
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
85
|
|
|
|
|
|
|
|
86
|
0
|
|
|
|
|
0
|
$self->{"PrintableString"} = shift; |
87
|
0
|
|
|
|
|
0
|
return; |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
91
|
|
|
|
|
|
|
# |
92
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
93
|
|
|
|
|
|
|
=head1 |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head2 as_string( ) |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Returns a stringified representation of the object. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=cut |
100
|
|
|
|
|
|
|
sub as_string { |
101
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
102
|
|
|
|
|
|
|
|
103
|
0
|
|
|
|
|
0
|
return $self->{"PrintableString"}; |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
107
|
|
|
|
|
|
|
# |
108
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
109
|
|
|
|
|
|
|
=head1 |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head2 as_pretty_string( ) |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
Returns a more-formatted stringified representation of the object. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=cut |
116
|
|
|
|
|
|
|
sub as_pretty_string { |
117
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
118
|
|
|
|
|
|
|
|
119
|
0
|
|
|
|
|
0
|
return $self->{"PrintableString"} . "\n"; |
120
|
|
|
|
|
|
|
} |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
123
|
|
|
|
|
|
|
# This will return a structure usable by Convert::ASN1 |
124
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
125
|
|
|
|
|
|
|
=head1 |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head2 as_asn( ) |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Returns a structure usable by Convert::ASN1. Generally only called |
130
|
|
|
|
|
|
|
from the parent's as_asn() method (or encode() method for top-level |
131
|
|
|
|
|
|
|
message-type objects). |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=cut |
134
|
|
|
|
|
|
|
sub as_asn { |
135
|
5
|
|
|
5
|
1
|
8
|
my $self = shift; |
136
|
|
|
|
|
|
|
|
137
|
5
|
|
|
|
|
26
|
return $self->{"PrintableString"}; |
138
|
|
|
|
|
|
|
} |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
141
|
|
|
|
|
|
|
# |
142
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
143
|
|
|
|
|
|
|
=head1 |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=head2 from_asn($href) |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
Given a properly formatted hash, builds the object. |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
=cut |
150
|
|
|
|
|
|
|
sub from_asn { |
151
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
152
|
0
|
|
|
|
|
|
my $val = shift; |
153
|
|
|
|
|
|
|
|
154
|
0
|
|
|
|
|
|
$self->{"PrintableString"} = $val; |
155
|
|
|
|
|
|
|
|
156
|
0
|
|
|
|
|
|
return $self; |
157
|
|
|
|
|
|
|
} |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=head1 SEE ALSO |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
See the README for system design notes. |
162
|
|
|
|
|
|
|
See the parent class(es) for other available methods. |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
For more information on Interlibrary Loan standards (ISO 10160/10161), |
165
|
|
|
|
|
|
|
a good place to start is: |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
http://www.nlc-bnc.ca/iso/ill/main.htm |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
=cut |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
=head1 AUTHOR |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
David Christensen, |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
=cut |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
Copyright 2003 by David Christensen |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify it |
183
|
|
|
|
|
|
|
under the same terms as Perl itself. |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
=cut |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
1; |