Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Mojolicious url rewriting

by haukex (Bishop)
on Apr 20, 2021 at 04:09 UTC ( #11131499=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use Mojolicious::Lite -signatures;
    ...
    % layout 'main', title => 'User page';
    <p>This is <%= $name %>'s Page</p>
    %= link_to Home => 'index';
    
  2. or download this
    use Mojo::Base -strict, -signatures;
    use Test::Mojo;
    ...
    $t->get_ok('/user/John Doe')->status_is(404);
    
    done_testing;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2022-06-29 22:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (97 votes). Check out past polls.

    Notices?