Siebel-Srvrmgr
view release on metacpan or search on metacpan
lib/Siebel/Srvrmgr/ListParser.pm view on Meta::CPAN
package Siebel::Srvrmgr::ListParser;
=pod
=head1 NAME
Siebel::Srvrmgr::ListParser - state model parser to idenfity which output type was read
=head1 SYNOPSIS
use Siebel::Srvrmgr::ListParser;
my $parser = Siebel::Srvrmgr::ListParser->new({ prompt_regex => $some_prompt });
=cut
use Moose;
use Siebel::Srvrmgr::ListParser::OutputFactory;
use Siebel::Srvrmgr::ListParser::Buffer;
use Siebel::Srvrmgr;
use Siebel::Srvrmgr::ListParser::FSA;
use namespace::autoclean 0.13;
use Carp;
use Siebel::Srvrmgr::Types;
use String::BOM 0.3 qw(string_has_bom strip_bom_from_string);
our $VERSION = '0.29'; # VERSION
=pod
=head1 DESCRIPTION
Siebel::Srvrmgr::ListParser is a state machine parser created to parse output of "list" commands executed through C<srvrmgr> program.
The parser can identify different types of commands and their outputs from a buffer given as parameter to the module. For each
type of output identified an L<Siebel::Srvrmgr::ListParser::Buffer> object will be created, identifying which type of command
was executed and the raw information from it.
At the end of information read from the buffer, this class will call L<Siebel::Srvrmgr::ListParser::OutputFactory> to create
specific L<Siebel::Srvrmgr::ListParser::Output> objects based on the identified type of Buffer object. Each of this objects will
parse the raw output and populate attributes based on this information. After this is easier to obtain the information from
those subclasses of L<Siebel::Srvrmgr::ListParser::Output>.
Siebel::Srvrmgr::ListParser expects to receive output from C<srvrmgr> program in an specific format and is able to idenfity a
limited number of commands and their outputs, raising an exception when those types cannot be identified. See subclasses
of L<Siebel::Srvrmgr::ListParser::Output> to see which classes/types are available.
Logging of this class can be enabled by using L<Siebel::Srvrmgr> logging feature.
=head2 Features
Currently, this class can parse the output of the following Siebel Server Manager commands:
=over
=item *
load preferences
=item *
list comp
=item *
list compdef
=item *
list comp type
=item *
list params
=item *
list server
=item *
list session
=item *
( run in 1.779 second using v1.01-cache-2.11-cpan-364913b4093 )