| 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 | 4 |  |  | 4 |  | 5904 | use Moose; | 
|  | 4 |  |  |  |  | 10 |  | 
|  | 4 |  |  |  |  | 41 |  | 
| 20 | 4 |  |  | 4 |  | 29081 | use namespace::autoclean; | 
|  | 4 |  |  |  |  | 10 |  | 
|  | 4 |  |  |  |  | 47 |  | 
| 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 ( blessed($item) eq $self->get_exp_output() ) { | 
| 46 |  |  |  |  |  |  |  | 
| 47 |  |  |  |  |  |  | return 1; | 
| 48 |  |  |  |  |  |  |  | 
| 49 |  |  |  |  |  |  | } | 
| 50 |  |  |  |  |  |  | else { | 
| 51 |  |  |  |  |  |  |  | 
| 52 |  |  |  |  |  |  | return 0; | 
| 53 |  |  |  |  |  |  |  | 
| 54 |  |  |  |  |  |  | } | 
| 55 |  |  |  |  |  |  |  | 
| 56 |  |  |  |  |  |  | }; | 
| 57 |  |  |  |  |  |  |  | 
| 58 |  |  |  |  |  |  | override _build_exp_output => sub { | 
| 59 |  |  |  |  |  |  |  | 
| 60 |  |  |  |  |  |  | return 'Siebel::Srvrmgr::ListParser::Output::LoadPreferences'; | 
| 61 |  |  |  |  |  |  |  | 
| 62 |  |  |  |  |  |  | }; | 
| 63 |  |  |  |  |  |  |  | 
| 64 |  |  |  |  |  |  | =pod | 
| 65 |  |  |  |  |  |  |  | 
| 66 |  |  |  |  |  |  | =head1 SEE ALSO | 
| 67 |  |  |  |  |  |  |  | 
| 68 |  |  |  |  |  |  | =over | 
| 69 |  |  |  |  |  |  |  | 
| 70 |  |  |  |  |  |  | =item * | 
| 71 |  |  |  |  |  |  |  | 
| 72 |  |  |  |  |  |  | L<Siebel::Srvrmgr::Daemon> | 
| 73 |  |  |  |  |  |  |  | 
| 74 |  |  |  |  |  |  | =item * | 
| 75 |  |  |  |  |  |  |  | 
| 76 |  |  |  |  |  |  | L<Siebel::Srvrmgr::Daemon::Action> | 
| 77 |  |  |  |  |  |  |  | 
| 78 |  |  |  |  |  |  | =item * | 
| 79 |  |  |  |  |  |  |  | 
| 80 |  |  |  |  |  |  | L<Siebel::Srvrmgr::ListParser::Output::LoadPreferences> | 
| 81 |  |  |  |  |  |  |  | 
| 82 |  |  |  |  |  |  | =back | 
| 83 |  |  |  |  |  |  |  | 
| 84 |  |  |  |  |  |  | =head1 AUTHOR | 
| 85 |  |  |  |  |  |  |  | 
| 86 |  |  |  |  |  |  | Alceu Rodrigues de Freitas Junior, E<lt>arfreitas@cpan.orgE<gt> | 
| 87 |  |  |  |  |  |  |  | 
| 88 |  |  |  |  |  |  | =head1 COPYRIGHT AND LICENSE | 
| 89 |  |  |  |  |  |  |  | 
| 90 |  |  |  |  |  |  | This software is copyright (c) 2012 of Alceu Rodrigues de Freitas Junior, E<lt>arfreitas@cpan.orgE<gt>. | 
| 91 |  |  |  |  |  |  |  | 
| 92 |  |  |  |  |  |  | This file is part of Siebel Monitoring Tools. | 
| 93 |  |  |  |  |  |  |  | 
| 94 |  |  |  |  |  |  | Siebel Monitoring Tools is free software: you can redistribute it and/or modify | 
| 95 |  |  |  |  |  |  | it under the terms of the GNU General Public License as published by | 
| 96 |  |  |  |  |  |  | the Free Software Foundation, either version 3 of the License, or | 
| 97 |  |  |  |  |  |  | (at your option) any later version. | 
| 98 |  |  |  |  |  |  |  | 
| 99 |  |  |  |  |  |  | Siebel Monitoring Tools is distributed in the hope that it will be useful, | 
| 100 |  |  |  |  |  |  | but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| 101 |  |  |  |  |  |  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
| 102 |  |  |  |  |  |  | GNU General Public License for more details. | 
| 103 |  |  |  |  |  |  |  | 
| 104 |  |  |  |  |  |  | You should have received a copy of the GNU General Public License | 
| 105 |  |  |  |  |  |  | along with Siebel Monitoring Tools.  If not, see <http://www.gnu.org/licenses/>. | 
| 106 |  |  |  |  |  |  |  | 
| 107 |  |  |  |  |  |  | =cut | 
| 108 |  |  |  |  |  |  |  | 
| 109 |  |  |  |  |  |  | __PACKAGE__->meta->make_immutable; |