NAME

FusionInventory::Agent::Storage - the light data storage API. Data will be stored in a subdirectory in the 'vardir' directory. This subdirectory depends on the caller module name.

SYNOPSIS

my $storage = FusionInventory::Agent::Storage->new({
    target => {
        vardir => $ARGV[0],
    }
});
my $data = $storage->restore({
        module => "FusionInventory::Agent"
    });

$data->{foo} = 'bar';

$storage->save({ data => $data });

DESCRIPTION

This module is a wrapper for restore and save. it called $inventory in general.

new({ config => $config, target => $target })

Create the object

save({ data => $date, idx => $ref })

Save the reference. $idx is an integer. You can use it if you want to save more than one file for the module. This number will be added at the of the file.

restore({ module => $module, idx => $idx})

Returns a reference to the stored data. If $idx is defined, it will open this substorage.

remove({ module => $module, idx => $idx })

Returns the files stored on the filesystem for the module $module or for the caller module. If $idx is defined, only the submodule $idx will be removed.

removeAll({ module => $module, idx => $idx })

Deletes the files stored on the filesystem for the module $module or for the caller module.

removeSubDumps({ module => $module })

Deletes the sub files stored on the filesystem for the module $module or for the caller module.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 40:

=over without closing =back