keep from caching subgraph svg
[scpubgit/stemmatology.git] / lib / Text / Tradition / Directory.pm
index 0f7da99..f01d19b 100644 (file)
@@ -23,7 +23,7 @@ Text::Tradition::Directory - a KiokuDB interface for storing and retrieving trad
   );
   
   my $tradition = Text::Tradition->new( @args );
-  my $stemma = $tradition->add_stemma( $dotfile ); 
+  my $stemma = $tradition->add_stemma( dotfile => $dotfile ); 
   $d->save_tradition( $tradition );
   
   foreach my $id ( $d->traditions ) {
@@ -79,10 +79,10 @@ my $t = Text::Tradition->new(
        $uuid = $d->save( $t );
        ok( $uuid, "Saved test tradition" );
        
-       my $s = $t->add_stemma( 't/data/simple.dot' );
+       my $s = $t->add_stemma( dotfile => 't/data/simple.dot' );
        ok( $d->save( $t ), "Updated tradition with stemma" );
        is( $d->tradition( $uuid ), $t, "Correct tradition returned for id" );
-       is( $d->tradition( $uuid )->stemma, $s, "...and it has the correct stemma" );
+       is( $d->tradition( $uuid )->stemma(0), $s, "...and it has the correct stemma" );
        try {
                $d->save( $s );
        } catch( Text::Tradition::Error $e ) {
@@ -107,7 +107,7 @@ is( ref( $nt ), 'Text::Tradition', "Made new tradition" );
        is( scalar $f->tradition_ids, 2, "Directory index has both traditions" );
        my $tf = $f->tradition( $uuid );
        is( $tf->name, $t->name, "Retrieved the tradition from a new directory" );
-       my $sid = $f->object_to_id( $tf->stemma );
+       my $sid = $f->object_to_id( $tf->stemma(0) );
        try {
                $f->tradition( $sid );
        } catch( Text::Tradition::Error $e ) {
@@ -207,4 +207,12 @@ sub throw {
 
 1;
        
-               
\ No newline at end of file
+=head1 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.
+
+=head1 AUTHOR
+
+Tara L Andrews E<lt>aurum@cpan.orgE<gt>