Created
December 5, 2013 18:58
-
-
Save ian-kent/7811154 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$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