Skip to content

Instantly share code, notes, and snippets.

@eviltik
Created December 27, 2014 08:24
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 eviltik/16439b7c34296afcd3b7 to your computer and use it in GitHub Desktop.
Save eviltik/16439b7c34296afcd3b7 to your computer and use it in GitHub Desktop.
mojolicious: directory and routes
I've got
myProject
|- conf
|- lib
| |- myProject
| | |- Webservice
| | |- User.pm
| |- myProject.pm
|- public
|- script
|- t
|- templates
Wondering the correct route path to access to User.pm ?
Bad answer is $routes->post('/ws/1.0/user/login')->to('webservice#user#login');
@eviltik
Copy link
Author

eviltik commented Dec 27, 2014

(One of) good answer is

$routes->post('/ws/1.0/user/login')->to('Webservice::User#login');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment