Basicos::Messages - Añade una pila de mensajes a un objeto


NAME

Basicos::Messages - Añade una pila de mensajes a un objeto

__top


SYNOPSIS

    package MyPackage;
    use base qw(Basicos::Base);     # ó cualquier otro que construya clases
    use Basicos::Messages;          # método 'messages' importado
                                    # automáticamente
    package main;
    my $obj = MyPackage->new();
    $obj->messages->push( 'Text message ');

__top


DESCRIPTION

Este módulo permite añadir una pila de mensajes, accesible sólo a través de un método, a una clase que produzca objetos tipo HASH.

__top


SUBROUTINES/METHODS

messages( )

    my  $msgs = $obj->messages();

Devuelve una referencia al objeto 'Basicos::Messages' almacenado en el objeto llamante.

En caso de no existir dicho objeto lo crea bajo una clave especial, formada con el nombre de la clase del objeto contenedor y su propio nombre de clase, al estilo de '__MyPackage_Basicos::Messages', para evitar colisiones.

Es posible acceder a los siguiente métodos con el valor retornado:

push( )

    my @textos = ( ... );
    $obj->messages->push( @textos );

Añade al final de la pila la lista de valores escalares (presumiblemente textos) proporcionada como parámetros.

get( )

    my @messages = $obj->messages->get();

Recupera la lista de mensajes almacenada.

count( )

    my $num = $obj->messages->count();

Devuelve el número de mensajes almacenados.

reset( )

    $obj->messages->reset();

Borra la lista de mensajes almacenados hasta el momento en el objeto.

__top


DIAGNOSTICS

A list of every error and warning message that the module can generate.

__top


CONFIGURATION AND ENVIRONMENT

A full explanation of any configuration system(s) used by the module, including the names and locations of any configuration files, and the meaning of any environment variables or properties that can be set. These descriptions must also include details of any configuration language used.

__top


DEPENDENCIES

A list of all the other modules that this module relies upon, including any restrictions on versions, and an indication of whether these required modules are part of the standard Perl distribution, part of the module's distribution, or must be installed separately.

__top


INCOMPATIBILITIES

A list of any modules that this module cannot be used in conjunction with. This may be due to name conflicts in the interface, or competition for system or program resources, or due to internal limitations of Perl (for example, many modules that use source code filters are mutually incompatible).

__top


BUGS AND LIMITATIONS

There are no known bugs in this module. Please report problems to <Maintainer name(s)> (<contact address>). Patches are welcome.

__top


AUTHOR

Víctor Moral <victor@taquiones.net>, Angel Ortega <angel@triptico.com>

__top


LICENSE AND COPYRIGHT

Copyright (c) 2005 <Venexma Europa, S.L.>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

This program 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.

__top

 Basicos::Messages - Añade una pila de mensajes a un objeto