use Moose;
-has part => (is => 'rw', required => 1, lazy => 1, default => sub { {} });
+use overload (
+
+ # Stringify to path part for tree search
+ q{""} => sub { shift->part },
+
+);
+
+has part => (is => 'rw', required => 1, lazy => 1, default => sub { {} });
has actions => (is => 'rw', required => 1, lazy => 1, default => sub { {} });
around 'new' => sub {
$self->actions->{$name} = $action;
}
+__PACKAGE__->meta->make_immutable;
+
1;
__END__
=head1 AUTHOR
-Matt S. Trout
+Matt S. Trout
=head1 COPYRIGHT