1 package Text::Tradition::Witness;
4 # Sigil. Required identifier for a witness.
10 # Text. This might be an array of strings, but it might also be an
11 # array of graph nodes.
17 # File. This is where we read in the witness, if not from a
18 # pre-prepared collation.
26 if( $self->has_file ) {
27 # Read the file and initialize the text.
28 open( WITNESS, $self->file ) or die "Could not open "
29 . $self->file . "for reading";
30 # TODO support TEI as well as plaintext, sometime
34 push( @words, split( /\s+/, $_ ) );
37 $self->text( @words );
42 __PACKAGE__->meta->make_immutable;