remove analysis tests from CPAN module too
[scpubgit/stemmatology.git] / lib / Text / Tradition.pm
index 8801e30..20f33e1 100644 (file)
@@ -7,7 +7,7 @@ use Text::Tradition::Stemma;
 use Text::Tradition::Witness;
 
 use vars qw( $VERSION );
-$VERSION = "0.1";
+$VERSION = "0.3";
 
 has 'collation' => (
     is => 'ro',
@@ -34,16 +34,22 @@ has 'name' => (
     default => 'Tradition',
     );
     
+has 'language' => (
+       is => 'ro',
+       isa => 'Str',
+       );
+    
 has 'stemmata' => (
        traits => ['Array'],
        isa => 'ArrayRef[Text::Tradition::Stemma]',
        handles => {
-               all_stemmata => 'elements',
+               stemmata => 'elements',
                _add_stemma => 'push',
                stemma => 'get',
                stemma_count => 'count',
                clear_stemmata => 'clear',
        },
+       default => sub { [] },
        );
   
 # Create the witness before trying to add it
@@ -306,6 +312,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" );