NAME

Agent::TCLI::Package::Base - Base object for other Agent::TCLI::Package objects

SYNOPSIS

Base object for Commands. May be used directly in a command collection or may be extended for special functionality. Note that the Control and Library will not recognize any class extension without also being modified.

DESCRIPTION

This needs much more elaboration. For now, please use the source of existing command packages. I apologize for the inconvenience.

INTERFACE

ATTRIBUTES

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

name

The name of the package. This is the word that is used to refer to the package POE::Session. name should only contain SCALAR type values.

commands

An array of the command objects in this package.

parameters

A hash of the parameters used in this package. Often parameters are shared accross individual commands, so they are defined within the Package. They are refered to by each command in the package. parameters should only contain hash values.

controls

A hash of hashes keyed on control for storing stuff.

requests

A hash collection of requests that are in progress

wheels

A hash of wheels keyed on wheel ID. wheels values should only be POE::Wheels.

METHODS

Most of these methods are for internal use within the TCLI system and may be of interest only to developers trying to enhance TCLI.

_start

This POE event handler is called when POE starts up a Package. The _start method is :Cumulative within OIO. Ideally, most command packages could use this Base _start method without implementing their own. However there seems to be a race condition between the POE initialization and the OIO object initialization. Until this is debugged one will probably have to have this _start method in every package.

_shutdown

This POE event handler is used to initiate a shutdown of the Package. The _shutdown method is :Cumulative within OIO. Most command packages can probably just use this Base _shutown method without implementing their own.

_stop

This POE event handler is called when POE stops a Package. The _stop method is :Cumulative within OIO.

_child

Just a placeholder that does nothing but collect unhandled child events to keep them out of default.

establish_context

This POE event handler is the primary way to set context with a command. Just about any command that has subcommands will use this method as it's handler. An exception would be a command that sets an single handler to process all subcoammnds/args using the 'A*' context. See the Eliza package for an example of how to establish that type of context.

show

This POE event handler is the default show for packages. It will accept an argument for the setting to show. It will also take an argument of all or * and show all settings.

The parameter must be defined in the command entry's parameters or it will not be shown. There must also be a OIO Field defined with the same name. One may write their own show method if this is not sufficient.

settings

This POE event handler executes the set commands.

AUTHOR

Eric Hacker <hacker at cpan.org>

BUGS

SHOULDS and MUSTS are currently not enforced.

Test scripts not thorough enough.

Probably many others.

LICENSE

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.