App::Modular::Module - App::Modular module base class.


App-Modular documentation  | view source Contained in the App-Modular distribution.

Index


NAME

Top

App::Modular::Module - App::Modular module base class.

SYNOPSIS

Top

	#!/usr/bin/perl -w
	use strict;

	package App::Modular::Module::Dummy;

	use modularizer;
	use base qw(App::Modular::Module);

	# a complete do-noting module :-)

	1;

USAGE

Top

See App::Modular (secction 'usage') for an example.

DESCRIPTION

Top

This class should be used as a base class for every modularizer module. It provides some base methods to cleanly initialize and destroy the module. Every

Creating a new module

Top

See the examples in the documentation of App::Modular for details.

REFERENCE

Top

In this section I will describe the standard methods that every single module inheritfs from the master module. The standard aparameters are described, too.

Internal data

Every module that @IS-A App::Modular::Module will be a blessed hash reference. In this hash, you will find some default data, too.

$self->{'module_name'} -> name of Module (= package name without App::Modular::Module::)
$self->{'modularizer'} -> instance of App::Modular

Methods

module_init

Initialize a module (and create a blessed object for it).

Return value: (ref) reference to the module object

module_name

Returns the internal module name.

Return value: (string) name of the current module

modularizer

Returns the reference to the modularizer object.

Return value: (ref) instance of App::Module

DESTROY

The standard destructor for modules (log the destruction, no other action taken).

module_depends

Returns the module dependencies (none by default).

Return value: (array of strings) names of the modules I depend on

AUTHOR and COPYRIGHT

Top

SEE ALSO

Top

App::Modular.pm(3pm)


App-Modular documentation  | view source Contained in the App-Modular distribution.