1 package App::Commentry::CommentStore;
3 use aliased 'App::Commentry::CommentSet';
6 has base_dir => (is => 'ro', required => 1);
9 is => 'ro', init_arg => undef,
10 lazy => 1, default => sub { {} },
11 clearer => 'clear_cache'
15 my ($self, $proto) = @_;
16 my $path = $proto->{path} or die "->get requires a path key";
17 $self->_cache->{$path} ||= do {
18 CommentSet->new(base_dir => $self->base_dir, path => $path)