line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Gnats::Command::ADMV; |
2
|
40
|
|
|
40
|
|
18560
|
use parent 'Net::Gnats::Command'; |
|
40
|
|
|
|
|
11128
|
|
|
40
|
|
|
|
|
215
|
|
3
|
40
|
|
|
40
|
|
2138
|
use strictures; |
|
40
|
|
|
|
|
56
|
|
|
40
|
|
|
|
|
202
|
|
4
|
|
|
|
|
|
|
BEGIN { |
5
|
40
|
|
|
40
|
|
3310
|
$Net::Gnats::Command::ADMV::VERSION = '0.20'; |
6
|
|
|
|
|
|
|
} |
7
|
40
|
|
|
40
|
|
175
|
use vars qw($VERSION); |
|
40
|
|
|
|
|
47
|
|
|
40
|
|
|
|
|
1498
|
|
8
|
|
|
|
|
|
|
|
9
|
40
|
|
|
40
|
|
495
|
use Net::Gnats::Constants qw(CODE_INVALID_FIELD_NAME CODE_NO_ADM_ENTRY CODE_INFORMATION); |
|
40
|
|
|
|
|
47
|
|
|
40
|
|
|
|
|
7561
|
|
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
|
9
|
my ( $class, %options ) = @_; |
45
|
3
|
100
|
|
|
|
193
|
return bless {}, $class if not %options; |
46
|
1
|
|
|
|
|
5
|
my $self = bless \%options, $class; |
47
|
1
|
|
|
|
|
4
|
return $self; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
1
|
|
|
1
|
0
|
9
|
sub field_name { return shift->{field_name}; } |
51
|
|
|
|
|
|
|
|
52
|
1
|
|
|
1
|
0
|
6
|
sub key { return shift->{key}; } |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub as_string { |
55
|
1
|
|
|
1
|
1
|
2
|
my $self = shift; |
56
|
1
|
|
|
|
|
4
|
return $c . ' ' . $self->field_name . ' ' . $self->key; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |