Basicos::Spool::Item


SYNOPSIS

    use Basicos::Spool::Item;
    my $item = Basicos::Spool::Item->new( 
                    spool   =>  $spool_ref,
                    id      =>  $sequence_number,
                    path    =>  $file_extension
                    );
    $item->save( $this_is_my_data );

__top


DESCRIPTION

Este módulo permite un acceso organizado a un elemento de una cola de trabajos. Depende fuertemente de the Basicos::Spool manpage ó un objeto con un interfaz equivalente.

__top


SUBRUTINES/METHODS

new( )

Crea un objeto nuevo sin efectuar ninguna operación sobre archivos.

Puede/debe recibir los siguientes parámetros:

spool

Referencia a un objeto the Basicos::Spool manpage ó equivalente.

id

Identificador único dentro de la cola; generalmente se usa el número de secuencia dentro de la cola (mediante seq in the Basicos::Spool manpage).

path

Extensión para el archivo ó ruta absoluta al mismo si comienza por el directorio raíz (/).

open( )

    my $fh = $item->open('>');

Abre el archivo de datos asociado al objeto en el modo especificado y retorna un objeto the IO::File manpage. Por defecto éste modo es de escritura (>).

save( )

    my $data = "...";
    $item->save( $data );

Abre para escritura el archivo asociado al elemento y guarda en él el valor escalar recibido.

__top


DIAGNOSTICS

could not open ...

Fallo en la apertura del archivo de datos en el método save.

__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


LICENCE AND COPYRIGHT

Copyright (c) 2006 <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::Spool::Item