Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: What does Mojolicious do exactly and is it right for me?

by moritz (Cardinal)
on Apr 30, 2013 at 08:17 UTC ( #1031352=note: print w/replies, xml ) Need Help??

in reply to What does Mojolicious do exactly and is it right for me?

The difference between a library (like and a framework (like Mojolicious) is that you call library functions, but a framework calls your functions. That's called "inversion of control".

If you write a CGI script, you do things like checking the URL, and if it fits certain criteria, you do stuff. If you write a web application with Mojolicious, you tell that it shall call a certain function when a certain URL is fetched.

The idea is that this saves you from repetitive tasks like checking URLs, parameters, HTTP method (GET, POST, ...) etc.

Basically, is it right for what I am doing?

Probably. Follow the examples from Mojolicious::Lite, it should be quite simple.

  • Comment on Re: What does Mojolicious do exactly and is it right for me?

Replies are listed 'Best First'.
Re^2: What does Mojolicious do exactly and is it right for me?
by walkingthecow (Friar) on Apr 30, 2013 at 09:28 UTC

    This is exactly what I was looking for! Thank you. I wasn't sure if the learning curve was worth it, but your post has clarified things for me and given me the motivation to continue reading the documentation and stick with Mojolicious. Thanks again.

    Just to add: After reading your post, the documentation now makes a lot more sense to me. I guess I was viewing this from a CGI viewpoint and needed a bit of a smack in my paradigm. Thanks for the smack.

      Just curious at your progress with Mojolicious 1 year on. Done anything good with it? What advise would you give "old school" CGI developers migrating to Mojolicious? Thank

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1031352]
[LanX]: Voiceless_palatal_ fricative
[Eily]: Lanx https://en. wiki/Voiceless_pal atal_fricative
Eily got the Cowboy message
[Your Mother]: I prefer palatial fricatives.
[Lotus1]: https://en. wiki/%C3%87
[Your Mother]: I'm headed out west, sucker.
[Lotus1]: the west is the best, get here we'll do the rest
LanX chjuman !
[Eily]: do you pronunce that /xju:mən/ then ?
[Eily]: that's not what I'd call a silent h :)

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (15)
As of 2017-03-27 17:06 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (320 votes). Check out past polls.