-package Catalyst::DispatchType::ChildOf;
+package Catalyst::DispatchType::Chained;
use strict;
use base qw/Catalyst::DispatchType/;
=head1 NAME
-Catalyst::DispatchType::ChildOf - Path Part DispatchType
+Catalyst::DispatchType::Chained - Path Part DispatchType
=head1 SYNOPSIS
unshift(@parts, $pp->[0])
if (defined $pp->[0] && length $pp->[0]);
}
- $parent = $curr->attributes->{ChildOf}->[0];
+ $parent = $curr->attributes->{Chained}->[0];
$curr = $self->{actions}{$parent};
unshift(@parents, $curr) if $curr;
}
sub register {
my ( $self, $c, $action ) = @_;
- my @child_of_attr = @{ $action->attributes->{ChildOf} || [] };
+ my @child_of_attr = @{ $action->attributes->{Chained} || [] };
return 0 unless @child_of_attr;
if (@child_of_attr > 2) {
Catalyst::Exception->throw(
- "Multiple ChildOf attributes not supported registering ${action}"
+ "Multiple Chained attributes not supported registering ${action}"
);
}
$parent = '/'.$action->namespace;
}
- $action->attributes->{ChildOf} = [ $parent ];
+ $action->attributes->{Chained} = [ $parent ];
my $children = ($self->{children_of}{$parent} ||= {});
sub uri_for_action {
my ( $self, $action, $captures ) = @_;
- return undef unless ($action->attributes->{ChildOf}
+ return undef unless ($action->attributes->{Chained}
&& $action->attributes->{Args});
my @parts = ();
unshift(@parts, $pp->[0])
if (defined $pp->[0] && length $pp->[0]);
}
- $parent = $curr->attributes->{ChildOf}->[0];
+ $parent = $curr->attributes->{Chained}->[0];
$curr = $self->{actions}{$parent};
}