Skip to content

Instantly share code, notes, and snippets.

@yko
Created January 10, 2011 16:43
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 yko/773023 to your computer and use it in GitHub Desktop.
Save yko/773023 to your computer and use it in GitHub Desktop.
some buggy stuff
package Waypoint;
use strict; use warnings;
use base 'Mojolicious';
# This method will run once at server start
sub startup {
my $self = shift;
# Routes
my $r = $self->routes;
# Normal route to controller
my $way = $r->waypoint('/waypoint');
$way->get('/')->to('example#welcome');
$way->post('/')->to('example#welcome');
}
=head And then just script/waypoint get /waypoint
Deep recursion on subroutine "Mojolicious::handler" at /usr/local/share/perl/5.10.1/Mojolicious/Routes.pm line 475.
Deep recursion on subroutine "Mojolicious::process" at /usr/local/share/perl/5.10.1/Mojolicious.pm line 230.
Deep recursion on subroutine "Mojolicious::dispatch" at /usr/local/share/perl/5.10.1/Mojolicious.pm line 278.
Deep recursion on subroutine "Mojolicious::Routes::dispatch" at /usr/local/share/perl/5.10.1/Mojolicious.pm line 196.
Deep recursion on subroutine "Mojolicious::Routes::_walk_stack" at /usr/local/share/perl/5.10.1/Mojolicious/Routes.pm line 166.
Deep recursion on subroutine "Mojolicious::Routes::_dispatch_controller" at /usr/local/share/perl/5.10.1/Mojolicious/Routes.pm line 640.
=cut
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment