Questions tagged [mojolicious-lite]

A single-file DSL for the Mojolicious web framework for the Perl language. It is just a tiny wrapper around Mojolicious, so [tag:mojolicious] may be more appropriate for questions not about the DSL itself.

Related Tags:

77 questions
2
votes
1 answer

Mojolicious basic login with

iam looking for authentification in Mojolicious. I have 2 pages momcorp1 and momcorp2, But i cant pas between over pages, someone know how do this. Iam reaading about "under", but i dont undertah how do this. The other form do this is use…
Memo R
  • 67
  • 5
2
votes
0 answers

Combining a RabbitMQ consumer and a Mojolicious websocket server

I've got a Mojolicious server inspired by this example, and a RabbitMQ consumer inspired by this example. My plan is to combine them, so that a webclient can access the Mojolicious server and subscribe to some kind of updates. The mojo server will…
Orjanp
  • 10,641
  • 12
  • 36
  • 39
2
votes
1 answer

Multiple file upload with mojolicious fails on large number of files

I've hit a wall and my google skills have this time failed me. I'm in the process of learning mojolicious to create a useful front end for a series of Perl scripts that I frequently use. I've got a long way through it but I'm stumped at (multiple)…
user1597452
  • 93
  • 1
  • 5
2
votes
1 answer

Using external template with Mojolicious::Lite

trying to use the HTMLTemplateProRenderer plugin for Mojolicious::Lite so that I can use template files in the style of HTML::Template. The issue is that every example, even documentation, only shows the template file attached to the script. I need…
Maresia
  • 67
  • 2
  • 2
  • 6
2
votes
0 answers

Mojo::Redis2 as task queue - nondeterministic behavior

I would like to implement light job queue using Redis (minion requires Postgresql). I can successfully run a minimal example but I have problem with my full Mojolicious application. In the startup routine and the call look as follows. sub startup{ …
vikin9
  • 497
  • 4
  • 16
2
votes
1 answer

How can I make a request authorized with Oauth with Mojo::UserAgent?

I am currently trying to make this work: my $ua = Mojo::UserAgent->new; my $req = Mojo::Message::Request->new; my $tx = $ua->build_tx(GET =>…
simone
  • 4,667
  • 4
  • 25
  • 47
2
votes
2 answers

Mojolicious: should I use one websocket or several?

I'm teaching myself about Mojolicious and websockets. So far I've got a web page that displays rows from a database, and has buttons to add, delete, and update rows, and to select columns for sorting. At the moment, it uses 'one-shot' websockets in…
2
votes
1 answer

How to add and remove routes dynamically in Mojolicious?

I am trying to put together a maintenance page in my Mojolicious app which all of my users will be shown whenever a file or DB entry is present on the server. I know I can check for this file or entry on startup and if its there add in my 'catch…
user1768233
  • 1,409
  • 3
  • 20
  • 28
2
votes
2 answers

How can I make a Mojolicious::Lite static file downloader?

I'm trying to make a file upload/downloader with Mojolicious::Lite and while the upload section is no problem the download section is causing trouble. This code will let me download small text files but anything else turns into a 0 byte file. Any…
Johan
  • 41
  • 1
  • 4
2
votes
1 answer

Rendering errors in proper format inside under on Mojolicious::Lite

I have an under statement that may generate and error (for instance, authentication error). I use content negotiation all over, and I'd like to return the error inside the under in a proper format. An example code: under sub { my $self = shift; …
2
votes
1 answer

How to use common template for mojolocious lite app?

use Mojolicious::Lite; # /with_layout get '/a' => sub { my $self = shift;} ; get '/b' => sub { my $self = shift;} ; get '/c' => sub { my $self = shift;}; app->start; __DATA__ @@ a.html.ep <%=…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/perl" class="post-tag grid--cell" title="show questions tagged 'perl'" rel="tag">perl</a> <a href="../../questions/tagged/mojolicious" class="post-tag grid--cell" title="show questions tagged 'mojolicious'" rel="tag">mojolicious</a> <a href="../../questions/tagged/mojolicious-lite" class="post-tag grid--cell" title="show questions tagged 'mojolicious-lite'" rel="tag">mojolicious-lite</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Nov 01 '12 at 17:16">asked Nov 01 '12 at 17:16</time> <a href="../../users/120457/joe" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/120457.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="joe" /> </a> <div class="s-user-card--info"> <a href="../../users/120457/joe" class="s-user-card--link">joe</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">34,529</li> <li class="s-award-bling s-award-bling__gold" title="29 gold badges">29</li> <li class="s-award-bling s-award-bling__silver" title="100 silver badges">100</li> <li class="s-award-bling s-award-bling__bronze" title="137 bronze badges">137</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-76581022"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status "> <strong>2</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/76581022/problems-decoding-the-response-body-when-calling-a-rest-service-with-mojolicio" class="question-hyperlink">Problems decoding the response body when calling a REST service with Mojolicious for Perl</a></h3> <div class="excerpt">I am trying to learn how to use the Mojolicious framework for Perl. I am attempting to register a callback URL with a REST service and save the RequestID returned by the REST service. I successfully get back the request but can't decode the…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/rest" class="post-tag grid--cell" title="show questions tagged 'rest'" rel="tag">rest</a> <a href="../../questions/tagged/perl" class="post-tag grid--cell" title="show questions tagged 'perl'" rel="tag">perl</a> <a href="../../questions/tagged/mojolicious" class="post-tag grid--cell" title="show questions tagged 'mojolicious'" rel="tag">mojolicious</a> <a href="../../questions/tagged/mojolicious-lite" class="post-tag grid--cell" title="show questions tagged 'mojolicious-lite'" rel="tag">mojolicious-lite</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jun 29 '23 at 12:22">asked Jun 29 '23 at 12:22</time> <a href="../../users/13599261/martin-r-smith" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/13599261.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Martin R. Smith" /> </a> <div class="s-user-card--info"> <a href="../../users/13599261/martin-r-smith" class="s-user-card--link">Martin R. Smith</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">23</li> <li class="s-award-bling s-award-bling__bronze" title="3 bronze badges">3</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-65753756"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/65753756/use-mojolicious-lite-perl-i-want-to-get-a-list-of-all-params-into-a-simple-arr" class="question-hyperlink">use Mojolicious::Lite (perl) - I want to get a list of all PARAMS into a simple @ARRAY</a></h3> <div class="excerpt">https://<server_name>/getparam?h1=hello&h2=goodbye get 'getparam' => sub { my $c = shift; print $c->param('h1') . "\n"; # THIS WORKS AS I WOULD EXPECT my @list_of_all_params = $c->param; # DOES NOT WORK and THIS IS WHAT I WOULD LIKE TO…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/arrays" class="post-tag grid--cell" title="show questions tagged 'arrays'" rel="tag">arrays</a> <a href="../../questions/tagged/perl" class="post-tag grid--cell" title="show questions tagged 'perl'" rel="tag">perl</a> <a href="../../questions/tagged/mojolicious-lite" class="post-tag grid--cell" title="show questions tagged 'mojolicious-lite'" rel="tag">mojolicious-lite</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jan 16 '21 at 19:25">asked Jan 16 '21 at 19:25</time> <a href="../../users/14594226/mark-arnold" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/14594226.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Mark Arnold" /> </a> <div class="s-user-card--info"> <a href="../../users/14594226/mark-arnold" class="s-user-card--link">Mark Arnold</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">253</li> <li class="s-award-bling s-award-bling__silver" title="3 silver badges">3</li> <li class="s-award-bling s-award-bling__bronze" title="9 bronze badges">9</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-63406074"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/63406074/how-to-search-from-mysql-db-with-related-to-selected-drop-down-list-in-mojolic" class="question-hyperlink">How to search from mysql DB with related to selected drop down list in mojolicious perl</a></h3> <div class="excerpt">I have student ordered information data stored in DB. I want to search those orders in between by dropdown selected from-to date and time-wise. Normally, I can search all data from DB but could not work when I select the dropdown from-to date and…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/mysql" class="post-tag grid--cell" title="show questions tagged 'mysql'" rel="tag">mysql</a> <a href="../../questions/tagged/perl" class="post-tag grid--cell" title="show questions tagged 'perl'" rel="tag">perl</a> <a href="../../questions/tagged/cgi" class="post-tag grid--cell" title="show questions tagged 'cgi'" rel="tag">cgi</a> <a href="../../questions/tagged/mojolicious-lite" class="post-tag grid--cell" title="show questions tagged 'mojolicious-lite'" rel="tag">mojolicious-lite</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Aug 14 '20 at 03:25">asked Aug 14 '20 at 03:25</time> <a href="../../users/13818228/raju" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/13818228.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="raju" /> </a> <div class="s-user-card--info"> <a href="../../users/13818228/raju" class="s-user-card--link">raju</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">53</li> <li class="s-award-bling s-award-bling__bronze" title="3 bronze badges">3</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-61034531"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status answered-accepted"> <strong>2</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/61034531/perl-mojolicious-routes-call-sub-only-once" class="question-hyperlink">Perl Mojolicious routes call sub only once</a></h3> <div class="excerpt">Iam using Mojolicious::Lite to declare routes for a webservice. Maybe i missunderstood the routes behaviour but if iam calling a subroutine in the routes definition it gets only called once. I thougt the sub should get triggered every time the…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/perl" class="post-tag grid--cell" title="show questions tagged 'perl'" rel="tag">perl</a> <a href="../../questions/tagged/web-services" class="post-tag grid--cell" title="show questions tagged 'web-services'" rel="tag">web-services</a> <a href="../../questions/tagged/routes" class="post-tag grid--cell" title="show questions tagged 'routes'" rel="tag">routes</a> <a href="../../questions/tagged/mojolicious" class="post-tag grid--cell" title="show questions tagged 'mojolicious'" rel="tag">mojolicious</a> <a href="../../questions/tagged/mojolicious-lite" class="post-tag grid--cell" title="show questions tagged 'mojolicious-lite'" rel="tag">mojolicious-lite</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Apr 04 '20 at 20:44">asked Apr 04 '20 at 20:44</time> <a href="../../users/12282474/wastedfreetime" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/12282474.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="WastedFreeTime" /> </a> <div class="s-user-card--info"> <a href="../../users/12282474/wastedfreetime" class="s-user-card--link">WastedFreeTime</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">195</li> <li class="s-award-bling s-award-bling__gold" title="2 gold badges">2</li> <li class="s-award-bling s-award-bling__silver" title="3 silver badges">3</li> <li class="s-award-bling s-award-bling__bronze" title="16 bronze badges">16</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="s-pagination pager fr"> <a class="s-pagination--item" href="../../questions/tagged/mojolicious-lite_page=2" rel="prev" title="Go to page 2">Prev </a> <a class="s-pagination--item" href="../../questions/tagged/mojolicious-lite_page=1" rel="" title="Go to page 1">1</a> <a class="s-pagination--item" href="../../questions/tagged/mojolicious-lite_page=2" rel="" title="Go to page 2">2</a> <div class="s-pagination--item is-selected">3</div> <a class="s-pagination--item" href="../../questions/tagged/mojolicious-lite_page=4" rel="" title="Go to page 4">4</a> <a class="s-pagination--item" href="../../questions/tagged/mojolicious-lite_page=5" rel="" title="Go to page 5">5</a> <a class="s-pagination--item" href="../../questions/tagged/mojolicious-lite_page=6" rel="" title="Go to page 6">6</a> <a class="s-pagination--item" href="../../questions/tagged/mojolicious-lite_page=4" rel="next" title="Go to page 4"> Next</a> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>