NAME

Puma::State::DDState - A stateful hash object implemented using Data::Dumper


SYNOPSIS

 use Puma::State::DDState;
 my $dds = new Puma::State::DDState(
    Location => 'dir',
    Context  => 'filename',
    UID      => 'ext'
 );
 $dds->{data} = 'Hello world!';
 $dds->save;
 $dds->load;


DESCRIPTION

The Puma::State::DDState object is an implementation of Puma::State::Core object that uses Data::Dumper to serialize the it's data and stores the data on the local filesystem.


METHODS

new(Location => DIRECTORY, Context => FILENAME, UID => EXTENSION)

The constructor is directly inherited from Puma::State::Core. The object is saved to the file DIRECTORY/FILENAME.EXTENSION.

$obj->load

Loads the stateful object from the filesystem (if it exists).

$obj->save

Saves the stateful object to the filesystem (if it exists). If the directory path does not exist, the object will not be saved and the method will quietly fail.

$obj->filename

Returns the filename for the object.


SEE ALSO

Puma::State::Core(3), Data::Dumper(3)


COPYRIGHT

Copyright (c) 2001, 2002 by Ingmar Ellenberger.

Distributed under The Artistic License. For the text of this license, see http://puma.site42.com/license.psp or read the file LICENSE in the root of the distribution.