Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 romping around the Monastery: (3)
As of 2022-05-26 20:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (94 votes). Check out past polls.

    Notices?