diff options
author | dakkar <dakkar@thenautilus.net> | 2010-12-02 20:49:22 +0000 |
---|---|---|
committer | dakkar <dakkar@thenautilus.net> | 2010-12-02 20:49:22 +0000 |
commit | b66368ad64ceb4d30c79d079895199cf51301af4 (patch) | |
tree | ed810f1af1e58711bfebf8450bc6cd1a262a180d /lib/GridFiller/Result.pm | |
parent | scaler, and __DATA__ (diff) | |
download | qr-builder-b66368ad64ceb4d30c79d079895199cf51301af4.tar.gz qr-builder-b66368ad64ceb4d30c79d079895199cf51301af4.tar.bz2 qr-builder-b66368ad64ceb4d30c79d079895199cf51301af4.zip |
mutable objects, all status in attributes
Diffstat (limited to 'lib/GridFiller/Result.pm')
-rw-r--r-- | lib/GridFiller/Result.pm | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/GridFiller/Result.pm b/lib/GridFiller/Result.pm index d0e6684..3a2a505 100644 --- a/lib/GridFiller/Result.pm +++ b/lib/GridFiller/Result.pm @@ -10,17 +10,23 @@ with 'MooseX::Log::Log4perl'; has leftover_words => ( isa => WordListT, is => 'ro', - default => sub { [ ] }, traits => ['Array'], handles => { mark_leftover => 'push', }, + lazy_build => 1, + clearer => '_reset_lw', ); +sub _build_leftover_words { + return [ ]; +} + has grid => ( isa => ResultT, is => 'ro', lazy_build => 1, + clearer => '_reset_g', ); has source_grid => ( @@ -142,4 +148,13 @@ sub to_string { return $str; } +sub reset { + my ($self) = @_; + + $self->_reset_g; + $self->_reset_lw; + + return; +} + 1; |