line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Siebel::Srvrmgr::Daemon::Action::ListCompDef; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=pod |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Siebel::Srvrmgr::Daemon::Action::ListCompDef - subclass of Siebel::Srvrmgr::Daemon::Action to stored parsed list comp def output |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSES |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use Siebel::Srvrmgr:Daemon::Action::ListCompDef; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
$action = $class->new( |
14
|
|
|
|
|
|
|
{ |
15
|
|
|
|
|
|
|
parser => |
16
|
|
|
|
|
|
|
Siebel::Srvrmgr::ListParser->new( { is_warn_enabled => 1 }, |
17
|
|
|
|
|
|
|
params => ['myStorableFile'] |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
$action->do(\@data); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=cut |
24
|
|
|
|
|
|
|
|
25
|
7
|
|
|
7
|
|
14631
|
use namespace::autoclean; |
|
7
|
|
|
|
|
15
|
|
|
7
|
|
|
|
|
78
|
|
26
|
7
|
|
|
7
|
|
691
|
use Moose; |
|
7
|
|
|
|
|
16
|
|
|
7
|
|
|
|
|
68
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
extends 'Siebel::Srvrmgr::Daemon::Action'; |
29
|
|
|
|
|
|
|
with 'Siebel::Srvrmgr::Daemon::Action::Serializable'; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=pod |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 DESCRIPTION |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
This subclass will try to find a L<Siebel::Srvrmgr::ListParser::Output::ListCompDef> object in the given array reference |
36
|
|
|
|
|
|
|
given as parameter to the C<do> method and stores the parsed data from this object C<get_params> method into a file using |
37
|
|
|
|
|
|
|
L<Storable> C<nstore> function. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Inherits all attributes from superclass. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 METHODS |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head2 do_parsed |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
It will test if the object passed as parameter is a L<Siebel::Srvrmgr::ListParser::Output::ListCompDef>. If true, the object found is serialized to the |
48
|
|
|
|
|
|
|
filesystem with C<nstore> and the function returns 1 in this case. If none is found it will return 0. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=cut |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
override 'do_parsed' => sub { |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
my $self = shift; |
55
|
|
|
|
|
|
|
my $obj = shift; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
if ( $obj->isa( $self->get_exp_output() ) ) { |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
$self->store( $obj->get_data_parsed ); |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
return 1; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
else { |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
return 0; |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
}; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
override '_build_exp_output' => sub { |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
return 'Siebel::Srvrmgr::ListParser::Output::Tabular::ListCompDef'; |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
}; |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=pod |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 SEE ALSO |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=over |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=item * |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
L<Siebel::Srvrgmr::Daemon::Action> |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=item * |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
L<Storable> |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=item * |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
L<Siebel::Srvrmgr::ListParser::Output::ListCompDef> |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=item * |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
L<Siebel::Srvrmgr::Daemon::Action::Serializable> |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=back |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head1 AUTHOR |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Alceu Rodrigues de Freitas Junior, E<lt>arfreitas@cpan.org<E<gt> |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
This software is copyright (c) 2012 of Alceu Rodrigues de Freitas Junior, E<lt>arfreitas@cpan.org<E<gt> |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
This file is part of Siebel Monitoring Tools. |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Siebel Monitoring Tools is free software: you can redistribute it and/or modify |
113
|
|
|
|
|
|
|
it under the terms of the GNU General Public License as published by |
114
|
|
|
|
|
|
|
the Free Software Foundation, either version 3 of the License, or |
115
|
|
|
|
|
|
|
(at your option) any later version. |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
Siebel Monitoring Tools is distributed in the hope that it will be useful, |
118
|
|
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
119
|
|
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
120
|
|
|
|
|
|
|
GNU General Public License for more details. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License |
123
|
|
|
|
|
|
|
along with Siebel Monitoring Tools. If not, see <http://www.gnu.org/licenses/>. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=cut |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |