NAME
Text::Tradition::Directory - a KiokuDB interface for storing and retrieving traditions
SYNOPSIS
use Text::Tradition::Directory;
my $d = Text::Tradition::Directory->new(
'dsn' => 'dbi:SQLite:mytraditions.db',
'extra_args' => { 'create' => 1 },
);
my $tradition = Text::Tradition->new( @args );
my $stemma = $tradition->add_stemma( dotfile => $dotfile );
$d->save_tradition( $tradition );
foreach my $id ( $d->traditions ) {
print $d->tradition( $id )->name;
}
DESCRIPTION
Text::Tradition::Directory is an interface for storing and retrieving text traditions and all their data, including an associated stemma hypothesis. It is an instantiation of a KiokuDB::Model, storing traditions and associated stemmas by UUID.
METHODS
new
Returns a Directory object.
traditionlist
Returns a hashref mapping of ID => name for all traditions in the directory.
tradition( $id )
Returns the Text::Tradition object of the given ID.
save( $tradition )
Writes the given tradition to the database, returning its ID.
delete( $tradition )
Deletes the given tradition object from the database. WARNING!! Garbage collection does not yet work. Use this sparingly.
LICENSE
This package is free software and is provided "as is" without express or implied warranty. You can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Tara L Andrews <aurum@cpan.org>