Skip to content

Instantly share code, notes, and snippets.

@sukria
Created June 24, 2010 09:25
Show Gist options
  • Save sukria/451219 to your computer and use it in GitHub Desktop.
Save sukria/451219 to your computer and use it in GitHub Desktop.
# app.pl
use Dancer;
use MyApp::Forum;
use MyApp:Home;
dance;
# lib/MyApp/Forum.pm
package MyApp::Forum;
use Dancer ':syntax';
prefix '/forum';
get '/hello' => sub {
# this is /forum/hello
};
# lib/MyApp/Home
package MyApp::Home;
use Dancer ':syntax';
prefix undef; # means root
get '/hello' => sub {
# this is /hello
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment