line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Gnats::Command::FTYPINFO; |
2
|
40
|
|
|
40
|
|
199
|
use parent 'Net::Gnats::Command'; |
|
40
|
|
|
|
|
73
|
|
|
40
|
|
|
|
|
212
|
|
3
|
40
|
|
|
40
|
|
2127
|
use strictures; |
|
40
|
|
|
|
|
76
|
|
|
40
|
|
|
|
|
217
|
|
4
|
|
|
|
|
|
|
BEGIN { |
5
|
40
|
|
|
40
|
|
8748
|
$Net::Gnats::Command::FTYPINFO::VERSION = '0.22'; |
6
|
|
|
|
|
|
|
} |
7
|
40
|
|
|
40
|
|
243
|
use vars qw($VERSION); |
|
40
|
|
|
|
|
67
|
|
|
40
|
|
|
|
|
1468
|
|
8
|
|
|
|
|
|
|
|
9
|
40
|
|
|
40
|
|
222
|
use Net::Gnats::Constants qw(CODE_INFORMATION CODE_INVALID_FTYPE_PROPERTY); |
|
40
|
|
|
|
|
77
|
|
|
40
|
|
|
|
|
10087
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 NAME |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Net::Gnats::Command::FTYPINFO |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 DESCRIPTION |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Provides field-type-related information. Currently, only the |
18
|
|
|
|
|
|
|
property separators for MultiEnum fields is supported. When |
19
|
|
|
|
|
|
|
separators is specified, the possible return codes are: |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 PROTOCOL |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
FTYPINFO [field] [property] |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 RESPONSES |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
350 (CODE_INFORMATION) |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
A proper MultiEnum field was specified and the returned text is the |
30
|
|
|
|
|
|
|
string of separators specified for the field in the dbconfig file |
31
|
|
|
|
|
|
|
(see Field datatypes) quoted in ''s. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
435 (CODE_INVALID_FTYPE_PROPERTY) |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
The separators property is not defined for this field, i.e. the |
36
|
|
|
|
|
|
|
specified field is not of type MultiEnum. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Currently, specifying a different property than separators results |
39
|
|
|
|
|
|
|
in return code 435 as above. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=cut |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
my $c = 'FTYPINFO'; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub new { |
47
|
3
|
|
|
3
|
1
|
9
|
my ( $class, %options ) = @_; |
48
|
3
|
|
|
|
|
5
|
my $self = bless \%options, $class; |
49
|
3
|
50
|
|
|
|
14
|
$self->{property} = 'separators' if not defined $self->{property}; |
50
|
3
|
|
|
|
|
8
|
return $self; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub as_string { |
54
|
9
|
|
|
9
|
1
|
11
|
my $self = shift; |
55
|
9
|
100
|
|
|
|
27
|
return undef if not defined $self->{field}; |
56
|
8
|
50
|
|
|
|
18
|
return undef if not defined $self->{property}; |
57
|
8
|
|
|
|
|
33
|
return $c . ' ' . $self->{field} . ' ' . $self->{property}; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub is_ok { |
61
|
3
|
|
|
3
|
0
|
4
|
my $self = shift; |
62
|
3
|
100
|
|
|
|
10
|
return 0 if not defined $self->response; |
63
|
2
|
50
|
|
|
|
6
|
return 1 if $self->response->code eq CODE_INFORMATION; |
64
|
0
|
|
|
|
|
|
return 0; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
1; |