From: Matt S Trout Date: Tue, 19 Jul 2011 23:10:12 +0000 (+0000) Subject: switch to Moo accessors in IdiotBox.pm X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FApp-IdiotBox.git;a=commitdiff_plain;h=362a876649bae71cd4792625a781dd461025d4a8 switch to Moo accessors in IdiotBox.pm --- diff --git a/lib/App/IdiotBox.pm b/lib/App/IdiotBox.pm index 88e90c6..af5bc38 100644 --- a/lib/App/IdiotBox.pm +++ b/lib/App/IdiotBox.pm @@ -41,6 +41,8 @@ use List::Util qw(first); } } +has $_ => (is => 'ro') for qw(recent_announcements buckets); + sub default_config { template_dir => 'share/html', store => 'SQLite', @@ -74,10 +76,6 @@ sub dispatch_request { } } -sub recent_announcements { shift->{recent_announcements} } - -sub buckets { shift->{buckets} } - sub show_front_page { my $self = shift; my $ann = $self->recent_announcements;