X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FText%2FTradition%2FParser%2FKUL.pm;h=0469be6ba16e2fc495e5b029afe9c01b286fa81a;hb=dfc37e3886452920c1332a045f9102ce29457af1;hp=05c3a1252138cd7f977a680869d666ad10ee8d51;hpb=3bc0cd189b8f6d8182fe009614993805c56deaf6;p=scpubgit%2Fstemmatology.git diff --git a/lib/Text/Tradition/Parser/KUL.pm b/lib/Text/Tradition/Parser/KUL.pm index 05c3a12..0469be6 100644 --- a/lib/Text/Tradition/Parser/KUL.pm +++ b/lib/Text/Tradition/Parser/KUL.pm @@ -3,7 +3,7 @@ package Text::Tradition::Parser::KUL; use strict; use warnings; use Storable qw /dclone/; -use Text::CSV::Simple; +use Text::CSV::Simple; # TODO convert to CSV_XS =head1 NAME @@ -29,11 +29,11 @@ merged with a base text. =cut sub read { - my( $csv_file ) = @_; + my( $opts ) = @_; my $parser = Text::CSV::Simple->new(); my @fields = qw/ reference text variant type context non_corr non_indep length total origin /; - my @lines = $parser->read_file( $ARGV[0] ); + my @lines = $parser->read_file( $opts->{'file'} ); my @labels = @{shift( @lines )}; push( @fields, @labels[10..$#labels] );