Skip to content

Instantly share code, notes, and snippets.

@ian-kent
Created December 5, 2013 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ian-kent/7811154 to your computer and use it in GitHub Desktop.
Save ian-kent/7811154 to your computer and use it in GitHub Desktop.
$r->bridge('/:something')->to(cb => sub {
my $something = shift->stash('something');
my $type = type_of_something($something);
if($type eq 'girl') {
# route to foo#bar
} elsif ($type eq 'boy') {
# route to baz/qux
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment