X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FApp%2FSCS%2FPage.pm;h=0c2e76f0ba41bce70a799ebee2e8878c09eca472;hb=f50b4a35d3bc4916542f103138c10bc9a2fc9c9f;hp=a05c5e97b4a98512dc98d9068df08e762a926c5d;hpb=b8661586c766225ba4e65a625f268b7348078523;p=scpubgit%2FApp-SCS.git diff --git a/lib/App/SCS/Page.pm b/lib/App/SCS/Page.pm index a05c5e9..0c2e76f 100644 --- a/lib/App/SCS/Page.pm +++ b/lib/App/SCS/Page.pm @@ -7,6 +7,12 @@ use List::Util qw(reduce); use Module::Runtime qw(use_module); use Moo; +has "_$_" => (is => 'ro', init_arg => $_) for qw(page_set); + +sub _page_set_class { ref($_[0]->_page_set) } +sub _top_dir { $_[0]->_page_set->top_dir } +sub _my_path { io->dir($_[0]->_top_dir)->catdir($_[0]->path) } + with 'App::SCS::Role::PageChildren'; has $_ => (is => 'ro') for qw( @@ -65,12 +71,6 @@ sub published_at { : '' } -has "_$_" => (is => 'ro', init_arg => $_) for qw(page_set); - -sub _page_set_class { ref($_[0]->_page_set) } -sub _top_dir { $_[0]->_page_set->top_dir } -sub _my_path { io->dir($_[0]->_top_dir)->catdir($_[0]->path) } - sub to_app { my ($self) = @_; return sub { $self->to_psgi_response(@_) };