File Coverage

blib/lib/Siebel/Srvrmgr/Daemon/Action/LoadPreferences.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package Siebel::Srvrmgr::Daemon::Action::LoadPreferences;
2              
3             =pod
4              
5             =head1 NAME
6              
7             Siebel::Srvrmgr::Daemon::Action::LoadPreferences - dummy subclass of Siebel::Srvrmgr::Daemon::Action to allow execution of load preferences command
8              
9             =head1 SYNOPSIS
10              
11             use Siebel::Srvrmgr::Daemon::Action::LoadPreferences;
12              
13             my $action = Siebel::Srvrmgr::Daemon::Action::LoadPreferences->new(parser => Siebel::Srvrmgr::ListParser->new());
14              
15             $action->do(\@output);
16              
17             =cut
18              
19 5     5   6028 use Moose;
  5         8  
  5         39  
20 5     5   26938 use namespace::autoclean;
  5         10  
  5         43  
21              
22             extends 'Siebel::Srvrmgr::Daemon::Action';
23              
24             =head1 DESCRIPTION
25              
26             The only usage for this class is to allow execution of C<load preferences> command by a L<Siebel::Srvrmgr::Daemon> object, allowing the execution
27             and parsing of the output of the command to be executed in the regular cycle of processing.
28              
29             Executing C<load preferences> is particullary useful for setting the correct columns and sizing of output of commands like C<list comp>.
30              
31             =head1 METHODS
32              
33             =head2 do_parsed
34              
35             It checks if the given object as parameter is a L<Siebel::Srvrmgr::ListParser::Output::LoadPreferences> object. If true it returns true, otherwise
36             returns false.
37              
38             =cut
39              
40             override 'do_parsed' => sub {
41              
42             my $self = shift;
43             my $item = shift;
44              
45             if ( $item->isa('Siebel::Srvrmgr::ListParser::Output::LoadPreferences') ) {
46              
47             return 1;
48              
49             }
50             else {
51              
52             return 0;
53              
54             }
55              
56             };
57              
58             =pod
59              
60             =head1 SEE ALSO
61              
62             =over 3
63              
64             =item *
65              
66             L<Siebel::Srvrmgr::Daemon>
67              
68             =item *
69              
70             L<Siebel::Srvrmgr::Daemon::Action>
71              
72             =item *
73              
74             L<Siebel::Srvrmgr::ListParser::Output::LoadPreferences>
75              
76             =back
77              
78             =head1 AUTHOR
79              
80             Alceu Rodrigues de Freitas Junior, E<lt>arfreitas@cpan.org<E<gt>
81              
82             =head1 COPYRIGHT AND LICENSE
83              
84             This software is copyright (c) 2012 of Alceu Rodrigues de Freitas Junior, E<lt>arfreitas@cpan.org<E<gt>
85              
86             This file is part of Siebel Monitoring Tools.
87              
88             Siebel Monitoring Tools is free software: you can redistribute it and/or modify
89             it under the terms of the GNU General Public License as published by
90             the Free Software Foundation, either version 3 of the License, or
91             (at your option) any later version.
92              
93             Siebel Monitoring Tools is distributed in the hope that it will be useful,
94             but WITHOUT ANY WARRANTY; without even the implied warranty of
95             MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
96             GNU General Public License for more details.
97              
98             You should have received a copy of the GNU General Public License
99             along with Siebel Monitoring Tools. If not, see <http://www.gnu.org/licenses/>.
100              
101             =cut
102              
103             __PACKAGE__->meta->make_immutable;