line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package QualysGuard::Response::TicketList; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
58048
|
use warnings; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
73
|
|
4
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
79
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
12
|
use base qw( QualysGuard::Response ); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
678
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# ============================================================= |
12
|
|
|
|
|
|
|
# - new |
13
|
|
|
|
|
|
|
# ============================================================= |
14
|
|
|
|
|
|
|
sub new { |
15
|
|
|
|
|
|
|
my ( $class, $xml ) = @_; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $self = __PACKAGE__->SUPER::new( $xml ); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
bless $self, $class; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# -- check for QualysGuard function error |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
if ( $self->exists('/REMEDIATION_TICKETS/ERROR') ) { |
24
|
|
|
|
|
|
|
$self->{error_code} = $self->findvalue('/REMEDIATION_TICKETS/ERROR/@number'); |
25
|
|
|
|
|
|
|
$self->{error_text} = $self->getNodeText('/REMEDIATION_TICKETS/ERROR'); |
26
|
|
|
|
|
|
|
$self->{error_text} =~ s/^\s+(.*)\s+$/$1/m; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
return $self; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
# ============================================================= |
34
|
|
|
|
|
|
|
# - is_truncated |
35
|
|
|
|
|
|
|
# ============================================================= |
36
|
|
|
|
|
|
|
sub is_truncated { |
37
|
|
|
|
|
|
|
my $self = shift; |
38
|
|
|
|
|
|
|
return ( $self->exists('/REMEDIATION_TICKETS/TRUNCATION') ) ? 1 : 0; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
# ============================================================= |
44
|
|
|
|
|
|
|
# - get_last_ticket_number |
45
|
|
|
|
|
|
|
# ============================================================= |
46
|
|
|
|
|
|
|
sub get_last_ticket_number { |
47
|
|
|
|
|
|
|
my $self = shift; |
48
|
|
|
|
|
|
|
if ( $self->is_truncated() ) { |
49
|
|
|
|
|
|
|
if ( $self->exists('/REMEDIATION_TICKETS/TRUNCATION/@last') ) { |
50
|
|
|
|
|
|
|
return $self->findvalue('/REMEDIATION_TICKETS/TRUNCATION/@last'); |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
return undef; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
__END__ |