[Pdx-pm] Mojolicious anyone?

Daniel Hedlund daniel at digitree.org
Sat Jan 8 21:29:05 PST 2011


Has anyone had a chance to play around with Mojolicious
(http://mojolicio.us/)?  If so, what's been your experience with it?
It looks very cool and reminds me a lot of the Sinatra DSL for Ruby,
but with support for some HTML5 features out of the box (i.e.
websockets).  If there's any interest, I could try to give a
demonstration at a future meeting.

A couple examples from their website...

# Simple route with plain text response
get '/hello' => sub { shift->render(text => 'Hello World!') };

# WebSocket echo service
websocket '/echo' => sub {
    my $self = shift;
    $self->on_message(
        sub {
            my ($self, $message) = @_;
            $self->send_message("echo: $message");
        }
    );
};


Cheers,

Daniel Hedlund
daniel at digitree.org


More information about the Pdx-pm-list mailing list