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

672 questions
0
votes
1 answer

Mojolicious REST + IOLoop concurrent service

First of all I'm a newbie in Perl and Mojo so I'll do my best with this.. :D The problem is that I need to work in parallel, so this service need to process several calls every second. This service will allow other services to connect over REST in…
Courier
  • 63
  • 1
  • 10
0
votes
1 answer

Different controllers depending on GET parameter

In mojolicious app I want define different controller action for url depend on get parameter. In pseudocode it is: #test.pl?command=check&id=1 $r->route('/test.pl?command=check')->via('GET')->to(controller => 'bar', action =>…
Korjavin Ivan
  • 439
  • 1
  • 5
  • 15
0
votes
1 answer

mojolicious script works three times, then crashes

The following script should demonstrate a problem I'm facing using Mojolicious on OpenBSD5.2 using mod_perl. The script works fine 4 times being called as CGI under mod_perl. Additional runs of the script result in Mojolicious not returning the…
user1458620
  • 205
  • 1
  • 4
  • 12
0
votes
1 answer

how to parse the following html?

I have following html i would like to extract information and reshape them into a table-like database:
Var1 observation 1 …
0
votes
0 answers

Nginx reverse proxy for websocket and normal HTTP traffic with ssl

Possible Duplicate: Can nginx be used as a reverse proxy for a backend websocket server? I'm writing a webapp using mojolicous for my backend. Using nginx as reverse proxy in front of my hypnotoad webserver made my site accessible via ssl but not…
msfgt
  • 161
  • 1
  • 1
  • 8
0
votes
2 answers

UTF8 strings partially not recognized

When I fetch Cyrillic text from SQLite3 database, in some situations perl (or Mojolicious, or DBIx::Class - I honestly don't know) fails to decode bytestream. For example, given the text: 1984г1ф!!11четыре output will…
0
votes
1 answer

Passing a file as param in Mojolicious controller unit test

I have a file upload application. I want to test my Upload controller. For that how do I pass a file to my test? For file upload in my application I use an external application/plugin (Flash/HTML5/HTML4).
y2p
  • 4,791
  • 10
  • 40
  • 56
0
votes
1 answer

Mojox::Session expires but never removed from database

I am using mojox::session with a PostgreSQL db. I have a expires column in the table. I am not sure the purpose of it. Basically, my question is how does the whole thing about expires work. How is session expired and how is the row in table…
PMat
  • 2,039
  • 2
  • 29
  • 46
0
votes
1 answer

Is there only one transport type for MojoX::Session?

Is there only one transport type for MojoX::Session, MojoX::Session::Transport::Cookie? I could not find any other transport type.
PMat
  • 2,039
  • 2
  • 29
  • 46
-1
votes
1 answer

add a simple pre formatting to mojolicious lite app

I am following the Mojolicious lite tutorial but struggling to generate a page with the
content
formatting. Waht do I need to change so that the output is formatted as a block of
content
HTML? Here is what I…
719016
  • 9,922
  • 20
  • 85
  • 158
-1
votes
1 answer

How to use stash when render file in command (mojolicious)

I render file in command using Mojo::Template. How can I use stash (like in controller $c->stash(value => 1)). I know I be able pass array. But I need use the stash. my $mt = Mojo::Template->new; my $html = $mt->render_file(…
muhana
  • 101
  • 1
  • 8
-1
votes
1 answer

How to pass binary data to Mojolicious Minion?

I am using the great tool for long running tasks Minion (docs) For queued task I can provide a path to file. This works fine if minions are working on same host machine. But how to create task and pass binary data, if minions are running on…
Eugen Konkov
  • 22,193
  • 17
  • 108
  • 158
-1
votes
1 answer

I'm looking for a "date-picker" that works for all the browsers

This is how it should look on all the browsers: And this is how it looks on Safari, for example: This is the code that I am using at the moment: <%= date_field 'birth_date', rel => 'birth_date', class => "form-control", required => undef…
Marinescu
  • 429
  • 3
  • 18
-1
votes
1 answer

"if (-f $file_path1) {" is always true regardless whether or not a file exists

In my Mojolicious app I have this: if (-f $file_path1) { app->log->debug("file1 exists: $file_path1"); # ........... } else { app->log->debug("file1 doesn't exist: $file_path1; creating....\r\n"); Regardless of its presence, it never…
Rattiku
  • 177
  • 2
  • 11
-1
votes
1 answer

How to make a Mojolicious::Plugin::Minion job handle a large file upload

I am trying to handle large file uploads with Mojolicious::Plugin::Minion so that I can respond to the user or the REST API caller quickly. # app start up sub startup { ... $self->minion->add_task(upload_file => sub { …
Sachin Dangol
  • 504
  • 5
  • 13
1 2 3
44
45