package Catalyst::DispatchType::Chained;
use Moose;
+extends 'Catalyst::DispatchType';
+
+#use strict;
+#use base qw/Catalyst::DispatchType/;
use Text::SimpleTable;
use Catalyst::ActionChain;
use URI;
-extends 'Catalyst::DispatchType';
-
has _endpoints => (
- isa => 'rw',
+ is => 'rw',
isa => 'ArrayRef',
required => 1,
default => sub{ [] },
);
has _actions => (
- isa => 'rw',
+ is => 'rw',
isa => 'HashRef',
required => 1,
default => sub{ {} },
);
has _children_of => (
- isa => 'rw',
+ is => 'rw',
isa => 'HashRef',
required => 1,
default => sub{ {} },
$action->attributes->{Chained} = [ $parent ];
- my $children = $self->_children_of->{$parent};
+ my $children = ($self->_children_of->{$parent} ||= {});
my @path_part = @{ $action->attributes->{PathPart} || [] };