Created
July 22, 2015 15:40
-
-
Save jjn1056/a455d0cf857871c40ab8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Lace::Test::Controller::Root; | |
use Moose; | |
use MooseX::MethodAttributes; | |
extends 'Catalyst::Controller'; | |
sub root :Chained(/) PathPart('') CaptureArgs(0) { } | |
sub part1 :Chained(root) { } | |
sub part2 :Chained(part1) { } | |
__PACKAGE__->meta->make_immutable; | |
__END__ | |
[debug] Loaded Chained actions: | |
.-------------------------------------------------------+-------------------------------------------------------. | |
| Path Spec | Private | | |
+-------------------------------------------------------+-------------------------------------------------------+ | |
| /part1/... | /root (0) | | |
| | => /part1 (...) | | |
| /part1/part2/... | /root (0) | | |
| | -> /part1 (0) | | |
| | => /part2 (...) | | |
'-------------------------------------------------------+-------------------------------------------------------' |
you can see the whole 'midpoint can be an endpoint' gets really confused when you declare Args(1). you get an endpoint with Args(1) AND a midpoint with CaptureArgs(0)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
even worse
package Lace::Test::Controller::Root;
use Moose;
use MooseX::MethodAttributes;
extends 'Catalyst::Controller';
sub root :Chained(/) PathPart('') CaptureArgs(0) { }
sub part1 :Chained(root) Args(1) { }
PACKAGE->meta->make_immutable;
END
[debug] Loaded Chained actions:
.-------------------------------------------------------+-------------------------------------------------------.
| Path Spec | Private |
+-------------------------------------------------------+-------------------------------------------------------+
| /part1/* | /root (0) |
| | => /part1 (1) |
| /part1/part2/... | /root (0) |
| | -> /part1 (0) |
| | => /part2 (...) |
'-------------------------------------------------------+-------------------------------------------------------'