use vars qw( %tags );
use JSON;
use Moose;
-use Moose::Util::TypeConstraints;
+use Text::Tradition::Datatypes;
use Text::TEI::Markup qw( word_tag_wrap );
use TryCatch;
-use XML::Easy::Syntax qw( $xml10_name_rx );
=head1 NAME
is( ref( $ptwit ), 'Text::Tradition::Witness', 'Created a witness' );
if( $ptwit ) {
is( $ptwit->sigil, 'A', "Witness has correct sigil" );
+ $c->make_witness_path( $ptwit );
is( $c->path_text( $ptwit->sigil ), $str, "Witness has correct text" );
}
# Enable plugin(s) if available
eval { with 'Text::Tradition::WitLanguage'; };
-subtype 'SourceType',
- as 'Str',
- where { $_ =~ /^(xmldesc|plaintext|json|collation)$/ },
- message { 'Source type must be one of xmldesc, plaintext, json, collation' };
-
-subtype 'Sigil',
- as 'Str',
- where { $_ =~ /\A$xml10_name_rx\z/ },
- message { 'Sigil must be a valid XML attribute string' };
-
-no Moose::Util::TypeConstraints;
-
has 'tradition' => (
- 'is' => 'ro',
- 'isa' => 'Text::Tradition',
- 'required' => 1,
- weak_ref => 1
+ is => 'ro',
+ isa => 'Text::Tradition',
+ required => 1,
+ weak_ref => 1
);
# Sigil. Required identifier for a witness, but may be found inside
'name' => $self->identifier,
};
if( $self->is_layered ) {
- my @lwlist = map { { 't' => $_ || '' } } @{$self->uncorrected};
+ my @lwlist = map { { 't' => $_ || '' } } @{$self->layertext};
$obj->{'layertokens'} = \@lwlist;
}
return $obj;