Advertisement
Guest User

Untitled

a guest
Feb 8th, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.30 KB | None | 0 0
  1. use Mojolicious::Lite;
  2.  
  3. helper route_url => sub {
  4.     my $c = shift;
  5.  
  6.     app->log->info($c->url_for('test')->to_abs);  # generates errors
  7. };
  8.  
  9.  
  10. app->route_url;
  11.  
  12.  
  13. get '/test' => sub {
  14.     my $c = shift;
  15.  
  16.     $c->render( text => $c->url_for('test')->to_abs );  # works
  17. };
  18.  
  19.  
  20. app->start;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement