Name

File::DataClass::Storage - Storage base class

Version

0.10.$Revision: 380 $

Synopsis

Description

Storage base class

Subroutines/Methods

delete

$bool = $storage->delete( $path, $result );

Deletes the specified element object returning true if successful. Throws an error otherwise. Path is an instance of File::DataClass::IO

dump

$data = $storage->dump( $path, $data );

Dumps the data to the specified path. Path is an instance of File::DataClass::IO

extensions

$hash_ref = $storage->extensions;

Returns a hash ref whose keys are the supported extensions and whose values are an array ref of storage subclasses that implement reading/writing files with that extension

insert

$bool = $storage->insert( $path, $result );

Inserts the specified element object returning true if successful. Throws an error otherwise. Path is an instance of File::DataClass::IO

load

$hash_ref = $storage->load( @paths );

Loads each of the specified files merging the resultant hash ref which it returns. Paths are instances of File::DataClass::IO

select

$hash_ref = $storage->select( $path );

Returns a hash ref containing all the elements of the type specified in the schema. Path is an instance of File::DataClass::IO

txn_do

Executes the supplied coderef wrapped in lock on the pathname

update

$bool = $storage->update( $path, $result, $updating, $condition );

Updates the specified element object returning true if successful. Throws an error otherwise. Path is an instance of File::DataClass::IO

validate_params

_merge_hash_data

$self->_merge_hash_data( $existsing, $new );

Uses Hash::Merge to merge data from the new hash ref in with the existsing

Diagnostics

None

Configuration and Environment

None

Dependencies

File::DataClass::HashMerge
File::DataClass::Util
Hash::Merge
Scalar::Util

Incompatibilities

There are no known incompatibilities in this module

Bugs and Limitations

There are no known bugs in this module. Please report problems to the address below. Patches are welcome

Author

Peter Flanigan, <Support at RoxSoft.co.uk>

License and Copyright

Copyright (c) 2012 Peter Flanigan. All rights reserved

This program 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 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE