start of SubList filter code
[scpubgit/SCS.git] / lib / SCSite / Page.pm
1 package SCSite::Page;
2
3 use IO::All;
4 use Moo;
5
6 has $_ => (is => 'ro') for qw(title description keywords body created);
7
8 has "_$_" => (is => 'ro', init_arg => $_) for qw(page_set path);
9
10 sub children {
11   my ($self) = @_;
12   my $ps = $self->_page_set;
13   (ref $ps)->new(
14     base_dir => io->dir($ps->base_dir)->catdir($self->_path),
15     max_depth => 1
16   );
17 }
18
19 1;