in reply to Mojolicious absolute url with query in template?

Sure
helper foo => sub {...}; __END__ <%= my_foo() =%>
and then my_helper_foo() is as simple or as complicated as you need it to be

Replies are listed 'Best First'.
Re^2: Mojolicious absolute url with query in template?
by Anonymous Monk on Mar 19, 2020 at 09:27 UTC
    I have no idea what you're talking about but it reminds me of the documentation for Mojolicious (confusing, yet confident). How is that going to display the request url?

      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__
    A reply falls below the community's threshold of quality. You may see it by logging in.