On 28 Feb 2009, at 21:27, Ashley wrote:
Just throwing that out there if anyone is under that part of the hood or someone Googling for why their Chained stuff won't work made the same error in assumptions I just did. :)

Wild stab in the dark, Path works like this:

    my @register = @{ $action->attributes->{Path} || [] };
    $self->register_path( $c, $_, $action ) for @register;

Chained works like this:

    my @path_part = @{ $action->attributes->{PathPart} || [] };
    if (@path_part == 1 && defined $path_part[0]) {
        $part = $path_part[0];

I'd guess in the case where you say PathPart (rather than PathPath (''), then $action->attributes->{PathPart} returns [ undef ], which is explicitly excluded by the code above. I bet (although I haven't checked) that register_path does the right thing if !defined($_)..)

Have a dive in the test suite and see if you can cook up a test which shows the inconsistency with PathPart?

We should either allow "PathPart" to work like "Path", or, if there is good reason why it needs to be "PathPart('')" (which I can't think of, given we have : Local), then "Path" should be deprecated to maintain consistency.

Cheers
t0m




_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to