summaryrefslogtreecommitdiff
path: root/lib/GridFiller/Result.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/GridFiller/Result.pm')
-rw-r--r--lib/GridFiller/Result.pm17
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;