Stop polluting test output with STDERR
[scpubgit/stemmatology.git] / lib / Text / Tradition / Parser / TEI.pm
index fa29702..9b9088e 100644 (file)
@@ -172,13 +172,13 @@ sub parse {
             foreach my $rdg ( @uncorrected ) {
                 my $has_base = grep { $_ eq $sig } $c->reading_witnesses( $rdg );
                 if( $rdg ne $c->start && !$has_base ) {
-                    print STDERR sprintf( "Adding path %s from %s -> %s\n",
-                        $sig.$c->ac_label, $source->id, $rdg->id );
+                    # print STDERR sprintf( "Adding path %s from %s -> %s\n",
+                    #     $sig.$c->ac_label, $source->id, $rdg->id );
                     $c->add_path( $source, $rdg, $sig.$c->ac_label );
                 }
                 $source = $rdg;
             }
-            print STDERR "Adding a.c. version for witness $sig\n";
+            # print STDERR "Adding a.c. version for witness $sig\n";
             $tradition->witness( $sig )->is_layered( 1 );
         }
     }
@@ -200,7 +200,7 @@ sub _clean_sequence {
             my $app_id = $1;
             if( exists $app_ac->{$wit} &&
                 exists $app_ac->{$wit}->{$app_id} ) {
-                print STDERR "Retaining empty placeholder for $app_id\n";
+                # print STDERR "Retaining empty placeholder for $app_id\n";
                 push( @clean_sequence, $rdg );
             }
         } else {
@@ -364,7 +364,6 @@ sub _return_rdg {
                 foreach my $sig ( keys %$text ) {
                     next if $active_wits{$sig};
                     my $l = $tradition->collation->add_reading( {
-                       'collation' => $tradition->collation,
                        'id' => $current_app . "_$i",
                        'is_lacuna' => 1 } );
                     $i++;
@@ -380,7 +379,6 @@ sub _return_rdg {
                 foreach my $i ( 0 .. $#cur_wits ) {
                     my $w = $cur_wits[$i];
                     my $l = $tradition->collation->add_reading( {
-                       'collation' => $tradition->collation,
                        'id' => $current_app . "_$i",
                        'is_lacuna' => 1 } );
                     push( @{$text->{$w}}, $l );
@@ -472,8 +470,7 @@ sub _get_sigla {
             }
         }
         my $rdg = $graph->add_reading(
-               { 'collation' => $graph,
-                 'id' => $xml_id,
+               { 'id' => $xml_id,
                  'text' => $word }
                );
         $used_nodeids{$xml_id} = $rdg;