Audbyte/Scratch notes: Difference between revisions
From Federal Burro of Information
< Audbyte
No edit summary |
No edit summary |
||
Line 11: | Line 11: | ||
For example, the URL http://hello.com/admin/articles/create maps to the package Hello::Controller::Admin::Articles, and the create method. | For example, the URL http://hello.com/admin/articles/create maps to the package Hello::Controller::Admin::Articles, and the create method. | ||
Adding a subroutine: | |||
sub hello :Global { | |||
my ( $self, $c ) = @_; | |||
$c->response->body("Hello, World!"); | |||
} | |||
code reloads on it's own, now surf to: http://testsrv.opensitesolutions.com:3000/hello | |||
BING |
Revision as of 01:16, 30 May 2013
catalyst.pl Audbyte <snip> cd Audbyte/ script/audbyte_server.pl -r <snip>
surf to http://testsrv.opensitesolutions.com:3000/
vi ./lib/Audbyte/Controller/Root.pm
For example, the URL http://hello.com/admin/articles/create maps to the package Hello::Controller::Admin::Articles, and the create method.
Adding a subroutine:
sub hello :Global { my ( $self, $c ) = @_;
$c->response->body("Hello, World!"); }
code reloads on it's own, now surf to: http://testsrv.opensitesolutions.com:3000/hello
BING