X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FText%2FTradition.pm;h=8bed34db1af8ab5b576d1776a39304e52e96114c;hb=b365fbaeead920ab613f87b331a393e72c5d033e;hp=8801e30542ac86c7b102e4fd66e97567cc65172c;hpb=e0d617e67dccc575f17f29b833b7327a1dd5d92a;p=scpubgit%2Fstemmatology.git diff --git a/lib/Text/Tradition.pm b/lib/Text/Tradition.pm index 8801e30..8bed34d 100644 --- a/lib/Text/Tradition.pm +++ b/lib/Text/Tradition.pm @@ -44,6 +44,7 @@ has 'stemmata' => ( stemma_count => 'count', clear_stemmata => 'clear', }, + default => sub { [] }, ); # Create the witness before trying to add it @@ -306,6 +307,7 @@ my $t = Text::Tradition->new( 'file' => 't/data/simple.txt', ); +is( $t->stemma_count, 0, "No stemmas added yet" ); my $s; ok( $s = $t->add_stemma( dotfile => 't/data/simple.dot' ), "Added a simple stemma" ); is( ref( $s ), 'Text::Tradition::Stemma', "Got a stemma object returned" );