Questions tagged [mojolicious]

Mojolicious is an MVC web framework in Perl.

Back in the early days of the web there was this wonderful Perl library called CGI, many people only learned because of it. It was simple enough to get started without knowing much about the language and powerful enough to keep you going, learning by doing was much fun. While most of the techniques used are outdated now, the idea behind it is not. Mojolicious is a new attempt at implementing this idea using state of the art technology.

Features An amazing web framework supporting a simplified single file mode through Mojolicious::Lite. Powerful out of the box with RESTful routes, plugins, Perl-ish templates, session management, signed cookies, testing framework, static file server, I18N, first class unicode support and much more for you to discover.

Features

  • An amazing MVC web framework supporting a simplified single file mode through Mojolicious::Lite. Powerful out of the box with RESTful routes, plugins, Perl-ish templates, session management, signed cookies, testing framework, static file server, I18N, first class unicode support and much more for you to discover.
  • Very clean, portable and Object Oriented pure Perl API without any hidden magic and no requirements besides Perl 5.8.7.

  • Full stack HTTP 1.1 and WebSocket client/server implementation with IPv6, TLS, Bonjour, IDNA, Comet (long polling), chunking and multipart support.

  • Builtin async IO web server supporting epoll, kqueue, UNIX domain sockets and hot deployment, perfect for embedding.

  • Automatic CGI, FastCGI and PSGI detection.

  • JSON and XML/HTML5 parser with CSS3 selector support.

  • Fresh code based upon years of experience developing Catalyst.

Resources and links

613 questions
18
votes
3 answers

Apache proxyPassReverse and Websockets

I've been working on a Perl Mojolicious project that uses websockets. I'm wanting to launch it on a shared server running apache and use proxyPass and proxyPassReverse to make the url prettier for my Mojolicious code running with Hypnotoad. I have…
user1439590
  • 301
  • 1
  • 3
  • 7
13
votes
2 answers

Is Mojolicious's "morbo" good for production?

Is Mojolicious' morbo (development web server) good enough for production? Also, is morbo good enough to handle many http requests? Or, must I use Apache's mod_perl for production instead of morbo?
dns
  • 2,564
  • 1
  • 22
  • 30
13
votes
3 answers

How Upload file using Mojolicious?

I have been trying out Mojolicious web framework based on perl. And I have try to develop a full application instead of the Lite. The problem I am facing is that I am trying to upload files to server, but the below code is not working. Please guide…
Kunal Jha
  • 1,912
  • 4
  • 22
  • 34
12
votes
1 answer

How do I fake the client IP address in a unit test for a Mojolicious app?

In my Mojolicious app I need to use the client's IP address ($c->tx->remote_address) for rate limiting of a service. This works well. I am now trying to build a unit test for this feature, but I am having trouble faking the client's IP in my…
simbabque
  • 50,588
  • 8
  • 69
  • 121
12
votes
1 answer

How to call action in some other controller in Mojolicious?

I have an application that uses the Mojolicious framework. I have a table in the database that has a list of error response and additional details associated with it. I have created corresponding Result and Resultset to work with the DB table. There…
Ha Sh
  • 654
  • 5
  • 26
11
votes
1 answer

How do we unit test a Mojolicious controller?

We have created the following simple Mojolicious controller: package SampleApp::Pages; # $Id$ use strict; use warnings; our $VERSION = '0.01'; use Mojo::Base 'Mojolicious::Controller'; sub home { my $self = shift; $self->render(…
purinkle
  • 867
  • 2
  • 8
  • 19
10
votes
1 answer

Why can't I stop my Mojo app using systemd?

I can fire up my Mojo app via systemd without any issues, but I can't stop or restart it in the same way. I've poached my config mostly from the Mojo docs at…
oalders
  • 5,099
  • 2
  • 19
  • 34
10
votes
2 answers

Mojolicious url_for: absolute path

I'm currently trying to port one of my smaller catalyst apps to Mojolicious (just for the fun of it). Say that we are on a page: http://whatever.com/generate. On that page there is a link to for example "generated" When using catalyst (with TT…
ldx
  • 2,254
  • 2
  • 16
  • 25
10
votes
3 answers

Do Mojolicious and Moose play well together?

I'm working on a Mojo app and I'd like to be able to consume some Moose roles to make my life easier. On CPAN I see MojoX::Moose::Controller, which has very simple internals. I don't see much else on using Moose with Mojo. Any potential issues I…
oalders
  • 5,099
  • 2
  • 19
  • 34
10
votes
3 answers

Nonblocking django?

At work I'm not allowed to use perl for web services. Python is allowed however. What I need to do is serve up the results of some very slow c++ binaries. Each exe takes up to 20 seconds to run. In perl I'd just use mojolicious's non blocking event…
tlrrd
  • 322
  • 2
  • 8
10
votes
3 answers

mojolicious referencing a stash variable not always defined

I am still learning mojolicious and MVC frameworks in general so this just might be a problem where I am thinking about this wrong so if I am please suggest a better way to do the following. I have a route /route/:param where param is sometimes…
Justin Belfield
  • 115
  • 1
  • 5
9
votes
3 answers

Params::Validate or Params::Check, why should I prefer the one or the other?

It is hard for me to choose between two perl modules - Params::Validate and Params::Check. I am writing a Mojolicious application which should be easily distributable. Generally I mean something like uploading a directory structure on a shared…
Беров
  • 1,335
  • 10
  • 22
9
votes
1 answer

NBSP malformed while using Mojo::DOM

I am using Mojo::DOM Perl module to replace tag, but the   entity is replace by Mojo::DOM with \xa0, but when I print it out to the page the NBSP character becomes \x{fffd} and shows up as a question mark. I have tried replace \x{00a0}…
Pradeep
  • 2,974
  • 15
  • 21
9
votes
2 answers

How to use new syntax features in Mojolicious templates

I want to use fancy postfix dereferencing in my Mojo templates. I suppose I could do % use experimental 'postderef'; at the top of every template file, but that seems repetitive and lame. Is there a way I can make Mojolicious import my pragma…
friedo
  • 62,644
  • 16
  • 111
  • 180
9
votes
3 answers

Hypnotoad Logfile

Does Hypnotoad write any Logfile? I can't find anything about that here: http://mojolicio.us/perldoc/Mojo/Server/Hypnotoad Also the option --help says nothing about it. I understand, that application-wise I need to use stuff like…
Boris Däppen
  • 1,136
  • 7
  • 20
1
2 3
40 41