has "_$_" => (is => 'ro', init_arg => $_) for qw(page_set);
sub children {
- my ($self) = @_;
+ my ($self, %args) = @_;
+ if (my $at = delete $args{at_depth}) {
+warn "Here, $at";
+ @args{qw(min_depth max_depth)} = ($at-1, $at);
+ }
my $ps = $self->_page_set;
(ref $ps)->new(
top_dir => $ps->base_dir,
base_dir => io->dir($ps->base_dir)->catdir($self->path),
- max_depth => 1
+ max_depth => 1,
+ %args,
);
}