changed interface for Tradition init
Tara L Andrews [Mon, 3 Oct 2011 11:48:41 +0000 (13:48 +0200)]
lib/Text/Tradition/Analysis.pm

index 1de487f..bdae9a5 100644 (file)
@@ -23,15 +23,10 @@ sub run_analysis {
        my $svg;
        my $variants = [];
        
-       # Read in the file and stemma
-       my @lines;
-       open( INFILE, "$file" ) or die "Could not read $file";
-       binmode INFILE, ':utf8';
-       @lines = <INFILE>;
-       close INFILE;
-       
+       # Read in the file and stemma   
        my $tradition = Text::Tradition->new( 
-               'Self' => join( '', @lines ),
+               'input'  => 'Self',
+               'file'   => $file,
                'linear' => 1,
                );
        my $stemma = Text::Tradition::Stemma->new(