Slashdot Mirror


Mojolicious 2.0: Modern Perl For the Web

Kvorg writes "After a year of rapid development, newly released version 2.0 of Mojolicious, the new generation real-time Perl web framework written by Sebastian Riedel and many others, offers a versatile and elegant web framework that is as good at web scraping and simple scripts as it is at building complex, interactive real-time applications with HTML5 and websockets. It supports easy 0-dependency installs, excellent developer mode, multiple deployment scenarios, many CPAN modules and plugins."

132 comments

  1. Syntax by colinrichardday · · Score: 1

    But is it prettier than regular Perl?

    1. Re:Syntax by draven · · Score: 1

      It's very pretty. Look on the homepage to see an example.

      --
      -- Marcus Ramberg
  2. no post = dead by Anonymous Coward · · Score: 0

    is perl dead, that slashdot denizens don't want to post even a "fristy prost" post...

    1. Re:no post = dead by ferongr · · Score: 1

      Netcraft confirms that Perl is dead.

    2. Re:no post = dead by bragr · · Score: 2

      Says the AC posting on a site written in perl.

  3. Yet Another by bragr · · Score: 2

    Because clearly what we need is _yet another_ way to develop web applications.

    1. Re:Yet Another by Anonymous Coward · · Score: 0

      I just need recongnition, Wikipedia entry, book at Amazon, TShirt shop at the site, you know... to be somebody online, really need that job at Google. That syntax is not really meant to be readable, it is just so it looks academic and a bit blurry for the mob, so they be willing to buy my book..

    2. Re:Yet Another by grcumb · · Score: 3, Insightful

      Because clearly what we need is _yet another_ way to develop web applications.

      Frankly, yes. As long as we're advancing and improving, yeah, it always makes sense to keep trying new approaches. I'm using Mojolicious for two apps currently in development. One of them was already in progress using other modules, bit with the Mojolicious::Lite module, I was able to cut my code base nearly in half.

      I'll tell you what - why don't.you try it first, then complain about it if you still don't like it.

      --
      Crumb's Corollary: Never bring a knife to a bun fight.
    3. Re:Yet Another by Serious+Callers+Only · · Score: 1

      Because clearly what we need is _yet another_ way to develop web applications.

      Well, why not?

      Doesn't matter to the end users what language was used for the back-end, and some programmers will be more familiar or comfortable with Perl. Maybe you don't need this, and I personally have no intention of using it, but some people might find it interesting.

    4. Re:Yet Another by Anonymous Coward · · Score: 0

      Yeah. Fuck innovation!

    5. Re:Yet Another by drinkypoo · · Score: 1

      I still can't figure out how it's actually called. If it lets you use mod_perl then it has a reason to exist. But it probably doesn't.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    6. Re:Yet Another by drjones78 · · Score: 2

      mod_perl is out - no reason to use it any more, especially since its tied explicitly to Apache. Yuk. Who wants to write a web app that requires a specific web server?

      Mojo runs on PSGI, like most new generation web frameworks for perl. Its similar to WSGI (Python).

      There's some really cool stuff happening in the PSGI world. Check out Plack.

    7. Re:Yet Another by MadMartigan2001 · · Score: 4, Informative

      Mojolicious is a complete HTTP 1.1 stack. No mod_perl required. It has its own built in webserver, hypnotoad which can be used in production. You can install Mojolicous with a single curl command

      sudo sh -c "curl -L cpanmin.us | perl - Mojolicious"

      And three lines can make a complete "hello world" application....

      use Mojolicious::Lite;
      get '/' => {text => 'Hello World!'};
      app->start;

      Part of what make Mojolicous so powerful is Perl's syntax and expressiveness. I know it's hip to beat up on Perl these days, but perl is still way ahead of most languages in its ability to be expressive. The author of Mojolicous is a really good programmer and insanely picky about well structured code, consistency and test driven development. Hence, the framework is very easy to use and understand. This framework is definitely worth a look.

    8. Re:Yet Another by Anonymous Coward · · Score: 0

      It's shit like this that gets modded up on here that has led me to spend more and more time on Hacker News.

    9. Re:Yet Another by larry+bagina · · Score: 1

      Wow, let's run a perl script from a random website, site unseen. Even better, let's run it with root permissions. What could possibly go wrong?

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    10. Re:Yet Another by geminidomino · · Score: 1

      Okay then.

      $ curl -L cpanmin.us > poison_pill.txt
      $ vi poison_pill.txt

      Voila.

    11. Re:Yet Another by drinkypoo · · Score: 1

      OIC. Well that is nifty I guess, although frankly, I would prefer something that I could use with Apache, because I already use Apache, and nonstandard ports suck. I guess if you're doing anything real you can probably dedicate a box.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    12. Re:Yet Another by Just+Some+Guy · · Score: 2

      I know it's hip to beat up on Perl these days, but perl is still way ahead of most languages in its ability to be expressive.

      But far behind the languages that it's competing with in this space. There's a reason why literally ever Perl programmer I know has migrated to Ruby or Python.

      I'd much rather write a web app in Perl than C or Pascal. And by roughly the same margin, I'd much rather write the same app on Rails or Django or Pyramid.

      --
      Dewey, what part of this looks like authorities should be involved?
    13. Re:Yet Another by Anonymous Coward · · Score: 0

      What would Dennis Ritchie do?

    14. Re:Yet Another by Ant+P. · · Score: 1

      God help you if you ever have to use an OS with a package manager...

    15. Re:Yet Another by chromatic · · Score: 1

      Install cpanminus from the CPAN then. I do.

    16. Re:Yet Another by Bucky24 · · Score: 1

      Well if you're nervous about it you always could download and examine it first before running it...

      --
      All the world's a CPU, and all the men and women merely AI agents
    17. Re:Yet Another by Anonymous Coward · · Score: 0

      Mojolicious directly supports Apache/CGI automatically, and also can sit directly on Apache/mod_proxy. Plack/PSGI is also supported, which gives you FCGI, SCGI and mod_perl back-ends. It does come with the hypnotoad server, and the lightweight marbo test/development server as well. It also supports Nginx.

      So to summarize:
      Apache/mod_proxy => yes.
      Nginx => yes.
      CGI => yes (automatically detected).
      Plack/PSGI => Yes.
      mod_perl => Yes, through Plack/PSGI
      FastCGI => Yes through Plack/PSGI
      Others => Yes, Plack/PSGI has back-end adapters for a number of servers.

      Let's not invent reasons not to like it without verifying they're valid.

  4. Perl is the most refreshing programming language by Anonymous Coward · · Score: 5, Funny

    Every time I look at a script I've written that's at least a year old, it's like the first time I've ever seen the code.

  5. Wasn't that supposed to be Ruby? by Sarusa · · Score: 2, Interesting

    Not to take anything away from this framework, but now I'm curious since at first I took the post title too literally. Wasn't Ruby supposed to be modern Perl for the web? Whatever happened to that? People get bored? Web developer ADHD?

    1. Re:Wasn't that supposed to be Ruby? by TennCasey · · Score: 1
    2. Re:Wasn't that supposed to be Ruby? by furbearntrout · · Score: 1

      Yes.

      --
      Crap. What did the new CSS do with the "Post anonymously" option??
    3. Re:Wasn't that supposed to be Ruby? by Anonymous Coward · · Score: 1, Interesting

      Hard to do serious web apps in a language that can't even handle the basics of unicode.

      And once you got past scaffolding, rails turned out to be a toy MVC framework that 1) monkeypatches base classes and breaks other libraries, 2) has a toy ORM that can't generate joins properly, and 3) has a template language that basically amounts to script-in-page.

    4. Re:Wasn't that supposed to be Ruby? by Sarusa · · Score: 0

      Oh for fuck's sake. I get moderated down for asking a serious question? I really do want to know. What the hell is wrong with you people? I apologize if I stepped on the tail of a Ruby diehard, but the bloom is off the rose and I am curious why.

    5. Re:Wasn't that supposed to be Ruby? by RDW · · Score: 3, Insightful

      You can write 'Modern Perl' in the sense used here without switching to an entirely different language:

      http://www.onyxneon.com/books/modern_perl/index.html

    6. Re:Wasn't that supposed to be Ruby? by Kagetsuki · · Score: 2

      Sounds like you haven't touched Rails in 10 years. It handles unicode extremely well now, arguably better than any other framework out there, and even has an extended set of localization options that are way more accessible than probably anything else. As for your other arguments:
      1. Monkey patching is dangerous in any language - luckily with modern Rails there is significantly less need for it and it's generally discouraged
      2. ?? Sounds like you were doing something wrong
      3. You don't understand what the C in MVC means, do you?

    7. Re:Wasn't that supposed to be Ruby? by Kagetsuki · · Score: 1

      Rails 3.1 is just coming out and offers some really, really nice features. Rails use is becoming more and more wide spread, and there are even hosts and cloud services that focus on it specifically (EG; Heroku).

    8. Re:Wasn't that supposed to be Ruby? by Anonymous Coward · · Score: 0

      Actually, it isn't becoming more widespread at all. According to the tiobe index it's been in steady decline since 2009.

    9. Re:Wasn't that supposed to be Ruby? by Anonymous Coward · · Score: 1

      That's pretty outdated, although I see where it's come from. Most of the issues arise from the old versions on Ruby in use - the ones with shoddy Unicode support, and which require patching of the base classes to gain useful functionality.

      The ORM can now be swapped out (and new versions of ActiveRecord/Arel have made queries much more fun).

      The older erb templates are not the prettiest (though if you're doing PHP style script-in-page, you're using the tools wrong) - but using something like Haml is much, much better.

      One of the problems people have with Rails is that if you try to fight against the framework you'll not get very far. Either go with it, or use the tools that are available for letting you perform tasks outside the norm. Trying to repurpose the "opinionated" tools is the wrong approach, and you should just use something simpler (Sinatra?)

    10. Re:Wasn't that supposed to be Ruby? by CadentOrange · · Score: 2

      Ruby has been in decline. Interestingly, so have PHP and Python. At it's peak in 2009, Ruby barely exceed's Python's current usage.

      Ruby: http://www.tiobe.com/index.php/paperinfo/tpci/Ruby.html

      Python: http://www.tiobe.com/index.php/paperinfo/tpci/PHP.html

      PHP: http://www.tiobe.com/index.php/paperinfo/tpci/Python.html .

    11. Re:Wasn't that supposed to be Ruby? by Rysc · · Score: 1

      Sounds like you haven't touched Rails in 10 years. It handles unicode extremely well now, arguably better than any other framework out there,

      I invite you to consult Unicode: Good, Bad, Ugly and then make that statement again. Full disclosure: Yes, it was written by a Perl guy, but I've not seen any dispute about the facts.

      --
      I want my Cowboyneal
    12. Re:Wasn't that supposed to be Ruby? by bill_mcgonigle · · Score: 1

      Wasn't Ruby supposed to be modern Perl for the web? Whatever happened to that?

      Different community values.

      Perl cares greatly about being fast, using few resources, maintaining long-term compatibility. It cares about the sysadmin (CPAN) and sysadmins seem to care about it (perl-Foo-Bar packages for almost all the important stuff). It caused quite a bit of pain about UNICODE and locales in 1997, when ~nobody knew why they were doing that silly stuff. mod_perl has been great for a decade - Passenger was just usable last year and still bothersome and not a real open source project.

      I think Ruby might just now be up to a decent speed, perhaps needing to run it under the JVM, and Rails seemingly changes every six weeks. I did some Rails programming 2 years ago, and that code is basically worthless today.

      I like Ruby as a language, but I like perl6 too. I like the perl community much better than the Ruby community (for one, they don't leer at me for not wearing thick-rimmed glasses while I don't code in Textmate on my not-a-Macbook-Pro).

      That said, I have the Catalyst book and I really don't like that framework either. I did one project with it and I'm happy to have another option to explore. If I were wealthy, I might sit down and invent my perfect web framework, but in real world, I'm grateful others are doing these things for me.

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    13. Re:Wasn't that supposed to be Ruby? by bill_mcgonigle · · Score: 1

      Oh for fuck's sake. I get moderated down for asking a serious question? I really do want to know. What the hell is wrong with you people? I apologize if I stepped on the tail of a Ruby diehard, but the bloom is off the rose and I am curious why.

      You may only be extremely, unreasonably excited when speaking about Ruby!

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    14. Re:Wasn't that supposed to be Ruby? by Sarusa · · Score: 1

      All right, thank you to everyone who answered this seriously. I think I've gotten some idea now.

    15. Re:Wasn't that supposed to be Ruby? by Kagetsuki · · Score: 1

      Yeah, read slide #26, 27, 28 - note how they basically point out Ruby deals with real world situations pretty damn nimbly. Just because you don't understand how the Ruby Unicode system works doesn't mean it's bad. The comment about "han unification" in the slides is proof whoever wrote those slides has idealogical issues that totally don't take into account the reality - probably because he doesn't deal with CJK and thusly doesn't understand its necessity. As someone who deals with multi-locale Ruby code (including CJK) almost every day I can tell you right now it works very well and I have never encountered any real problems in practical implementations. Of course if you want to whine about capital and lower case handling in CJK the go ahead... BECAUSE WE DON'T EVEN HAVE CASES and you shouldn't be wasting space or reducing compatibility by encoding ASCII capable fragments in U32.

      Now if you want to make the argument that Perl handling of Unicode is superior then go ahead, it's not like I or the majority of the coding world even care about Perl anymore. And unlike Ruby, Perl is a text oriented language so we could only hope it can handle it better.

    16. Re:Wasn't that supposed to be Ruby? by shutdown+-p+now · · Score: 1

      Comparing frameworks in terms of Unicode handling is not all there is to it, because a thing like that really needs to be either in the language or in the core library. Otherwise, even if your-favorite-framework handles it fine, my-absolutely-necessary-library (that I want to use alongside your-favorite-framework) might not. In that sense, Unicode support in Ruby 1.8 could be concisely summed up as "no such thing".

      Ruby 1.9 is interesting. On one hand I can buy the argument that CJK and other non-Unicode, non-Unicode-mappable encodings are necessary (well, actually I can't, but let's leave this political discussion out of it). So Ruby goes ahead and makes strings be arrays of code points with an encoding marker attached - fine. But now consider the side effects: whenever I get two different strings from anywhere, I don't know what their encodings are, or whether they even match. And if they don't match, then I can't even concat them together! Sure, I can add precondition in the documentation of my method that says "only pass strings with the same encoding here"; how many times have you seen this actually done? When you take some random 1.9.x-compatible library, can you really assume that some random method documented as taking strings will accept any strings that you throw at it?

      Unicode may not be a perfect solution today, but it has got the right idea - unify all text data in a single data type that can be treated in an opaque way by all code except for that which actually needs it (e.g. the library that renders output text, like FreeType or UniScribe). Ruby strings are not that - pretty much the only thing that you can do to a string without knowing its encoding there is to pass it through. To the best of my knowledge, it's also the only language with such a problem, which, to me, indicates either an epic fail, or a tool for a very specialized, and therefore small, audience (e.g. people who really need non-unified CJK). The rest of us will likely stick to tools that let us skip the whole mess, like, well, Python 3 or Perl.

    17. Re:Wasn't that supposed to be Ruby? by metamatic · · Score: 1

      The rest of us will likely stick to tools that let us skip the whole mess, like, well, Python 3 or Perl.

      I just stick

      # encoding: UTF-8

      at the top of my Ruby files and handle everything in UTF-8. If it breaks for some Japanese people because they have some stupid religious objection to Unicode, that's their problem. You don't have to pander to them to use Ruby, so it's no reason to abandon Ruby.

      --
      GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    18. Re:Wasn't that supposed to be Ruby? by shutdown+-p+now · · Score: 1

      TIOBE is a very, very inaccurate index. Not just that, but they change the way they gather data every now and then, so historical values are not always comparable to current ones.

    19. Re:Wasn't that supposed to be Ruby? by shutdown+-p+now · · Score: 1

      That would guarantee that all strings that come from string literals in your source files are in UTF-8. It doesn't guarantee anything about strings that come from elsewhere - e.g. from the standard library, or from any third-party library you might be using.

      You can ignore such libraries that don't provide you the expected encodings, sure. The problem is when you write your own Ruby library that's supposed to be reusable. Now you have to make a decision on whether you want to enforce your choice on the clients of your library, or go to great lengths to write (and test!) fully encoding-agnostic code.

      But, yeah, in practice it seems that most people using Ruby (1.9) just assume that all strings are in some Unicode encoding, or some encoding that is fully compatible with Unicode (and thus can be freely substituted, with implicit conversions happening automatically as needed). Still a pity that so much complexity in 1.9 is for something that so few people use. I wish Ruby wasn't written by a Japanese guy - we wouldn't even have to argue about this by now if it were different...

    20. Re:Wasn't that supposed to be Ruby? by Anonymous Coward · · Score: 0

      TIOBE is a very, very inaccurate index. Not just that, but they change the way they gather data every now and then, so historical values are not always comparable to current ones.

      It doesn't really matter if the way they gather their data changes as the ratings are relative to the other tracked languages.

      Would you contend that Ruby is in more widespread use than in 2009?

    21. Re:Wasn't that supposed to be Ruby? by Anonymous Coward · · Score: 0

      Heroku? From their own home page:

      "Agile deployment for Ruby, Node.js, Clojure, Java, Python, and Scala."

      Not at all Rails specific then.

    22. Re:Wasn't that supposed to be Ruby? by shutdown+-p+now · · Score: 1

      It doesn't really matter if the way they gather their data changes as the ratings are relative to the other tracked languages.

      True. Unfortunately, due to the way they gather data, their relative ratings are also considerably inaccurate.

      Would you contend that Ruby is in more widespread use than in 2009?

      I don't know - I don't write anything serious in Ruby and am not part of the community, so I couldn't estimate where it's at today, or was at in 2009.

      Overall, I do hear less noise about Ruby than, say, 2-3 years ago. But it may just as well mean that it had moved on from the Next Big Thing to a routine tool for many web developers, so telling about how awesome Rails is is not cool anymore, and hence fewer people do so (and those that still do, don't get noticed).

    23. Re:Wasn't that supposed to be Ruby? by Kagetsuki · · Score: 1

      "If it breaks for some Japanese people because they have some stupid religious objection to Unicode" - it doesn't break it, it works very very well and is a very practical real world implementation. But "practical" and "real world" mean engl-euro centric non CJK people want to do things like use a base "n" character and put "~" on top of it with an extended character and make every character 32bit instead of actually being sane and just using efficient standards like UTF-8.

      If I'm not mistaken one of the reasons for UTF-8 was Japanese specifically, and han unicode is completely centered around CJK and UTF-8 is essentially an implementation of it. Furthermore, UTF-8 is on everything now, it's proven efficient and it works fantastically in Ruby in real life situations - I honestly don't care if I can't check to see if a Kanji is "capitalized" and get "non-standard" behavior because that's a nonsense operation which should give you an error just like it does in Ruby. If that bugs anyone then go ahead and patch it - Ruby is an open language.

    24. Re:Wasn't that supposed to be Ruby? by Kagetsuki · · Score: 1

      Actually declaring # encoding: UTF-8 does not assume external libraries are in UTF-8, Ruby handles that pretty well and that's likely because a lot of older Ruby code was written with Shift-JIS. To be honest I've only dealt with non-UTF-8 encodings in Shift-JIS so maybe it only handles those, but I can tell you it works fine and give you a working sample to prove it.

      "I wish Ruby wasn't written by a Japanese guy - we wouldn't even have to argue about this by now if it were different..." - I don't even know how to take that. Seriously.

    25. Re:Wasn't that supposed to be Ruby? by shutdown+-p+now · · Score: 1

      Actually declaring # encoding: UTF-8 does not assume external libraries are in UTF-8

      That's precisely what I wrote. GP's point was that people assume that in practice, though, and he's right.

      "I wish Ruby wasn't written by a Japanese guy - we wouldn't even have to argue about this by now if it were different..." - I don't even know how to take that. Seriously.

      Take it exactly how it's written. It's not exactly a secret that pretty much the only ones who have serious trouble with Han unification in Unicode - and, as a consequence, Unicode itself - are speakers of Japanase; and the reasons for rejection are most accurately described as "political". It's also not a coincidence that, of all languages and frameworks that acquired encoding awareness, the one that's designed by a Japanese developer is also the only one that choose something other than "just use Unicode for everything [that's not ASCII]". For pretty much everybody else in the developer community, this all is pointless at best, and additional headache at worst.

      For the record, a sane solution for 2% that actually need it would be to provide a custom, drop-in-replacement string class that supports non-Unicode representations, and which third-party libraries can explicitly support if they so choose, but which implicitly does a best-effort conversion to Unicode otherwise; and default to Unicode if programmer doesn't state any specific preference to the contrary.

  6. "Web development can be fun again" by neonmonk · · Score: 1

    Web development is already "fun" with the likes of Django, Rails (not a favourite of mine but I see the appeal) and my personal favourite: Pylons/Pyramid.

    I don't really get the desire to use Perl. I haven't touched Perl for a long time and can't think of any jobs where it would be the best tool. It's ugly.

    Sure, it's still better than PHP but then, what isn't?

    1. Re:"Web development can be fun again" by nullchar · · Score: 2

      The only exciting part of this new Mojolicious is to expand on a bunch of Perl web stuff you might already maintain. I don't have any large apps (like slashdot), but many "single page" type applications that process data or serve up custom reports. The simple pages simply flush stdout so when displaying long output appear speedy to the user. Others use some javascript and cludgy .html() replacements. Websockets and json support would be nice when extending these applications where the "bulk" of the code written in plain Perl doesn't need to be modified.

    2. Re:"Web development can be fun again" by arth1 · · Score: 2

      I don't really get the desire to use Perl. I haven't touched Perl for a long time and can't think of any jobs where it would be the best tool.

      String parsing and massaging.
      Hashes.

      Also, system administration. Like sed and awk, perl should be in most sysadmins' arsenal, seeing daily use.
      Want to replace all occurrences of foo with bar in all files, while making a backup?

      perl -pi.bak -e 's/foo/bar/g' *

      What perl is not good for, and frequently is abused for is providing multiple layers of abstraction. You burn memory at an alarming rate, and your code becomes even harder to maintain by "simplifying" it. If good perl code looks cryptic, add comments!

    3. Re:"Web development can be fun again" by Anrego · · Score: 3, Insightful

      I don't really get the desire to use Perl. I haven't touched Perl for a long time and can't think of any jobs where it would be the best tool. It's ugly.

      It's still _the_ tool for quick one-off type stuff. I know of no other tool that lets you just mash data together and produce something useful as easily and quickly as perl. That said, I'd never use it for a serious application or anything that had to be maintained for more than a few weeks. Those days are gone.. maintainability and reliability are king.

    4. Re:"Web development can be fun again" by grcumb · · Score: 2
      I won't defend Perl's syntactical constructs; either you like the fluidity of the language or you don't. But Mojolicious is a modern, useable framework, far superior in important ways to Django.

      For my part, I find it remarkably easy to implement RPC calls, CRUD especially, using this framework. Go to CPAN, read the Mojolicious::Lite exampes and decide for yourself whether it's worth your while.

      --
      Crumb's Corollary: Never bring a knife to a bun fight.
    5. Re:"Web development can be fun again" by Anonymous Coward · · Score: 2, Informative

      I don't really get the desire to use Perl. I haven't touched Perl for a long time and can't think of any jobs where it would be the best tool. It's ugly.

      It's still _the_ tool for quick one-off type stuff. I know of no other tool that lets you just mash data together and produce something useful as easily and quickly as perl. That said, I'd never use it for a serious application or anything that had to be maintained for more than a few weeks. Those days are gone.. maintainability and reliability are king.

      Well the really smart guys that figure out DNA started using it. Many startups use it. I've used it pretty much everywhere I've gone and it's leaps and bounds above what I find in use in most places. It's huge in Japan. It was the favorite language of the guy who created Ruby, he just wanted more.

      So yeah no serious application or anything that had to be maintained, no never that, because how could anyone possibly write maintainable Perl. Instead you should use a programming language where maintainability and reliability are king, that language of course is ...???

      By the way Slashdot the not so serious site you are on is written in Perl.

    6. Re:"Web development can be fun again" by Anonymous Coward · · Score: 0

      python

      non cryptic and has all the good stuff that perl has too.

    7. Re:"Web development can be fun again" by AlXtreme · · Score: 2

      By the looks of it Mojolicious does support stuff plain Django doesn't pay much attention to or leaves to the webserver (long polling for instance). Useful!

      Then again, Mojolicious doesn't have a built-in ORM or input-validation via forms. Together with URL handling and the request/response loop these are the basic building blocks in Django.

      So 'superior in important ways' depends on what you find important. I'm guessing 99% of Django users beg to differ.

      --
      This sig is intentionally left blank
    8. Re:"Web development can be fun again" by Anonymous Coward · · Score: 0

      Why would you want a built-in ORM? DBIx::Class is only a CPAN download away.

      I'm serious. What is it with modern programmers wanting 'everything-but-the-kitchen-sink' frameworks? What happened to modularity?

      Mart (AC because I'm moderating in this thread)

    9. Re:"Web development can be fun again" by outsider007 · · Score: 1

      Perl is for really old guys, period. If you're under 45 you're using python or ruby.

      --
      If you mod me down the terrorists will have won
    10. Re:"Web development can be fun again" by Anonymous Coward · · Score: 0

      Yes, the old guys had their share of position-is-part-of-the-syntax by having used COBOL.

    11. Re:"Web development can be fun again" by grcumb · · Score: 1

      I won't. say you're wrong, but I will say that building asynchronous apps using CRUD and the like is remarkably easy. I have friends who swear by Django, so I'm not blind to its appeal. Mojolicious has different areas of emphasis and the things it does, it does exceptionally well. URL handling in Mojo is simple and elegant, but I simply don't know enough about Django's input validation to comment.

      --
      Crumb's Corollary: Never bring a knife to a bun fight.
    12. Re:"Web development can be fun again" by CadentOrange · · Score: 2

      What happened to modularity?

      Django advocates loose coupling between it's modules. You can easily use Django's ORM in a non-Django app, or use a different ORM (e.g. SQLAlchemy) in a Django app. Having said that, I've found that the Django ORM is nice and intuitive if you're a programmer (like me!) and really want to avoid working with SQL directly while SQLAlchemy caters to people who are more comfortable with SQL.

    13. Re:"Web development can be fun again" by zippthorne · · Score: 2

      Your example of Perl is Slashcode? I'm not sure that has the desired affect on the audience...

      --
      Can you be Even More Awesome?!
    14. Re:"Web development can be fun again" by sqldr · · Score: 1

      python isn't. colon starts a block. unindent ends the block. you can indent with what you like.

      --
      I wrote my first program at the age of six, and I still can't work out how this website works.
    15. Re:"Web development can be fun again" by Lisandro · · Score: 1

      Much agreed - this is one of the things Django does very well. Having said that, i think the model handling part of Django is it's weaker point. If you need to do anything remotely complex regarding persistance it gets too much in the way.

      But yes. Most of the time, having a CRUD interface built automatically from the model it's a Godsend.

    16. Re:"Web development can be fun again" by Anrego · · Score: 2

      Never said it _hasn't_ been used to write something maintainable.. just that I wouldn't use it for that (any more.. ).

      Yes you can write maintainable code in perl if you make a specific effort to do so, but to me that defeats the point. It's primarily a hack and slash language that lets you crank out code while you think. To me writing maintainable perl is like writing a quick one-off script in c++ or java. Yes you can do it, but why bother. Use the tool that is suited for the task.

      And the DNA thing is a perfect example of the kind of "we need an answer to this question, then don't care about the code afterwards" situations where perl is king.

    17. Re:"Web development can be fun again" by Jimmy+King · · Score: 2

      Perl can be as easy to read and maintain as the developer can be bothered to make it. Sloppy Perl is written by sloppy developers. It has proper variable scoping, namespacing, packages, object inheritance, etc. You also don't have to squeeze as much functionality into one line using as many special characters as possible.

      Sure, there's plenty of ugly Perl out there. I suspect much of that is stuff that started as a small, quickly hacked together script which grew into something larger. Perl also used to hold PHP's place as THE language to use for web back end stuff, so it had a lot of amateur devs doing stupid crap. I can find you awful code in any language you want, though. I've got some crazy Python in front of me right now.

      I'm not saying it's the best language to use anymore, but it's not even 1/4 as bad as people like to make it out to be around here. Plus many of its libraries are still easier to use and have more functionality than the equivalent libraries in other more popular languages (opinions on that may vary, of course). LWP is still my favorite web client library.

    18. Re:"Web development can be fun again" by SailorMeeko · · Score: 1

      That said, I'd never use it for a serious application or anything that had to be maintained for more than a few weeks. Those days are gone.. maintainability and reliability are king.

      I created an entire social networking site in Perl, called World of Anime, using the Catalyst Web Framework. I'd consider it serious, at least for me, and have been maintaining it for way more than a few weeks.

    19. Re:"Web development can be fun again" by MadMartigan2001 · · Score: 1

      If you like LWP, you should check out the UserAgent for Mojolicous along with its CSS dom selectors and other goodies. Amazing stuff.

    20. Re:"Web development can be fun again" by Anrego · · Score: 2

      I agree that it's possible to write maintainable perl, but from my vantage point, perl is not really designed for this.

      To me it's more of a hack n` slash language. Code while you think. All those shortcuts and lack of boilerplate code and ability to just say "take this data, compare it with this, and do whatever" in a few lines is to me perl's strength. The fact that the resultant code is hard to read is the weakness. If you are not going to do that, and write code in a more rigid, designed manner to avoid this, why use perl in the first place? To me it's like writing a quick one-off type script in c++.. you can do it, but why would you want to? For the libraries as you said maybe.

      The argument that it's not the tools it's the developer stands, however I do think some tools are more oriented towards maintainability (java, c++) and others towards rapid development (perl). You get ugly code in every language, but perl almost directly encourages it. The CPAN tool is _the_ definition of perl. Works, but oh my god is this code or cyphertext!

    21. Re:"Web development can be fun again" by Anrego · · Score: 1

      I created an entire social networking site in Perl

      Not saying people don't use it, or that it's impossible to write maintainable code with it (or any other language), just that it wouldn't be my first choice. Perl doesn't force you to write messy unreadible code, but it does heavily encourage it, and to me writing rigid perl kind of defeats (in my view) the point of perl.

      All that said, when it comes to web programming languages you don't exactly have a great set of choices.

      and have been maintaining it for way more than a few weeks.

      I guess the question would be, is it just you maintaining it. Would someone else be able to come in and pick up where you've left off. This to me is perls huge weakness. Languages like c++, and to an extreme degree java, you can have someone come in and start working. It takes a much longer time to grok perl code.

    22. Re:"Web development can be fun again" by Anonymous Coward · · Score: 0

      It's still _the_ tool for quick one-off type stuff. I know of no other tool that lets you just mash data together and produce something useful as easily and quickly as perl. That said, I'd never use it for a serious application or anything that had to be maintained for more than a few weeks. Those days are gone.. maintainability and reliability are king.

      It's always incredible to read this kind of comment. A good programmer will write maintainable code in any language. A bad programmer will deliver a mess in any language, whatever its level of sophistication.

    23. Re:"Web development can be fun again" by geminidomino · · Score: 1

      unindent ends the block

      And that's not "position-is-syntax"... how, again?

    24. Re:"Web development can be fun again" by Anrego · · Score: 1

      You can write a web server in VB6 if you want to, doesn't mean you should.

      Perl doesn't force you to write ugly code, and with effort you can write maintainable code, but to me perl isn't designed for this. Perl is a hack and slash language, if you are going to stick to rigid designed code, why use perl in the first place.

    25. Re:"Web development can be fun again" by Anrego · · Score: 1

      That, uh, would seem to be the definition of position being part of the syntax. Unless I'm missing something...

    26. Re:"Web development can be fun again" by sqldr · · Score: 1

      don't you indent your code? The position is implied, even in perl. If you're indenting properly, then the closing brace becomes redundant.

      --
      I wrote my first program at the age of six, and I still can't work out how this website works.
    27. Re:"Web development can be fun again" by sqldr · · Score: 1
      --
      I wrote my first program at the age of six, and I still can't work out how this website works.
    28. Re:"Web development can be fun again" by Anrego · · Score: 1

      Didn't say it was a bad thing (although I don't like it.. I find those redundant braces do add clarity for some reason.. ), still doesn't change the fact that in python, indenting is part of the syntax, whereas in other languages is just a good idea.

    29. Re:"Web development can be fun again" by sqldr · · Score: 1

      I guess. Then again, if your blocks in python are more than 3 or 4 lines long, then you're probably doing something wrong. It's referred to derogatively in python-land as "potato programming". Stuff like functools/itertools and list comprehensions are useful for avoiding "indent hell" where the indent becomes longer than the page and you start to lose track of where it all started. I hardly ever use if/for statements. It tries to encourage you to use it as a functional language rather than a procedural one.

      --
      I wrote my first program at the age of six, and I still can't work out how this website works.
    30. Re:"Web development can be fun again" by Rysc · · Score: 1

      This a thousand times.

      The purpose I see for Mojolicious is to provide an alternative to PHP, not Ruby, Python, etc.. If we can get people to use Mojolicious over PHP then when their project becomes a big deal it's easier to manage and maintain.

      --
      I want my Cowboyneal
    31. Re:"Web development can be fun again" by Jimmy+King · · Score: 1

      Yeah, I think we mostly agree. I agree that it's not the best option anymore except for the super short stuff, although I'd keep using it for nearly everything if I could. I just don't feel it's terrible for the big stuff and definitely not as terrible as its reputation would suggest. Some would argue that even enabling such hard to maintain code to be written in the first place is is just as bad, but I see it as flexibility with a tradeoff. You can write harder to read/maintain, really short scripts to do something quickly or slightly more verbose code, but still way shorter than Java or C++, which is maintainable and viable for use in a larger system.

      Part of why I've moved on to Python (as opposed to Ruby, the other big contender as a Perl replacement) is that it feels somewhat like a more modern Perl (and Perl's object model is actually based on Python's, I believe). Some day I may do some side by side comparisons of Python vs Perl code length (although I bet someone else already has) using properly written, maintainable Perl. I don't expect there to be a huge difference in number of lines.

    32. Re:"Web development can be fun again" by Ant+P. · · Score: 1

      I'm decades under 45, and you can go fuck yourself with a rake.

    33. Re:"Web development can be fun again" by Bucky24 · · Score: 1

      A bit more politer than the other person who commented:
      I am quite a bit younger than 45 (as in over 20 years younger) and I use perl on a regular basis.

      --
      All the world's a CPU, and all the men and women merely AI agents
    34. Re:"Web development can be fun again" by yosifkit · · Score: 1

      A bit more politer than the other person who commented:
      I am quite a bit younger than 45 (as in over 20 years younger) and I use perl on a regular basis.

      Dido. Perl is great for the startup I am in.

    35. Re:"Web development can be fun again" by Adm.Wiggin · · Score: 1

      I agree wholeheartedly, and literally laughed out loud when reading your comment. Perl is fantastic. Ah, my kingdom for some mod points, good sir.

    36. Re:"Web development can be fun again" by geminidomino · · Score: 1

      Very interesting. Doesn't answer the question exactly, though... None of those are actually "myths." They may be over-stated concerns, but they all contain partial truth, one of which is that position can be syntactically relevant.

    37. Re:"Web development can be fun again" by Christopher+Cashell · · Score: 1

      Yes you can write maintainable code in perl if you make a specific effort to do so, but to me that defeats the point. It's primarily a hack and slash language that lets you crank out code while you think. To me writing maintainable perl is like writing a quick one-off script in c++ or java. Yes you can do it, but why bother. Use the tool that is suited for the task.

      Have you actually written Perl?

      I mean, no offense, but that's just silly. Maintainable code requires a specific effort in Perl? But it doesn't in other languages? Can you provide anything to back that up? I can add use strict; use warnings to my perl and still have less boilerplate code than an equivalent Java (or C++, or even Python) program.

      Writing maintainable code, in any language requires some effort. Period. Perl makes it no more difficult than any other language, and offers more assistance than most (see warnings/strict/perlcritic/etc).

      As for it defeating the purpose. . . well, I'd ask for evidence, but I'm really not convinced you understand Perl to an extent that you could provide a decent answer. Maybe I'll ask the two co-workers who are maintaining a 6 year old, 60k line perl application at work, see what they think. See if they think Perl is "suited for the task". Last time I talked to them, they seemed to be thoroughly enjoying it, though.

      --
      Topher
    38. Re:"Web development can be fun again" by Christopher+Cashell · · Score: 1

      I agree that it's possible to write maintainable perl, but from my vantage point, perl is not really designed for this.

      To me it's more of a hack n` slash language. Code while you think. All those shortcuts and lack of boilerplate code and ability to just say "take this data, compare it with this, and do whatever" in a few lines is to me perl's strength. The fact that the resultant code is hard to read is the weakness. If you are not going to do that, and write code in a more rigid, designed manner to avoid this, why use perl in the first place?

      The argument that it's not the tools it's the developer stands, however I do think some tools are more oriented towards maintainability (java, c++) and others towards rapid development (perl). You get ugly code in every language, but perl almost directly encourages it. The CPAN tool is _the_ definition of perl. Works, but oh my god is this code or cyphertext!

      I think I see the problem here. It's a perception problem. You've decided that you want Perl to be a "hack n slash" language, so you view it in that way, and only in that way. I think you're seriously shortchanging Perl and pigeonholing it to something that doesn't match reality.

      "Why use Perl" if you're not going to write sloppy code? Because there's a huge number of things that Perl can do really well. For example, using Mojolicious, it can be a great tool for designing web applications. Using CPAN, it can do any number of things. Using Moose, it has Object Oriented capabilities that rival any other language available. It's fast, it's flexible, and it processes text better than anything else.

      Also, I'd really like to see some evidence of your "perl almost directly encourages [ugly code]". No offense, but I think that's a bunch of crap. It perpetuates a stereotype that isn't based on fact, but prejudice. Take 10-20 minutes and do a little research on Perl. Not Perl as you think it is (based on outdated assumptions and incorrect information), but as it really is. Look at the Modern Perl movement, the push to get past the misinformation about ancient Perl, and the awesome new world of Perl.

      It's a much different world than you seem to see. And, for the record, having written C++ and Java professionally in the past, I'd much rather maintain Perl code than either of those.

      --
      Topher
    39. Re:"Web development can be fun again" by Anrego · · Score: 1

      I'd say that the perception of perl as a hack `n slash language didn't come out of nowhere. I'll accept this may have changed as I haven't used perl in a while, and when I did, it was maintaining a very poorly designed system... but it's pretty damn hard to deny that perl at least at one point was the definition of a write once read never language.

  7. Oh boy by 93+Escort+Wagon · · Score: 2, Insightful

    Another perl web framework. I can't wait. I'm champing at the bit. /yawn

    I use perl all the time, and have yet to run into a framework that actually saves time overall. They're generally designed by Unix guys who really don't want to think about web design any more than they have to - and it shows.

    --
    #DeleteChrome
    1. Re:Oh boy by draven · · Score: 1

      I think you are wrong there. Sebastian actually cares about the web. http://mojolicio.us/ was designed by the author of the framework himself, and as you can see it's not your typical Perl project home page. He even drew all the artwork.

      --
      -- Marcus Ramberg
  8. Re:Perl is the most refreshing programming languag by nullchar · · Score: 1

    So true! Even if you use strict;, apply liberal comments, and avoid $_ and @_ whenever possible.

  9. Let's be hatin' on Perl! by Anonymous Coward · · Score: 0

    I hate you Perl.

  10. Make a CoffeeScript for Perl by Anonymous Coward · · Score: 0

    If someone can make javascript look pretty, how about making perl pretty?

    1. Re:Make a CoffeeScript for Perl by maxwell+demon · · Score: 1

      Isn't Perl 6 intended to do that? At least it finally gets rid of changing sigils by context. Which is probably the most confusing "feature" of Perl.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    2. Re:Make a CoffeeScript for Perl by Anonymous Coward · · Score: 1

      Like putting makeup on a .... Hydra? Giyagas? Fuck, I don't know, but it still isn't pretty pretty.

    3. Re:Make a CoffeeScript for Perl by TheLink · · Score: 1

      I don't need perl pretty. You want pretty, you write perl programs in a pretty style, or switch to python or something else.

      But if they can make perl as fast as the fastest javascript that would be very nice.

      --
  11. Useful for just certain applications by FyberOptic · · Score: 3, Insightful

    I suppose the idea is neat, but I personally don't have any particular applications where I need Perl to actually be the whole webserver for me. The things that do come to mind would involve a small system where there is no webserver installed, but going on port 80 would mean running the script with higher privileges and the whole mess of Perl and everything need to be jailed. Or maybe to try one of those utilities I heard about to pass privileged ports to an app, but I haven't had experience with those.

    To be honest, frameworks left kind of a bad taste in my mouth when a language such as Ruby that had been around for years suddenly exploded when Ruby on Rails showed up. Everybody and their brother thought it was the new hip thing to use, until a lot of the bigger websites which had deployed it started to actually dump it due to limitations. Nobody wanted to take the time to write good code to start with, and it bit them in the butt.

    Using frameworks (whether it's .NET or on the web or otherwise) usually starts out as a means to set up a new project quickly, but the problem is that they end up being an excuse to make sloppy bloated coat for the final product. Perl was always fast and efficient; people should learn to develop in it that way.

    1. Re:Useful for just certain applications by skazatmebaby · · Score: 3, Interesting

      If I'm reading the docs correctly, the webserver part of Mojolicious is optional:

      http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#DEPLOYMENT

      It also supports a pretty substantial list of alternatives to its build in web server. Want to only run it as a CGI script? Then do that. Run your app as a PSGI script? Yeah, you can do that too. Started as a CGI script by now need a lot more HP? Not so hard to move what you started on something simple to something with a little more Umph.

      So that's I guess, "neat"

      --

      Dada Mail - Program, Art Project or Absurdity?

    2. Re:Useful for just certain applications by drjones78 · · Score: 1

      PSGI is like Python's WSGI or Ruby's rack, and is what Mojolicious supports. It abstracts your web app from your web server... so any web server supporting PSGI will support Mojolicious - so you don't have to use a perl webserver. PSGI is supported by most webservers, like Apache.

  12. Off topic by Megahard · · Score: 1

    So how did the camel icon lose its head? Is it the new security to protect us from zombie camels?

    --
    I eat only the real part of complex carbohydrates.
    1. Re:Off topic by InfiniteZero · · Score: 1

      Apparently the span tag, which contains the icon and is narrower is width, has "overflow" set to "hidden".

      Ironic in a thread about web development.

  13. Re:Perl is the most refreshing programming languag by arth1 · · Score: 4, Informative

    Don't avoid $_ and @_; use them when they are useful, even in implicit form. Perhaps especially in explicit form.

    What's more elegant?

    # Declare variable $mystring
    my($mystring);
    # Get rid of $_
    $mystring = $_;
    # Strip line endings from string
    # We use chomp because it will only delete CR and LF,
    # unlike chop which will delete any character.
    $mystring =~ chomp($mystring);
    # We do it twice in case the string ended in CR+LF
    # which is common in MSDOS
    $mystring =~ chomp($mystring);

    or

    require 5.9.0; # avoid ugly $foo =~ chop $foo
    my $mystring = $_;
    # Strip newlines
    while ($mystring =~ m/[\r\n]$/) {
      # String has CR or LF at end, strip it
      chop $mystring;
    }

    or

    # chop any number of CR and LF from end of string:
    chomp while chomp;

    I have seen far too much misguided code of the first and second type.

    Have the comments explain what the purpose of the code is, not how it does it. The way to fix perl code isn't to read and understand the actual code, but replace the part that doesn't work as expected with code that does. If you understand your comment and know how to write perl, you don't really need to understand how a cryptic line does something - it's faster to rewrite it from scratch to do what you want.

  14. Re:Perl is the most refreshing programming languag by Anonymous Coward · · Score: 0

    Why loop when you can use a regex? Isn't that what perl is for?

    # chop any number of trailing CR/LF:
    s/[\r\n]+//;

  15. Re:Perl is the most refreshing programming languag by flyingfsck · · Score: 1

    Purrrrfect Perl! I salute you, my dear sir.

    --
    Excuse me, but please get off my Pennisetum Clandestinum, eh!
  16. Re:Perl is the most refreshing programming languag by Anonymous Coward · · Score: 0

    Err, I need to look at the preview before posting... There should be a $ in there

    # chop any number of trailing CR/LF:
    s/[\r\n]+$//;

  17. Installation by Anonymous Coward · · Score: 0

    Anyone expecting users to run some random script from url (and not even https) using sudo is just fucking retarded.

    I wonder if the rest of this framework is just as wonderfully secure as its installation method.

    1. Re:Installation by draven · · Score: 1

      I recommend using perlbrew (http://perlbrew.pl) to install the latest version of perl in your home directory. Then you can just drop the sudo. You *could* also just install this thing using the normal cpan shell that ships with perl, cpanmin.us is just a convenience to make things easier.

      With regards to the https - You might notice that http://cpanmin.us redirect to - https://raw.github.com/miyagawa/cpanminus/master/cpanm

      --
      -- Marcus Ramberg
    2. Re:Installation by larry+bagina · · Score: 1

      And where will it redirect when the DNS is poisoned or hacked?

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

  18. Re:Perl is the most refreshing programming languag by arth1 · · Score: 2

    Indeed. While it's slower than "chomp while chomp", it doesn't depend on $/ being set correctly.

    (If you can rely on $/, and you golf, s-$/+$-- is even shorter)

  19. pretty? by lynnae · · Score: 1

    I've never understood exactly what people mean by "pretty" when it comes to code.

    I assumed it meant easier to read but longer to write, but looking over some comments here, is it used as a synonym for "made it easier?"

    I mean, I find perl ugly but only because I can't read it very well. Otherwise I find it elegant.

  20. Modern Perl? by sco08y · · Score: 1

    Wouldn't that be Perl6?

    1. Re:Modern Perl? by hey · · Score: 1

      Does it work yet?

    2. Re:Modern Perl? by sqldr · · Score: 1

      I checked the release schedule.

      First alpha: 2045

      Second alpha: 3110

      First beta: shortly before the north american continent collides with the asian continent

      Second beta: approximately around the time of inteplanetary space travel

      Release candidate 1: Dolphins have evolved fingers

      Release:candidate 2: Human race enslaved by dolphins

      Release: Universe dies of heat death

      --
      I wrote my first program at the age of six, and I still can't work out how this website works.
    3. Re:Modern Perl? by Ant+P. · · Score: 1

      You could figure that out for yourself, but I suspect you're not actually interested in having your snarky rhetorical question shot down with an answer.

    4. Re:Modern Perl? by blair1q · · Score: 1

      shortly before the north american continent collides with the asian continent

      Actually, that happened a long time ago. Notheast Siberia and Northern Japan are on the North American plate. The Bering Strait is fairly recently dry land that has become depressed due to the compressive stress.

  21. Re:Perl is the most refreshing programming languag by Anonymous Coward · · Score: 0

    LMFAO - true, so true.

  22. Assumptions by CadentOrange · · Score: 5, Insightful

    If you understand your comment and know how to write perl, you don't really need to understand how a cryptic line does something - it's faster to rewrite it from scratch to do what you want.

    That assumes that the comment correctly describes what the code intends to do. This is a very big assumption to make and I've worked on numerous projects where the comments were significantly different from what the code did. Looking through the change logs, this situation always arises because someone updated the code but didn't bother to update the comments.

    This brings me to my point: The code doesn't lie.

    If you can't understand a piece of code, you're going to be working off assumptions. Refactoring code based on assumptions is dangerous unless you have very rigorous unit tests. I've found that the level of code obfuscation is negatively correlated with the quality (or even presence!) of unit tests. YMMV.

  23. 2.00 = 1.99 + 0.01: what's new? by dolmen.fr · · Score: 1

    Mojolicious has releases almost every day. 2.0 is just 1.99 + 0.01.
    So what's new? It's just a new release that break things, like almost every others...

    1. Re:2.00 = 1.99 + 0.01: what's new? by dolmen.fr · · Score: 1

      It's just a new release that break things, like almost every others...

      My point is that the "release early, release really really really often" model of Mojolicious is hard to follow, and sometimes painful.

      Also 2.0 being a major release just after 1.99 is quite unexpected as I've seen nothing announcing it (neither in Changes or on the blog.

  24. About time! by Lisandro · · Score: 1

    The last time i fiddled with a Perl web framework was with Mason - i've been checking out Mojolicious and it looks really cool. It implements a lot of stuff that Django got right in a language that deserves more love than it usually receives.

    Really cool stuff. I'll have to try it later at home.

  25. Programming with Perl 40hrs/week x 14 years by Anonymous Coward · · Score: 1

    I'm pretty much over it to be completely honest. To me modern Perl is Python. All the stuff you learn to hate about Perl just kind of goes away when you use Python. The only thing Perl really has going for it is CPAN. I have yet to find a programming language that has a resource that even compares to CPAN.

    1. Re:Programming with Perl 40hrs/week x 14 years by sco08y · · Score: 1

      I'm pretty much over it to be completely honest. To me modern Perl is Python. All the stuff you learn to hate about Perl just kind of goes away when you use Python. The only thing Perl really has going for it is CPAN. I have yet to find a programming language that has a resource that even compares to CPAN.

      I think PyPi has a pretty good collection and, really, if I'm doing something that's complicated enough to where it's worth installing a 3rd party library, it's going to be in Python.

  26. wanna migrate to ruby by Anonymous Coward · · Score: 0

    I just looked.

    Though I'm an old time Perl coder; I like the look of Ruby with Sinatra better: http://www.sinatrarb.com/

  27. Might as well plug my own framework .. by aspeer · · Score: 1

    WebDyne - another embedded Perl interpretation. See the examples here. Just a hobby project, but it scratches an itch - and makes active web pages easier for me to make at least ..

  28. Re:Perl is the most refreshing programming languag by Anonymous Coward · · Score: 0

    s/\s+$//s ?

  29. Re:Perl is the most refreshing programming languag by Just+Some+Guy · · Score: 2

    What's more elegant?

    mystring = mystring.rstrip()

    (or mystring = mystring.rstrip('\r\n') if you're pedantic about only removing EOL chars)

    --
    Dewey, what part of this looks like authorities should be involved?
  30. Looks useful by Anonymous Coward · · Score: 0

    It is informed by catalyst, which I have found useful on a number of projects and I especially liked running with FastCGI. Complex page rendering logic to build a yahoo style web directory with under 0.2s per query. I waited for Mojolicious to mature and they say it is concise, has json xml parsing and rest built in.Using Perl 5.12 it sounfs like it is fun too. It looks like a quixk way to buld web services.

  31. mojo by Rysc · · Score: 3, Interesting

    Totally apart from a pretty slick MVC framework the Mojolicious project has my undying affection for producing the mojo tool.

    How many times have you wanted to scrape something out of a web page and you thought "I know, I'll use wget (or curl) and sed! Easy enough." so you write

    # get story titles from slashdot
    wget slashdot.org -O - 2>/dev/null | sed -e 's/uh, what now?//'

    And then you get stuck fiddling with ever-crazier sed expressions to filter down to just the data you want? I know I've been there a dozen times and wound up with various unpleasant solutions or, when necessary, I've broken down and written a proper perl script which parses the HTML (and taken about 20 times as long as I planned to take to do it!) Maybe you try

    # get story titles from slashdot
    wget slashdot.org -O - 2>/dev/null | sed -n '/"title-/{s/<[^>]*>//g;s/^[ \t]*//;p}'

    And just go with it, because it's good enough. Well, no more! Now I can say

    mojo get slashdot.org 'h2.story > span:first-child>a' text

    And have my results just like that!

    Just as jQuery was a revolution in DOM scripting, to the point where I just won't write JS without it, so is mojo a revolution for these kinds of applications. I can now pull down pages and parse the actual structure and select just what I need. Beautiful.

    --
    I want my Cowboyneal
    1. Re:mojo by Lisandro · · Score: 1

      Really nice. I have to try this.

  32. Re:Perl is the most refreshing programming languag by shutdown+-p+now · · Score: 1

    apply liberal comments

    Don't do it - liberal comments always lie! Comment conservatively instead. ~