line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Gnats::Command::ADMV; |
2
|
40
|
|
|
40
|
|
28986
|
use parent 'Net::Gnats::Command'; |
|
40
|
|
|
|
|
11371
|
|
|
40
|
|
|
|
|
224
|
|
3
|
40
|
|
|
40
|
|
2397
|
use strictures; |
|
40
|
|
|
|
|
98
|
|
|
40
|
|
|
|
|
239
|
|
4
|
|
|
|
|
|
|
BEGIN { |
5
|
40
|
|
|
40
|
|
9233
|
$Net::Gnats::Command::ADMV::VERSION = '0.22'; |
6
|
|
|
|
|
|
|
} |
7
|
40
|
|
|
40
|
|
199
|
use vars qw($VERSION); |
|
40
|
|
|
|
|
76
|
|
|
40
|
|
|
|
|
1474
|
|
8
|
|
|
|
|
|
|
|
9
|
40
|
|
|
40
|
|
805
|
use Net::Gnats::Constants qw(CODE_INVALID_FIELD_NAME CODE_NO_ADM_ENTRY CODE_INFORMATION); |
|
40
|
|
|
|
|
68
|
|
|
40
|
|
|
|
|
8842
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 NAME |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Net::Gnats::Command::ADMV |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 DESCRIPTION |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Returns an entry from an administrative data file associated with |
18
|
|
|
|
|
|
|
field. key is used to look up the entry in the data file. If |
19
|
|
|
|
|
|
|
subfield is specified, only the value of that subfield is returned; |
20
|
|
|
|
|
|
|
otherwise, all of the fields in the adm data file are returned, |
21
|
|
|
|
|
|
|
separated by colons :. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 RESPONSES |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
The responses are: |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
410 (CODE_INVALID_FIELD_NAME) The specified field does not exist. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
221 (CODE_NO_ADM_ENTRY) An adm entry matching the key was not found, |
30
|
|
|
|
|
|
|
or the field does not have an adm file associated with it. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
350 (CODE_INFORMATION) The normal response; the supplied text is the |
33
|
|
|
|
|
|
|
requested field(s). |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 EXAMPLES |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
my $entry = Net::Gnats::Command::ADMV->new( field => myfield, key => mykey )->as_string; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
my $c = 'ADMV'; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub new { |
44
|
3
|
|
|
3
|
1
|
10
|
my ( $class, %options ) = @_; |
45
|
3
|
100
|
|
|
|
18
|
return bless {}, $class if not %options; |
46
|
1
|
|
|
|
|
3
|
my $self = bless \%options, $class; |
47
|
1
|
|
|
|
|
4
|
return $self; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
1
|
|
|
1
|
0
|
7
|
sub field_name { return shift->{field_name}; } |
51
|
|
|
|
|
|
|
|
52
|
1
|
|
|
1
|
0
|
7
|
sub key { return shift->{key}; } |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub as_string { |
55
|
1
|
|
|
1
|
1
|
2
|
my $self = shift; |
56
|
1
|
|
|
|
|
5
|
return $c . ' ' . $self->field_name . ' ' . $self->key; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |