View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Eric Hacker > Agent-TCLI > Agent::TCLI::Package::UnixBase



Annotate this POD

View/Report Bugs
Module Version: 0.030.0059   Source  


Agent::TCLI::Package::UnixBase - Base class for Agent::TCLI::Package objects accessing other Unix commands.


        use Object::InsideOut qw(Agent::TCLI::Package::UnixBase);


Base class for Packages needing to run other Unix programs. It provides methods to asnychronously call Unix programs using POW::Wheel::Run through POE::Component::Child. This base class comes with simple event handlers to accept the output and/or errors returned from the wheel.

Typically, one may want their subclass to replace the stdout method with one that does more processing of the responses. One should use the methods here as a starting point in such cases.

Commands run through these methods are run in their own processes asychonously. Other Agent processing continues while the results of the commands are captured and returned. Package authors need to ensure that their command threads shut down or else they may exhaust system resources.



The following attributes are accessible through standard accessor/mutator methods unless otherwise noted.


This holds the POE::Component::Child session to use for running command line requests. A package will typically use this attribute in a chain to acceess POE::Component::Child methods. For instance, to run a command one uses:

        my $wheel = $self->child->run('who');

See Agent::TCLI::Package::Base for other attributes applicable to Packages.


These simple methods may be used as is, or subclasses may use them as starting point.


This initializes the POE::Component::Child session. It may be called from a Package's _start routine or the contents may be copied for further modification.


This POE event handler is the default way stdout lines are returned from the child command being run.


This POE event handler is the default way stderr lines are returned from the child command being run.


This POE event handler is the default way errors are returned from the child command being run.


This POE event handler is the default way a child indicates that it is done.


This module is an Object::InsideOut object that inherits from Agent::TCLI::Package::Base. It inherits methods from both. Please refer to their documentation for more details.


Eric Hacker <hacker at>


SHOULDS and MUSTS are currently not enforced.

Test scripts not thorough enough.


Copyright (c) 2007, Alcatel Lucent, All rights resevred.

This package is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: