FYI (now that I am on this group) I uploaded Mojo::JSON::MaybeXS a while
back also based on sri's earlier post, which will use the fallback behavior
of JSON::MaybeXS and default to Cpanel::JSON::XS. On a related note
Cpanel::JSON::XS has recently fixed the handling of upgraded numbers and
inf/n
You are doing a synchronous get() so the entire page is loaded by the time
that call returns. The # part of a URL ("fragment") is only read by the
javascript, so whatever is supposed to check that will not get executed by
Mojo::UserAgent. You need a javascript engine.
On Wed, Feb 11, 2015 at 3:11
Alternatively, you can look at the page's javascript or the requests in
your debug console and figure out what it's requesting and you might be
able to do that yourself.
On Wed, Feb 11, 2015 at 4:41 PM, Dan Book wrote:
> You are doing a synchronous get() so the entire page is loade
- References to the app from the controller will only be available when the
controller is instantiated by the app, i.e. to run an action.
- The IOLoop setup should be done in the app's startup routine. The
collectData stuff should also probably be done in the app module. You can
add methods to your
https://metacpan.org/pod/Mojo::Message#cookie
On Tue, Mar 10, 2015 at 4:41 PM, Charlie Brady <
charlieb-m...@budge.apana.org.au> wrote:
>
> I'm using Test::Mojo to verify cookie handling in some existing code. I
> don't see an elegant way to verify that cookies with the right value are
> being se
Actually _decode_value from Mojo::JSON should also be overridden by the
monkey patching. Are you sure you have used the modules correctly?
On Wed, Mar 11, 2015 at 10:06 AM, Dan Book wrote:
> I submitted a PR for this issue. https://github.com/kraih/mojo/pull/758
> Thanks!
>
> On
I submitted a PR for this issue. https://github.com/kraih/mojo/pull/758
Thanks!
On Wed, Mar 11, 2015 at 8:59 AM, njzt wrote:
>
>> Not sure why it hasn't been announced here, but there's Mojo::JSON_XS
>> already.
>>
>> https://metacpan.org/pod/Mojo::JSON_XS
>>
>> --
>> sebastian
>>
>
> I use
You should consider cultural differences yourself. You are posting in
forums moderated by people who are allowed to moderate how they choose. If
you found a critical bug, that is an appropriate use of a github issue.
Changing comments, being offensive, and asking questions that should go on
a maili
Because a circular reference is when a reference to an object is stored in
itself. When they are stored outside the object it is impossible for that
to happen by definition.
On Sat, Mar 14, 2015 at 12:55 AM, s...@alexbyk.com wrote:
> "by storing the callbacks outside of the delay object, we avo
The idea is that hypnotoad will manage its workers, so yes, you cannot rely
on which worker will handle a given connection. Each worker should run
their own IOLoop and thus their own timers. If you describe the issue more
precisely maybe we can help further.
On Thu, Mar 19, 2015 at 3:46 AM, Bakano
That is not correct. The callback from $delay->begin is intended to be
invoked when the non-blocking activity is ready, after the control has
returned to the event loop.
On Tue, Mar 24, 2015 at 9:57 AM, Daniel Mantovani wrote:
> In Mojo::IOLoop either $delay->begin or $delay->end must be invoked
Also note this will affect all app log output, including errors.
On Fri, Apr 3, 2015 at 7:55 PM, Dan Book wrote:
> $app->log->handle(\*STDOUT); (untested)
>
> On Fri, Apr 3, 2015 at 6:04 PM, Nathan Waddell
> wrote:
>
>> After some research, it looks like this is be
$app->log->handle(\*STDOUT); (untested)
On Fri, Apr 3, 2015 at 6:04 PM, Nathan Waddell wrote:
> After some research, it looks like this is because Mojo::Log defaults to
> STDERR:
>
> has handle => sub {
>
> # STDERR
> return \*STDERR unless my $path = shift->path;
>
> # File
> croak qq{C
Hello,
If you are using the latest version of IO::Socket::SSL it should use the
appropriate protocols and ciphers. Try updating that module.
-Dan
On Sun, Apr 5, 2015 at 9:33 AM, James Bearden
wrote:
> Hello,
>
> I am using the standard version of Mojolicious that comes with Ubuntu
> 14.04 (4.63)
Hello,
I have put together a document on the wiki to record breaking changes in a
readable manner for those looking to upgrade to the newest version of
Mojolicious. Feel free to add to the page if I have missed anything
important.
https://github.com/kraih/mojo/wiki/Upgrading
-Dan
--
You rec
You are correct that hypnotoad is not well designed for such long running
requests. Browsers usually are not going to wait more than a few minutes
for a request to complete. If you have background processes that you don't
intend to return to the browser, perhaps something like Minion is a better
so
Perhaps this way:
my $tx = $ua->build_tx($method => ... normal get/post/etc args ...);
$ua->start($tx => sub {
...
});
On Fri, Apr 10, 2015 at 4:01 PM, Charlie Brady <
charlieb-m...@budge.apana.org.au> wrote:
>
> https://github.com/kraih/mojo/wiki/Blocking-vs-non-blocking-101
>
> I see I can do
This won't actually run the transaction, you need to start it with a
UserAgent object:
my $ua = Mojo::UserAgent;
$tx = $ua->start($tx);
Or just use the UserAgent post() method which will build and start the
transaction for you.
On Tue, Apr 21, 2015 at 2:41 AM, Pavel Serikov
wrote:
> Greetings,
The finish event of the controller is not really appropriate here. It will
not fire until the transaction is finished, which doesn't happen until you
render a response. So once a success happens you want to call something
that will render a response from there. You probably want to use the delay
he
Loop->delay(sub { say
> 'BOOM!' });for my $i (1 .. 10) {
> my $end = $delay->begin;
> Mojo::IOLoop->timer($i => sub {
> say 10 - $i;
> $end->();
> });}
> $delay->wait;
>
>
>
>
> On Tuesday, 21 April 2015 21:41:48 UTC+
'));
> }
> );
>
>
>
> On Tuesday, 21 April 2015 22:17:35 UTC+1, hammondos wrote:
>>
>> Ok cool, thanks for pointing me in the right direction
>>
>> On Tuesday, 21 April 2015 22:10:36 UTC+1, Dan Book wrote:
>>>
>>> Sort of. You want
Also, to stop the recurring timer, save the returned id (you can store it
in the delay as well) and then remove it from the loop after a success (for
example in the next step).
On Wed, Apr 22, 2015 at 10:14 AM, Dan Book wrote:
> You need to save the return value of $delay->begin, that ret
$end->();
> }
> }
> );
> },
> sub {
> my $delay = shift;
> Mojo::IOLoop->remove($r_id);
> $self->render(json => $delay->data('rows'));
> }
> );
>
>
>
&g
Multi-parameter support has been removed from Mojo::Parameters (see
https://github.com/kraih/mojo/wiki/Upgrading#multi-name-parameter-retrieval
)
You can retrieve them individually:
my $name = $self->req->param('name');
Or you can use the hash functionality with a hash slice:
my ($name, $email, $
The usability issue with the previous implementation was that the secondary
groups of the specified user were not set regardless of the user or group
set. Additionally, setting only a user would leave the groups that root
has, which would be considered a serious security issue, as a lot of things
o
What do you mean by "in-line"? I'm not sure I follow the question.
The prefork command takes command-line options:
https://metacpan.org/pod/Mojolicious::Command::prefork
Otherwise if you just need hypnotoad to stay in the foreground (and you
don't need hot-deployment) you can use hypnotoad -f.
O
See https://github.com/kraih/mojo/wiki/Upgrading
On Thu, May 28, 2015 at 7:38 AM, Andrew
wrote:
>
> Hurrah!
>
> I'm a n00b - but had this exact problem the other week, =).
>
> I popped onto the London Perl Mongers group, and managed to solve the
> problem, with a bit of help from them.
> [Under
That Wiki page is outdated, you now access param names by: my $params =
$self->req->params->names; (returns an arrayref)
>From Mojolicious or Mojolicious::Lite works the same.
On Thu, May 28, 2015 at 7:45 PM, Pavel Serikov
wrote:
> Hello everyone,
>
> Is it possible to get all POST params im Mo
>
> E.g. i'm sending such hash:
>
> my %hash = (
> city => "Rostov-on-Don",
> model => {file => "stick.stl"},
> image => {file => "test.jpg"},
> promo => "TEST",
> );
>
> And *$self-
To follow redirects, set
https://metacpan.org/pod/Mojo::UserAgent#max_redirects
On Sat, Jun 27, 2015 at 6:15 PM, Stefan Adams wrote:
>
> On Sat, Jun 27, 2015 at 5:10 AM, Pavel Serikov
> wrote:
>
>> Yeah, it's working :)
>>
>> But *warn Dumper
>> ($ua->get('http://geocode-maps.yandex.ru/1.x/?geo
is_running isn't what takes 20 seconds, Mojo::IOLoop->start blocks until
the event loop is stopped/has nothing more to do. So it waits for your
requests to complete. Delays are an easier option to synchronize
non-blocking requests, see
https://metacpan.org/pod/Mojolicious::Guides::Cookbook#Concurre
Your URL parameters are not being url encoded as required. Use a Mojo::URL
instead:
my $url =
Mojo::URL->new('http://klishe.ru/wp-json/posts')->query('filter[post_status]'
=> 'publish', ...);
On Wed, Jul 15, 2015 at 7:35 AM, Pavel Serikov
wrote:
> Hi guys,
>
> Here is a description of new pro
I think setting them with the methods is a better idea in general.
On Thu, Jul 16, 2015 at 11:54 AM, Richard Sugg
wrote:
> I ran into an issue where the database user has a # character, and
> Mojo::mysql doesn't parse the uri like I expected. If I set the dsn,
> username, and password separately
You could reset the session cookie from the javascript. However the
simplest way is probably to have the javascript make an AJAX request
separate from the websocket, to renew the session.
On Mon, Jul 20, 2015 at 11:15 AM, Александр Грошев <
aleksander.grosc...@gmail.com> wrote:
> How I can extend
They are just regular perl scripts, you can run for example:
perl -d $(which morbo) ... other options ...
On Fri, Aug 14, 2015 at 12:43 PM, wrote:
> Is it possible to invoke the interactive Perl debugger with hypnotoad or
> morbo like you can with Apache? Any pointers?
> http://mojolicio.us/per
UTF-8 encoded files should not have a BOM, that is normal. I don't know
about mod_perl and plack's handling of encoding, but could you use a proxy
to Hypnotoad instead of going through mod_perl and PSGI? It would be a
cleaner solution.
On Sat, Aug 29, 2015 at 5:20 PM, DryDuck
wrote:
> Hi
>
> I h
Works OK here:
$ mkdir public
$ echo bar > public/foo
$ perl -MMojolicious::Lite -E'get "/foo"; app->start' get /foo
bar
On Wed, Oct 21, 2015 at 6:46 PM, Pavel Serikov
wrote:
> You suggest generation of full app, I need a lite app.
>
> Did generation this way:
>
> $ mojo generate lite_app
>
>
After each *_ok method call you can access the most recent response as
$t->tx->res (if $t is your Test::Mojo object)
On Wed, Nov 18, 2015 at 4:41 PM, Pavel Serikov
wrote:
> How to capture output of one route and then use it in test for another
> route?
>
> E.g. this algorithm of test:
>
> 1) got
That is the fragment, which you can access as $c->req->url->fragment. If
you want to parse it like query parameters you could do something like my
$params = Mojo::Parameters->new($c->req->url->fragment);
On Sat, Nov 28, 2015 at 4:08 PM, Jason D wrote:
> I'm trying to connect to a site using this
But also this may not work at all because the fragment is normally not
passed to the backend, and is only used for javascript.
On Sat, Nov 28, 2015 at 4:13 PM, Dan Book wrote:
> That is the fragment, which you can access as $c->req->url->fragment. If
> you want to parse it like q
You should be passing a URL, not the parameters. The parameters can be
attached to the URL with $url->query in Mojo::URL.
On Thu, Dec 10, 2015 at 7:03 AM, wrote:
>
> I am getting this error
>
> [
> {
> "msg" => {
> "message" => "Can't connect: Servname not supported for ai_socktype"
>From what I can tell, the generated app is supposed to work when run from
the same directory. To make it installable you need FindBin as you have
noticed, this is mentioned in the Cookbook:
https://metacpan.org/pod/Mojolicious::Guides::Cookbook#Making-your-application-installable
On Mon, Jan 11,
Using a non-blocking API would be ideal but the other option is to run the
blocking call in a forked process using something like
https://metacpan.org/pod/Mojo::IOLoop::ForkCall . Either way the delay
helper is helpful for this:
https://metacpan.org/pod/Mojolicious::Guides::Cookbook#Synchronizing-e
When you moved the helper, you moved your render outside of the callback,
so it's called immediately rather than when the actions are done. Also, you
cannot return values from the delay back to where the helper was called,
because the helper returns immediately, the delay happens later. You can
mak
Small note, in a Mojolicious::Lite app you are not operating in the
controller class, so the controller would not be referred to as $self, by
matter of convention (usually $c).
On Fri, Jan 22, 2016 at 9:29 AM, Dan Book wrote:
> When you moved the helper, you moved your render outside of
ForkCall runs a perl function, and you get the return value back.
ReadWriteFork runs a perl function or external binary, and you can write to
STDIN and get STDOUT/STDERR events. Thus they are useful for slightly
different use cases, choose the one that is simplest for your needs.
On Sat, May 21, 2
The test is identifying that the post successfully occurred and the second
test verifies it got a 200 OK response. If there is some other way you are
indicating failure, you'll need to check that as well. You can access the
response object after the post_ok call via $t->tx->res.
On Wed, Jun 1, 201
Your $dbh is only returned from the helper and not stored anywhere, so it
disconnects as soon as it goes out of scope. Try declaring `my $dbh` in the
global scope or using the `state` feature (roughly equivalent). A
Mojo::SQLite object would be preferable to store over the dbh itself. See
an exampl
This would be handled by storing a Mojo::SQLite object instead of the dbh,
or a DBIx::Connector object as you mentioned before.
On Thu, Jun 16, 2016 at 11:09 AM, Joel Berger
wrote:
> Minion tasks are performed in forks to protect the integrity of the worker
> process. Once the task is forked (or
Sure, Mojo::IOLoop::Server can be used for any TCP based protocol. You'll
have to implement a lot yourself of course.
On Mon, Jul 4, 2016 at 8:45 PM, Brian Shaw wrote:
> Is is possible to use Mojolicious for protocols other than HTTP(S)? I'd
> like to create a full end to end mail server, The
To do this you need to start the service as root (or more generically, a
user with the appropriate privileges) to bind to the port. If it has
workers they can run under an unprivileged user after binding and being
forked, as https://metacpan.org/pod/Mojolicious::Plugin::SetUserGroup helps
you do fo
SetUserGroup is a plugin for a mojolicious application running a prefork or
hypnotoad server, it sets the user/group on the next tick of the ioloop.
On Sun, Jul 10, 2016 at 3:27 PM, Brian Shaw wrote:
> It took me a bit to get it to startup under root, I had been trying
> initially to use sudo bu
There is no 'body' generator, only 'form' or 'json'.
https://metacpan.org/pod/Mojo::UserAgent::Transactor#GENERATORS
Since you said $newjson is a hashref, you probably wanted the json
generator.
On Fri, Jul 15, 2016 at 12:54 PM, Todd wrote:
> Just upgraded Mojolicious to latest via cpanm
> Mojo
d unfortunate,
> because I'm using that to proxy a request to an elasticsearch server and
> the js code (searchkit.js) does exactly that and switching to "form"or
> "json" confuses the ES server.
>
> Back to the drawing board...
>
> On Friday, July 15, 2016 at
You could try something like this...
$dom->find('*')->map(sub { state $i = 0; $_->{_myapp_counter} = $i++ });
It would add an attribute to every tag but that may or may not be a problem
for your application.
Alternatively you could go through $dom->find('*') in order and test
$_->tag or other me
Systemd has an option for this, see Restart= here
https://www.freedesktop.org/software/systemd/man/systemd.service.html
On Thu, Aug 4, 2016 at 7:42 PM, Stefan Adams wrote:
> I've noticed that sometimes my hypnotoad just dies, no warning. Is there
> a supported directive for systemd to allow sys
g the team wants to implement in core.
On Thu, Aug 4, 2016 at 8:51 PM, Stefan Adams wrote:
>
> On Thu, Aug 4, 2016 at 7:41 PM, Dan Book wrote:
>
>> Systemd has an option for this, see Restart= here
>> https://www.freedesktop.org/software/systemd/man/systemd.service.html
>>
Unfortunately the presence of SSL is only really indicated by the
X-Forwarded-Proto header which is set to https. This tells
Mojo::Message::Request that the request was proxied from https (if the
hypnotoad proxy setting or MOJO_REVERSE_PROXY is enabled), but doesn't say
anything about the ws protoc
nd the proxy flag solves the problem
> for http, just not ws. Thanks! Theoretically, is that something that Mojo
> could address? If it can do it for http, can it theoretically do it for ws?
>
> On Aug 10, 2016 11:22 AM, "Dan Book" wrote:
>
>> Unfortunately the presenc
https://metacpan.org/pod/Mojolicious::Guides::Routing#Route-to-callback
On Fri, Aug 12, 2016 at 3:08 PM, Randall Sindlinger
wrote:
> Hi,
>
> I'm working on code that I inherited, and I've hit something that is
> opaque to me.
>
> What does this code snip in setup() intend to do, specifically reg
JSON gives you the option to send more straightforward and possibly nested
hashes and arrays. JSON body is a relatively common method of making API
requests so there's no reason to avoid it really. The only benefit of
multipart/form-data is that it's sent natively by HTML forms so doesn't
require j
The https://metacpan.org/pod/Mojo::SQLite and
https://metacpan.org/pod/Mojo::Pg frameworks are built on DBI and are the
usual way to connect to these databases from Mojolicious. Those
distributions also come with a blog example in
https://metacpan.org/source/DBOOK/Mojo-SQLite-1.000/examples/blog an
If you want to put them on CPAN, you will at least need a dummy (empty)
module with a version number to make them installable. Once you decide on
that module name (something that Mojo core is not likely to want in the
future), you can put the templates inside that namespace. Another problem
however
This module changes the I/O layers of STDOUT and STDERR to encode to UTF-8,
so it will double encode when using test libraries like Test::Mojo. You
should not use them together.
On Mon, Dec 12, 2016 at 9:18 AM, Daniel Mantovani wrote:
> When testing Mojo apps, many times you need to use both Tes
The wiki page https://github.com/kraih/mojo/wiki/Upgrading keeps a list of
breaking API changes since 5.0.
On Mon, Jan 23, 2017 at 4:29 PM, Joseph Landman <
land...@scalableinformatics.com> wrote:
> Answering my own question for posterity. The following code works as a
> replacement:
>
> helper
By including $data in the callback, you are closing over it, thus
preserving its value. However if $data is a reference, the data it
references could change. If you copy the specific context information you
need into lexically-scoped scalars beforehand, and close over those copies
instead, you can
No, that would be a blocking request. The non-blocking format creates and
sends the request, and stores the passed coderef to be called once the
response is received. Additionally, making a shallow copy of the reference
doesn't achieve anything, I meant (if it is a reference) you would need to
copy
When running non-blocking requests, the user agent object must be stored
somewhere in a larger scope so that it is not destroyed before the request
completes. See also
https://metacpan.org/pod/Mojolicious::Guides::FAQ#What-does-%22Premature-connection-close%22-mean
?
On Tue, Mar 28, 2017 at 1:20 A
Yes, as documented at https://metacpan.org/pod/Mojo::IOLoop::Delay#wait,
the ->wait method does nothing if the event loop is currently running. You
do not want it to do anything in this case, it is a bad idea to run the
event loop during its own event callback. So it is by design that any
non-block
I don't remember where it's documented, but you can use
$c->req->body_params->to_hash. Instead of ->body_params you can use
->query_params for URL parameters, or ->params for both combined; each of
these gives you a Mojo::Parameters object with a to_hash method.
On Tue, Apr 4, 2017 at 7:46 PM, iaw
Use the param method of Mojo::Parameters (returned by query_params) as
shown here: https://metacpan.org/pod/Mojolicious::Controller#param
On Wed, Apr 5, 2017 at 6:00 PM, iaw4 wrote:
>
> does M have a builtin shortcut function for the most frequent use of
> params,
>
> my $x=$c->req->query_params
There is not really any automatic way to do this in Mojo::Base, it's a very
simple module. But you could do something like this.
has 'token' => sub { my $self = shift; exists $self->{Tiger} ?
$self->Tiger->token : $self->token };
This would only affect the default of course, and would not update
It says that the uploads are returned as Mojo::Upload objects. These
objects have an 'asset' attribute which returns the Mojo::Asset::File or
Mojo::Asset::Memory, both of which have a 'slurp' method you can use to
read the contents into memory, and other methods. It's usually a bad idea
to access t
Any default would be insecure in some way. It must be set by the user to
some secret to avoid being guessable.
On Mon, Apr 17, 2017 at 2:21 PM, iaw4 wrote:
>
> suggestion?
>
> would it make sense to set the passphrase to "moniker" encoded with the
> machine-id as the default, rather than stating
-welch.info/
> Exec Editor, Critical Finance Review, http://www.critical-finance-
> review.org/
> Editor and Publisher, FAMe, http://www.fame-jagazine.com/
>
> On Mon, Apr 17, 2017 at 1:31 PM, Dan Book wrote:
>
>> Any default would be insecure in some way. It must be set b
application from multiple servers even. So it is up to the user how to set
secrets.
On Mon, Apr 17, 2017 at 3:07 PM, iaw4 wrote:
>
>
> On Monday, April 17, 2017 at 1:46:22 PM UTC-5, Dan Book wrote:
>>
>> You also need to make sure the secret does not change, as that will
>
More specifically, you should not store a DBI handle in your app or use it
across forks. You should always store a DBIx::Connector or Mojo::Pg or
similar connection pool object instead, and then retrieve a connection from
it in the smallest scope needed.
On Thu, May 4, 2017 at 7:10 AM, Justin Hawk
It cannot return to the same method, if that's what you're asking. Any
action you wish to take using the results must be within that callback, or
called by that callback; so perhaps pass a callback to your model for it to
call from its callback, if that makes sense.
https://metacpan.org/pod/Mojolic
See this section:
https://metacpan.org/pod/Mojolicious::Guides::Rendering#Serving-static-files
On Sun, May 14, 2017 at 4:02 AM, wrote:
> Hi,
>
> I have a zipped file in a directory (not 'public') and I want to do a link
> with which the user can download the file.
>
> Can please someone explain
This is a bad idea, if you want to call external functions then they should
be in a common module that can be used from where you call them.
On Tue, May 30, 2017 at 7:29 AM, Yuriy Zhilovets
wrote:
> Hi everybody!
>
> How to handle different namespaces under Hypnotoad ?
>
> I have this small serv
They are not deprecated at this time, but we can't see the future.
On Tue, Jun 13, 2017 at 2:23 PM, Ivan Babiychuk
wrote:
> *Hello.*
>
> *Problem:*
> My colleagues say me not to use these functions:
> $self->req->uploads('file');
> $r->detour();
>
> *Question:*
> Will these two functions work in
However, the ->uploads method does not take an argument, and the ->detour
method does.
On Tue, Jun 13, 2017 at 2:25 PM, Dan Book wrote:
> They are not deprecated at this time, but we can't see the future.
>
> On Tue, Jun 13, 2017 at 2:23 PM, Ivan Babiychuk
> wrote:
>
The recently added bind type support should help, see the last example
here: https://metacpan.org/pod/Mojo::Pg::Database#query
On Fri, Jun 16, 2017 at 4:24 PM, Alejandro Imass
wrote:
> On Fri, Jun 16, 2017 at 4:00 PM, Alejandro Imass
> wrote:
> > Hi,
> >
> > Bytea values are coming back as empt
Hypnotoad and the prefork server it's based on launch 4 workers by default.
If you don't need the concurrency then you can simply use the plain
'daemon' command. It will not watch for filesystem changes but it will be
much less complex to run than morbo. Run like: `./myapp.pl daemon -l
'http://*:80
Session cookies are only created if you access the session via the
"session" method in Mojolicious::Controller. It's important that you've set
your app secrets if you do use them.
On Tue, Jul 18, 2017 at 7:16 PM, Brandon Woodson
wrote:
> So to further help anyone interested in helping me solve t
I'm not sure what you mean. The command line *is* hypnotoad, and it has an
-f option for foreground:
https://metacpan.org/pod/distribution/Mojolicious/script/hypnotoad (all it
really does is set the HYPNOTOAD_FOREGROUND env var)
Note that when running hypnotoad in foreground mode it cannot do hot
A hook is not a suitable place to put request-specific data, because of the
async pattern you discovered. Requests may partially dispatch and then
another request may be handled by the event loop while waiting for another
part of the request. Some of the request may be initiated from outside the
di
It is deeply embedded in the logic of Mojo servers and clients, but you may
be able to replace it with IO::Socket::INET adjusting calls as needed (so
you'd need to maintain a fork with these changes essentially), if you don't
need ipv6.
On Mon, Sep 11, 2017 at 4:16 PM, Alejandro Imass
wrote:
> H
However, even the latest version of IO::Socket::IP only requires Test::More
version 0.88, which is core on any version of perl supported by Mojolicious.
On Mon, Sep 11, 2017 at 5:52 PM, Dan Book wrote:
> It is deeply embedded in the logic of Mojo servers and clients, but you
> may be a
Static files are by default served from the "public" directory, make sure
that is where you put your file.
https://metacpan.org/pod/Mojolicious::Guides::Tutorial#Static-files
On Wed, Sep 13, 2017 at 11:16 AM, Luis Diaz wrote:
> Hi!
>
> I've been asked at work to create a website that runs under
There is a PR open to fix this:
https://github.com/jhthorsen/mojo-redis2/pull/26
I did a search and it seems nobody else is abusing this internal function
thankfully.
-Dan
On Fri, Nov 10, 2017 at 10:54 AM, Scott wrote:
> Just noticed the private sub _monkey_patch was removed in Mojolicious
> 7
The problem is that no exceptions in promise handlers are fatal, they occur
in the event loop. The only way the exception could be propagated is if the
call to ->wait checked for a failure and rethrew it as an exception
afterward (this is how ->get works in Future). Also note that $p is not the
las
If you add a recurring timer in startup it will execute in each worker
process that is forked. You might consider having a separate process
(possibly with a command for your application to spawn it) that just does
this recurring work.
-Dan
On Tue, Nov 21, 2017 at 9:40 PM, Nancy Li wrote:
> OK.
When the auto_escape option is set on Mojo::Template, it reverses this
behavior; auto_escape is set by default for the EPRenderer template
handler, which the rendering guide is referring to. I agree it is a bit
confusing but I'm not sure the best way to clarify things.
On Wed, Nov 22, 2017 at 8:29
"flash" puts the data into the session, not the parameters. If it's in the
same request just use the stash to pass the data, if it's in a different
request then you need to retrieve it from the session -
https://metacpan.org/pod/Mojolicious::Controller#session . Be careful using
flash since it is b
There is probably more relevant information higher in the log; the status
command is only showing you the end of the log. Try running: journalctl -u
mojo_test.service
-Dan
On Thu, Nov 23, 2017 at 4:24 AM, wrote:
> Dear sir;
> I meet a problem when systemd start hypnotoad, detail follow:
>
I would not recommend running hypnotoad as a Type=simple service with -f.
This will not allow you to use hot-restarts via systemctl reload.
-Dan
On Thu, Nov 23, 2017 at 10:13 AM, wrote:
> Hi David,
>
> I'm no expert with systemd, but this is my mojo.service file which runs
> the application in
directives. You can check if those are
> supported in your system with
>
> $ man systemd.directives
>
> If you have those, you will probably not need the ExecStartPre directives
> above, because the only thing these do is to create those directories.
>
> Hope it helps.
> BR,
t; forking mode.
-Dan
On Thu, Nov 23, 2017 at 11:36 AM, Boyd Duffee wrote:
> On 23/11/17 16:14, Dan Book wrote:
> > I would not recommend running hypnotoad as a Type=simple service with -f.
> > This will not allow you to use hot-restarts via systemctl reload.
>
> Naively, I
he log file). If you restart
>> instead of course it will kill the process and then start again, and you
>> can check that also in the log file.
>>
>> One last thing, if you happen to have a recent version of systemd or you
>> are allowed to install that (not my case unfortu
1 - 100 of 228 matches
Mail list logo