View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Alceu Rodrigues de Freitas Junior > Siebel-Srvrmgr > Siebel::Srvrmgr::ListParser::OutputFactory



Annotate this POD


View/Report Bugs
Module Version: 0.29   Source  


Siebel::Srvrmgr::ListParser::OutputFactory - abstract factory class to create Siebel::Srvrmgr::ListParser::Output objects


        use Siebel::Srvrmgr::ListParser::OutputFactory;

    my $output = Siebel::Srvrmgr::ListParser::OutputFactory->create(
            data_type => $type,
            raw_data  => \@data,
            cmd_line  => 'list something'

        if (Siebel::Srvrmgr::ListParser::OutputFactory->can_create('weirdo')) ? print "can\n" : print "cannot\n";


This is an abstract factory class to create instances of subclass of Siebel::Srvrmgr::ListParser::Output superclass.

It has the mapping between the types parsed by Siebel::Srvrmgr::ListParser class to the respective class of output. See Siebel::Srvrmgr::ListParser::OutputFactory::table_mapping for the mapping between types and classes.


All methods below are class methods.


Returns the instance of the class defined by the type given as parameter. Expects two parameters: an string with the type of output and an hash reference with the parameters expected by the new method of Siebel::Srvrmgr::ListParser::Output subclasses.

A third, optional parameter, is required if the desired instance is a subclass of Siebel::Srvrmgr::ListParser::Output::Tabular: one must pass a single character as the field separator, if exists in the output to be parsed.

Despite using MooseX::AbstractFactory to implement the Abstract Factory pattern, this method must be invoked instead of create so the class will be able to make additional checkings necessary to define defaults for subclasses of Siebel::Srvrmgr::ListParser::Output::Tabular.


Expects a string as the output type.

Returns true if there is a mapping between the given type and a subclass of Siebel::Srvrmgr::ListParser::Output; otherwise it returns false;


Returns an hash reference with the mapping between the parsed types and subclasses of Siebel::Srvrmgr::ListParser::Ouput.

The values are array references with the partial classes names and a compiled regular expression to validate the command.



Alceu Rodrigues de Freitas Junior, <>.


This software is copyright (c) 2012 of Alceu Rodrigues de Freitas Junior, <>.

This file is part of Siebel Monitoring Tools.

Siebel Monitoring Tools is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Siebel Monitoring Tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Siebel Monitoring Tools. If not, see

syntax highlighting: