NAME
PITA::Guest::Storage::Simple - A (relatively) simple Guest Storage object
DESCRIPTION
The PITA::Guest::Storage class provides an API for cataloguing and retrieving Guest images, with all the data stored on the filesystem using the native XML file formats.
PITA::Guest::Storage::Simple implements a very simple version of the PITA::Guest::Storage API.
Guest image location and searching is done the long way, with no indexing.
METHODS
new
my $store = PITA::Guest::Storage::Simple->new(
storage_dir => '/var/PITA-Guest-Storable-Simple',
);
The new
method creates a new simple storage object. It takes a single named param
Returns a PITA::Guest::Storage::Simple
object, or throws an exception on error.
storage_dir
The storage_dir
accessor returns the location of the directory that serves as the root of the data store.
create
my $store = PITA::Guest::Storage::Simple->new(
storage_dir => '/var/PITA-Guest-Storable-Simple',
);
The create
constructor creates a new PITA::Guest::Storage::Simple
repository.
storage_lock
The storage_lock
method takes a lock on the storage_lock
file, creating it if needed (in the create
method case).
It does not wait to take the lock, failing immediately if the lock cannot be taken.
Returns true if the lock is taken, false if the lock cannot be taken, or throws an exception on error.
SUPPORT
Bugs should be reported via the CPAN bug tracker at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=PITA
For other issues, contact the author.
AUTHOR
Adam Kennedy <adamk@cpan.org>
SEE ALSO
PITA::Guest::Storage, PITA, http://ali.as/pita/
COPYRIGHT
Copyright 2005 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.