ManaTools::Module

Section: User Contributed Perl Documentation (3)
Updated: 2017-07-06
Page Index
 

Attributes - Optional constructor parameters

 

icon

    icon attribute defines the Module icon, override this
    attribute by using
        has '+icon' => (
            ...
        )
    into your module implementation.

 

name

    name attribute defines the Module name, override this
    attribute by using
        has '+name' => (
            ...
        )
    into your module implementation.

 

title

    title attribute defines the Module title, override this
    attribute by using
        has '+title' => (
            ...
        )
    into your module implementation.

 

launch

    launch attribute defines the Module as external command
    to be run, pass this attribute to the "create" to set it.

 

loc

    loc attribute defines localization object that uses "manatools"
    domain as default. (see ManaTools::Shared::Locales for details).
    To use your own Module domain, override this attribute by using
        has '+loc' => (
            ...
        )
    or assign it again to your ManaTools::Shared::Locales object into
    the extension module implementation.

 

logger

    logger attribute defines logging object that uses the loc attribute
    and goes to Syslog. (see ManaTools::Shared::Logging for details).
    You can use this attribute to log various messages:

        $log->D("debugstuff: %s", $somestring);
        $log->I("infostuff: %s", $somestring);
        $log->W("warnstuff: %s", $somestring);
        $log->E("errorstuff: %s", $somestring);

    if you wish to trace (goes to STDERR):

        $log->trace(1);

 

commandline

    commandline attribute defines the given command line, if
    --help is passed help message is shown and the module is not
    loaded.
    See ManaTools::Shared::GUI::CommandLine for details and usage.

 

SUBROUTINES/METHODS

 

create

INPUT

    %params:    moudule extension construtcor parameters
                --CLASS <name> name of the Class module extension name
                in the case of acting as a launcher mandatory parameters
                are name, icon and launch (see Attributes section of
                this manual)

DESCRIPTION

    returns a Module instance, such as a module launcher
    (this object) or an extension of this class

 

BUILD

INPUT

    $self: this object

DESCRIPTION

    The BUILD method is called after a Moose object is created,
    base Module class sets title and icon

 

setButton

INPUT

    $self:   this object
    $button: yui push button to be assigned to this module

DESCRIPTION

    This method assignes a button to this module

 

removeButton

INPUT

    $self: this object

DESCRIPTION

    This method remove the assigned button from this module

 

start

INPUT

    $self: this object

DESCRIPTION

    This method is the base class launcher that runs an external
    module, defined in launch attribute.


 

Index

Attributes - Optional constructor parameters
icon
name
title
launch
loc
logger
commandline
SUBROUTINES/METHODS
create
BUILD
setButton
removeButton
start