Mojolicious hack of the day: More AnyEvent, oh my

Ever since we added AnyEvent support to Mojolicious through EV, it has been a very popular feature. But so far it required Mojolicious to be in control of the event loop, which limited its usefulness quite a bit. That has changed now, both our web server and user agent have become pretty much indistiguishable from normal AnyEvent components. Today i'm going to demonstrate how you can non-blockingly search Twitter for Perl with the user agent, from a PSGI application running inside the AnyEvent based Twiggy web server. In fact, it should work with any non-blocking capable web framework, such as Catalyst.

Have fun!

Mojolicious and DBIx::Class

If you've ever been wondering how a well designed DBIx::Class model for Mojolicious and Mojolicious::Lite applications would look like, Glen Hinkle got you covered with his latest release.

The example application demonstrates DBIx::Class integration, how to test your web app with Test::Mojo, as well as how to use EP templates with and without tag helpers. For those unfamiliar with testing in general, there are even examples of DBIC schema tests.

Have fun!

A logo for MetaCPAN

In case you've missed it, there is currently a logo contest for MetaCPAN in progress. I'm generally not a big fan of contests, but since it's for the Perl community, i'm participating as well. Here's what i came up with. (the official entry should later show up here)

Sri_cpan_org-retro-rendered-1-120103

No fonts were harmed in the making of this logo, every character is custom made. I tried to combine a retro and futuristic feel, to highlight the long history of Perl and the fact that the CPAN is still science fiction for many programming languages. The three flying pixels are a metaphor for modules, small building blocks that can be combined to form something new. Hope you like it.

Sri_cpan_org-retro-rendered-2-120103

Have fun!

Mojocast #5 Mojo::UserAgent

Mojocast_5_splash

Merry christmas everyone, today Glen "tempire" Hinkle has a special treat for us. In this Mojocast he demonstrates why interacting with the web from Perl has never been this much fun before, you should take a look!

Mojocast Monday brings you a high-level overview of Mojo::UserAgent, the client side of Mojolicious. DOM Walking, CSS selectors, and watching live requests are just a couple of the things you'll see.

Have fun!

Mojolicious hack of the day: WebSockets

By now you've probably heard about WebSockets, and that they are the future of web development, but so far there are very little examples that really show how easy to use they actually are. So today we are going to explore the wonderful world of events in Mojolicious a bit and build a little application that forwards all framework log messages to a browser window. (works best in Chrome)

Have fun!

Mojolicious 2.0 released: Perl real-time web framework

Autumn
I'm very happy to announce the release of Mojolicious 2.0 (Leaf Fluttering In Wind).

It is now almost a year since our first stable release, and what a great year it has been. The community really exploded, with now over 100 regulars on the IRC channel and 450 watchers on GitHub, making us by far the most successful CPAN module there. Thanks everyone!

Of course we also have many new features for you, here are the highlights:

  • Perl 5.10.1: We have finally increased the Perl version requirement and are already using all new features extensively. The performance increase is substantial, especially if you're coming from Perl 5.8.
  • Morbo: A brand new self-restarting development web server that just works, even on Windows.
  • libev: Native support for the EV event loop and in turn AnyEvent. (example)
  • Events: Many objects now emit events, which can be used to extend Mojolicious. (you'll hear much more about this soon, it's very cool)
  • Mount plugin: Whole Mojolicious applications can now be embedded easily.
  • Groups: Mojolicious::Lite applications became a lot more powerful. (example)
  • Hypnotoad: Our primary production web server got a lot more user friendly.
  • Collections: Making web scraping a hell of a lot of fun. (example)
  • WebSocket testing: You won't believe how easy it can be. (example)

And as usual there is a lot more to discover, see Changes on GitHub for the full list of improvements.

Have fun!