return $munger;
}
+ method debug_dump () {
+ join("\n", map {
+ "Monger: ".$_->full_name."\n"
+ .$_->debug_dump
+ } map $self->mongers->{$_}, sort keys %{$self->mongers});
+ }
+
method save_monger_stats (Str $dir) {
my $saver = StatsSaver->new(dir => $dir);
$saver->mongers([
is => 'ro', lazy => 1,
default => sub ($self) { level_for_post_count($self->post_count) }
);
+
+ method debug_dump () {
+ join("\n",
+ (map join(': ', $_, $self->$_),
+ qw(full_name post_count days_left level)),
+ 'Posts:',
+ join('',
+ map { my $x = $_->debug_dump; $x =~ s/^/ /m; $x; } @{$self->posts}
+ ),
+ ''
+ );
+ }
}
1;
has at => (isa => DateTime, is => 'ro', required => 1, coerce => 1);
has url => (isa => Str, is => 'ro', required => 1);
+
+ method debug_dump () {
+ join("\n", (map join(': ', $_, $self->$_), qw(at url)), '');
+ }
}
1;