Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: Mojolicious absolute url with query in template?

by Anonymous Monk
on Mar 20, 2020 at 23:51 UTC ( [id://11114531]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Mojolicious absolute url with query in template?
in thread Mojolicious absolute url with query in template?

Confused is as confused does

#!/usr/bin/perl -- use Mojolicious::Lite; helper my_foo => sub { my( $c ) = @_; $c->url_for('/')->to_abs.'?'.$c->url_with->query; }; any '/' => { template => 'index', time => scalar localtime };;; app->start; __DATA__ @@ index.html.ep <%= $time =%> <pre> <%= url_for('/')->to_abs %>?<%= url_with->query %> <%= my_foo() =%> __END__

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11114531]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-23 17:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found