Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jjn1056/216107 to your computer and use it in GitHub Desktop.
Save jjn1056/216107 to your computer and use it in GitHub Desktop.
## grabbed from the docs
# root action - captures one argument after it
sub foo_setup : Chained('/') PathPart('foo') CaptureArgs(1) {
my ( $self, $c, $foo_arg ) = @_;
...
}
# child action endpoint - takes one argument
sub bar : Chained('foo_setup') Args(1) {
my ( $self, $c, $bar_arg ) = @_;
$c->log->info("my bar_arg is $bar_arg and my foo_arg is $foo_arg");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment