X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FText%2FTradition.pm;h=ce64e1dd307c7f434f3b3c4fdbc2dc747918b5c2;hb=c84a47788777f257a330f9d011c03077e622310e;hp=9a0f8b508e273c3357fd0cd40f9cf010e6f559b8;hpb=10943ab0b79fbd489f6beb3b81a13ed8cbcfafcf;p=scpubgit%2Fstemmatology.git diff --git a/lib/Text/Tradition.pm b/lib/Text/Tradition.pm index 9a0f8b5..ce64e1d 100644 --- a/lib/Text/Tradition.pm +++ b/lib/Text/Tradition.pm @@ -6,6 +6,7 @@ use Moose; use Text::Tradition::Collation; use Text::Tradition::Stemma; use Text::Tradition::Witness; +use Text::Tradition::User; use vars qw( $VERSION ); $VERSION = "0.5"; @@ -54,13 +55,28 @@ has 'stemmata' => ( default => sub { [] }, ); -has 'initialized' => ( +has '_initialized' => ( is => 'ro', isa => 'Bool', default => undef, writer => '_init_done', ); +has 'user' => ( + is => 'rw', + isa => 'Text::Tradition::User', + required => 0, + predicate => 'has_user', + clearer => 'clear_user', + ); + +has 'public' => ( + is => 'rw', + isa => 'Bool', + required => 0, + default => sub { 0; }, + ); + # Create the witness before trying to add it around 'add_witness' => sub { my $orig = shift;