[Mojolicious] Re: Websocket cat

2019-12-15 Thread sri
> > I began with the documentation: > > https://mojolicious.org/perldoc/Mojo/IOLoop/Stream/WebSocketClient > That module doesn't actually exist anymore for quite some time. Use the guides to get started. https://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#USER-AGENT -- sebastian

Re: [Mojolicious] libcurl via Mojolicious

2019-12-10 Thread sri
> > The disadvantage is that you’ll need to use Net::Curl::Easy, which > isn’t a very Perlish interface. HTTP::AnyUA’s backend for same demonstrates > how to “tame the beast”, though, and Net::Curl’s own documentation is quite > helpful (IMO), so there’s at least copious prior art to

Re: [Mojolicious] Mojolicious Web Clients Book

2019-12-03 Thread sri
> cool! > will there be a print version? > I don't know, but he asked on Twitter for suggestions where else to sell the book. https://twitter.com/briandfoy_perl/status/1201579764621959170 -- sebastian -- You received this message because you are subscribed to the Google Groups

Re: [Mojolicious] Mojolicious Web Clients Book

2019-12-02 Thread sri
The book is available now. https://www.amazon.com/gp/product/B0826CX6G7/ -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [Mojolicious] Mojolicious Web Clients Book

2019-11-29 Thread sri
> My pre-order was just cancelled by Amazon. No specific reason given. > Mine too, no idea what happened. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send

[Mojolicious] Re: Mojolicious - Development vs. Deployment (PostgreSQL)

2019-11-21 Thread sri
This is a crosspost from Reddit. https://www.reddit.com/r/perl/comments/dzibxq/mojolicious_development_vs_deployment_postgresql/ -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop

[Mojolicious] Mojolicious Web Clients Book

2019-11-21 Thread sri
You can now pre-order the book brian d foy announced at Mojoconf. https://www.amazon.com/gp/product/B0815XLYJX/ -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it,

[Mojolicious] Re: Workers/Clients Best Practices for good performance

2019-09-26 Thread sri
Side note: Please stop sending the same message over and over, they all go to the moderation queue. And very soon Google will automatically block you from Groups as a spammer. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To

[Mojolicious] Re: Workers/Clients Best Practices for good performance

2019-09-26 Thread sri
> > I know that this is dependent on your application, but the problem is that > an external company has written this for us and they don't want to advice > us on the best practice settings. :-( > Without knowledge about what exactly the application does it's pretty much impossible to help

[Mojolicious] Re: Mojolicious - how to intercept the incoming request before controller method handles and renders

2019-09-18 Thread sri
There is no good solution for this. Best you're going to get is the around_action hook and the information from $c->match->stack. https://metacpan.org/pod/Mojolicious#around_action https://metacpan.org/pod/Mojolicious::Routes::Match#stack -- sebastian -- You received this message

[Mojolicious] Re: Working with spawn and start Minion::Job events

2019-05-09 Thread sri
Job events are not meant to be used from the task callback, it's too late. If some of them work it's purely accidental. I believe you can only use them from other events at the moment, such as worker dequeue. -- sebastian -- You received this message because you are subscribed to the Google

Re: [Mojolicious] Long running websockets and hypnotoad

2019-04-11 Thread sri
I've been thinking about making this easier, but couldn't really think of a good API. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [Mojolicious] Long running websockets and hypnotoad

2019-04-11 Thread sri
https://mojolicious.org/perldoc/Mojo/IOLoop#finish -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious+unsubscr...@googlegroups.com. To

[Mojolicious] Re: Testing Module for Mojo::Pg

2019-04-08 Thread sri
Considering that Mojo::Pg does that for its own tests, i would hope that if anyone found a better design for those APIs, the improvements would be proposed as Mojo::Pg features. But if you really want to release a new module, please make sure not to pick a name that Mojo::Pg itself might want

[Mojolicious] Re: Minion hangs sometimes. No idea of reason

2019-03-27 Thread sri
> > It's a common worker, running a complex job. Without a minion, job runs OK > (well... I'll need to make an extensive test of it to be sure), but when > running in Minion, it gets locked at a random point. > So it is not Minion that is hanging, it is your code inside the job. Use the

[Mojolicious] Re: Minion hangs sometimes. No idea of reason

2019-03-27 Thread sri
Could you be any more vague? You're saying "Minion hangs sometimes", so am i to assume you mean the manager process? But then you throw around random topics like database locks, Mojo::UserAgent and complex code. So is it just a job? Or did you build a custom worker? Nothing you wrote makes any

[Mojolicious] Re: Mojo::Pg and deadlocks

2019-03-04 Thread sri
> > My script suddenly makes two connects and hangs forever, waiting for > himself to complete something. > > What could I do wrong? > You are creating multiple connections. Just assign the database handle to a variable and reuse that. my $db = $pg->db; my $tx = $db->begin; $db->select(...);

[Mojolicious] Re: Mojo::URL encoding of space in query parameters

2019-02-20 Thread sri
> > Is this as intended? > Yes, i don't have time to find a link, but i vaguely remember that it was in the HTML spec. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails

[Mojolicious] Re: Please add a versionnumber to Mojo::UserAgent

2019-01-06 Thread sri
> > Please add a versionnumber for Mojo::UserAgent >> > > No. > And before there are followup questions, just use proper dependency management instead! -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this

[Mojolicious] Re: Please add a versionnumber to Mojo::UserAgent

2019-01-06 Thread sri
> > Please add a versionnumber for Mojo::UserAgent > No. > > Older versions of Mojo::UserAgent have the method "res" which changed to > "result" later. This breaks code in some cases and is hard to debug. I > cannot force a moduleversion of Mojo::UserAgent because there is only a >

[Mojolicious] What features would you like to see added to the promise API?

2019-01-06 Thread sri
Feel free to add your own ideas or to vote on already mentioned ones. https://github.com/mojolicious/mojo/issues/1310 -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails

[Mojolicious] Re: New Twitter Account

2018-12-30 Thread sri
We'll be testing a few new things with the Twitter account too, like i will announce all the upcoming feature votes for people to participate in. Those are usually easy to miss for everyone not following IRC. https://twitter.com/perlmojo/status/1079354183936077825 -- sebastian -- You

[Mojolicious] Re: max_message_size

2018-12-30 Thread sri
> > 1) Some methods called on the request require the request to be parsed and > cache the parsed data. > So if you call any of those methods (in your controller or in any hook > callback like 'around_dispatch') *before* increasing the limit it may > already be to late for the latter. > It's

[Mojolicious] Re: Mojo::ByteStream->split

2018-12-16 Thread sri
> > Any chance the following update to Mojo::ByteStream->split would be > accepted? > Yes, i can see that pass the vote if you have two independent use cases for it. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To

Re: [Mojolicious] Mojolicious - minion worker doesn't start automatically

2018-12-15 Thread sri
> > On a maybe related-ish note, it would also be great if there was a way for > a Mojolicious app (or maybe Minion job) to do recurring tasks (think cron) > -- for example, purge a cache every hour on the hour or something... I > think this was talked about regarding Minion a while back. It

Re: [Mojolicious] Mojolicious - minion worker doesn't start automatically

2018-12-15 Thread sri
This is a planned feature. https://github.com/mojolicious/minion/issues/76 -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[Mojolicious] Re: Pg::PubSub in full application

2018-11-24 Thread sri
> > ... like in the blog example... > Forgot the link. https://github.com/mojolicious/mojo-pg/tree/master/examples/blog -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails

[Mojolicious] Re: Pg::PubSub in full application

2018-11-24 Thread sri
> > I have previously used lite based applications and am starting to get > familiar with full applications. I have been struggling to understand > how to implement Pg::PubSub across different parts of my application. > You don't implement anything. Just use Mojo::Pg like in the blog

[Mojolicious] Re: Pg::PubSub in full application

2018-11-24 Thread sri
ive them a chance to fix it. > Unfortunately that has not happened, so it's likely going away soon. > This might now be resolved with the 4.12 release. https://metacpan.org/release/SRI/Mojo-Pg-4.12 -- sebastian -- You received this message because you are subscribed to the Goog

[Mojolicious] Re: Pg::PubSub in full application

2018-11-23 Thread sri
Please avoid using Mojo::Pg::PubSub for now. It is broken and on the verge of getting deprecated. https://github.com/mojolicious/mojo-pg/issues/50 I've been meaning to do it two weeks ago, but members of the community have asked me to wait and give them a chance to fix it. Unfortunately that

[Mojolicious] New Twitter Account

2018-11-19 Thread sri
We now have a dedicated Mojolicious Twitter account where the whole team can tweet. https://twitter.com/perlmojo P.S.: For the cat memes i'm afraid you will have to keep following me! -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious"

Re: [Mojolicious] Re: Mojo::UserAgent URL with caret '^' not encoded

2018-10-31 Thread sri
> > I do not know of a non-ugly way either but if you are okay with a hacky > and possibly fragile solution you might get away with adding: > > $ua->on(start => sub { >my ($ua, $tx) = @_; >$tx->req->{'start_buffer'} =~ s/([&?]s=)%5E/$1^/o; > }); > > Poking into internals usually means

[Mojolicious] Re: Setting default pattern quote_end and quote_start in Mojolicious::Lite

2018-10-19 Thread sri
I believe there is no easy way to use it in that context. Those route tokens are reconfigurable for use with more advanced features like route shortcuts. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this

[Mojolicious] Mojo::Base feature looking for volunteers

2018-10-15 Thread sri
The core team has decided that Mojo::Base needs weak attributes. There are many ways to implement this feature, and we are now looking for the most efficient one. It's the perfect task for someone who wants to leave their mark in Mojolicious, so what are you waiting for?

Re: [Mojolicious] Reducing daemon memory footprint?

2018-09-26 Thread sri
Am Mittwoch, 26. September 2018 18:28:10 UTC+2 schrieb Charlie Brady: > > > This is why I need to run a persistent daemon rather than use CGI mode. > > root@jy-cx:~# time perl -e exit > > real0m0.035s > user0m0.000s > sys 0m0.030s > root@jy-cx:~# time perl -MMojolicious::Lite -e

[Mojolicious] Re: Return mojo::pg result from the model to the controller to be rendered

2018-09-24 Thread sri
Just return a promise. And use ->update_p instead of ->update. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [Mojolicious] How do you generate a "Content-Length" header in a multipart request?

2018-09-18 Thread sri
> > Now the question is, is this a mojolicious bug or not? Is the content > inside of a multipart post request required to have a blank line after it? > We don't have bugs this obvious. You appear to be misunderstanding what's happening there. Those multipart parts appear to be properly

Re: [Mojolicious] How do you generate a "Content-Length" header in a multipart request?

2018-09-18 Thread sri
Looks to me like it's just normal HTTP requests wrapped in a multipart HTTP request. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [Mojolicious] Re: setting configuration from the command line

2018-09-17 Thread sri
I would use mode specific config files, like "my_app.testing.conf" and start the app with "./my_app.pl daemon --mode testing". -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving

[Mojolicious] New IRC channel (#mojo on irc.freenode.net)

2018-09-12 Thread sri
Quick announcement: We've decided to move the official Mojolicious IRC channel to Freenode, to make it easier for people from outside the Perl echo chamber to find us. https://github.com/mojolicious/mojo/commit/db14e5226e9590868efda5de3d746364b93d1645 -- sebastian -- You received this

[Mojolicious] Re: Nordic Perl Workshop and Mojoconf in Oslo

2018-09-11 Thread sri
It was a great conference! And if you've not been there (WHY NOT?!!!), videos of the talks are currently being uploaded to YouTube. https://www.youtube.com/channel/UCgk2wCZr5Rk-cewLTtQA_Fg/videos -- sebastian -- You received this message because you are subscribed to the Google Groups

[Mojolicious] Re: user agent & capture groups

2018-08-22 Thread sri
If you can make a script replicating the problem please open an issue on GitHub and report it as a bug. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an

[Mojolicious] Re: Cannot allocate memory

2018-08-18 Thread sri
> > Is there any chance this was related to the fix that 7.92 brought? > There likely were leaks. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email

[Mojolicious] Re: Client hangs on error in read

2018-08-17 Thread sri
What version of Mojolicious are you having problems with? Are you sure you don't just need to upgrade? https://twitter.com/kraih/status/1029515722521829376 -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from

Re: [Mojolicious] Re: Mojo::UserAgent and large files

2018-08-07 Thread sri
Google is starting to suspect you are spamming the list and flags all your messages. That forces us moderators to manually approve everything you write. So please try to avoid making too many typos and posting similar messages multiple times. -- sebastian -- You received this message because

[Mojolicious] Re: "mojo get" fails on some HTTPS website

2018-08-07 Thread sri
http://paste.opensuse.org/58336341 This patch actually makes the site work. But of course it also breaks existing tests and looks like it might not be exactly compatible with the HTTP spec, so we can't just apply it. Unfortunately it doesn't look like i will have time to properly look

[Mojolicious] Re: "mojo get" fails on some HTTPS website

2018-08-07 Thread sri
I think all of this is related to Mojo::Content::expect_close. If that defaults to 1 the site can be opened. We need better code to detect which HTTP responses are supposed to be empty. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious"

[Mojolicious] Re: "mojo get" fails on some HTTPS website

2018-08-07 Thread sri
It looks like the problem is that the response does not include a Content-Length or Transfer-Encoding header. So Mojolicious defaults to expecting a HTTP/1.1 response on a keep-alive connection without a body, when it should expect a body terminated by a connection close. -- sebastian -- You

[Mojolicious] Re: "mojo get" fails on some HTTPS website

2018-08-06 Thread sri
If you open a GitHub issue for this i'll flag it as a confirmed bug. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[Mojolicious] Re: Mojo::UserAgent and large files

2018-08-06 Thread sri
> > $tx = $ua->start($tx); > Oh right, this is a blocking call, so you're just spinning in-place appending chunks to the write buffer but never actually letting the event loop write to the socket. You need to do it async. -- sebastian -- You received this message because you are

[Mojolicious] Re: Mojo::UserAgent and large files

2018-08-06 Thread sri
> > On a "back-end" server, I have an application responsible to manage large > files (some Gigabytes). > On a "front-end" server, I want to allow the end-users to download files > stored on the back-end, but without making the back-end server directly > accessible from all Internet. > On the

[Mojolicious] Re: "mojo get" fails on some HTTPS website

2018-08-06 Thread sri
Afraid i don't have time to fix this at the moment. So we'll need a volunteer. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[Mojolicious] Re: "mojo get" fails on some HTTPS website

2018-08-06 Thread sri
> > Is this a bug in Mojolicious? Any help appreciated. > Yes, that is very likely a bug in out HTTP message framing code. We should expect a message body in this case, but do not. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group.

[Mojolicious] Re: Looking for a new logo

2018-08-03 Thread sri
Thanks everyone. We've found a designer and a new logo is in the works. And there's already a small preview in the GitHub issue. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving

[Mojolicious] Making Mojo::UserAgent secure by default

2018-05-19 Thread sri
Hi all, Recently there has been some interest from the community in making Mojo::UserAgent secure by default. As in activate TLS certificate verification by default. Now someone got the ball rolling with a pull request and i wouldn't be surprised if that ends up getting applied sooner or

[Mojolicious] Re: Install/Uninstall

2018-05-17 Thread sri
> > Before we can safely install 'big Perl applications' (with numerous > dependencies and version-specific features) perhaps we need an installation > system capable of cleanly installing and/or uninstalling those big apps. > (Consider that a suggestion for a future 'Mojolicious' project !;)

Re: [Mojolicious] Nordic Perl Workshop and Mojoconf in Oslo

2018-05-08 Thread sri
> > Is english main language for the conference talks? > Yes, i believe all talks will be in english. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an

[Mojolicious] Re: Nginx Unit 1.0 released

2018-05-05 Thread sri
> > Recently (month ago) the stable version of nginx unit application server > was released https://www.nginx.com/blog/nginx-unit-1-0-released/ > > Did anyone try to launch Mojolicious with nginx unit? What do you think, > is it worth trying to do it? > I believe nginx unit uses psgi, so it's

[Mojolicious] Re: [SECURITY] Windows is no longer officially supported

2018-04-24 Thread sri
Quick update, the secuity issue has been confirmed. We do have a path traversal vulnerability on Windows and there is no known fix yet. So, please make sure not to use Windows! -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To

[Mojolicious] Re: [SECURITY] Windows is no longer officially supported

2018-04-23 Thread sri
Background here is that we've been made aware of a possibly very serious security issue, and had to make it public in the hopes of finding a volunteer to verify and fix it for us. Unfortunately the expertise on the core team is currently very much focused on UNIX. We will try to address this

[Mojolicious] [SECURITY] Windows is no longer officially supported

2018-04-23 Thread sri
Quick heads up for everyone. Please try to avoid using Windows servers in production with Mojolicious, there may be serious security issues. https://github.com/kraih/mojo/commit/7755f3a7af3df61881239897421ca35dcd5b70a7 -- sebastian -- You received this message because you are subscribed

[Mojolicious] Re: Gzipping static assets

2018-04-23 Thread sri
> > (Maybe it could be a core feature, don't you think?) > No, i don't think so, loading very large assets into memory to compress them would be fatal. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this

[Mojolicious] Re: Gzipping static assets

2018-04-23 Thread sri
> > Advices and patches[1] welcome  > Please don't monkey patch like that, it is very bad style. I don't see anything there that couldn't also be done with a clean role and after/around. Or perhaps even an after_static_dispatch hook. -- sebastian -- You received this message because you

Re: [Mojolicious] Re: Looking for volunteers

2018-04-17 Thread sri
> > Thanks for all the feedback! What about this > > ? > Are you going to open a pull request or not? -- sebastian -- You received this message because you are subscribed to the Google Groups

Re: [Mojolicious] Re: Looking for volunteers

2018-04-17 Thread sri
> > Thanks for all the feedback! What about this > > ? > Looks good. > Two of my own comments: > > 1) Should I pass the url in as a parameter to a function, or is it OK > placing it within the function as

Re: [Mojolicious] Re: Looking for volunteers

2018-04-17 Thread sri
> > What else can I do for this commit to make it acceptable to close #70? > And of course general formatting. Your use of the + operator without whitespace seems very arbitrary. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To

Re: [Mojolicious] Re: Looking for volunteers

2018-04-17 Thread sri
> > What else can I do for this commit to make it acceptable to close #70? > Having the pollHistory function in app.js does not appear to serve a purpose. It's only ever used on the dashboard. Especially with the pageHistory function it looks a bit silly. -- sebastian -- You received this

Re: [Mojolicious] Re: Looking for volunteers

2018-04-17 Thread sri
> > Issue #70: Refresh history graph every 10 minutes > > > But this is probably pretty pointless due to Issue #69: Switch from > epoch.js to something more modern > Not at all, the overlap should actually be

[Mojolicious] Re: Looking for volunteers

2018-04-16 Thread sri
Minion also has two open issues for volunteers. https://github.com/kraih/minion/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22 -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop

[Mojolicious] Looking for volunteers

2018-04-13 Thread sri
Just a quick heads up, there's quite a few open issues for volunteers that might be interested in contributing to Mojolicious. ;) https://github.com/kraih/mojo/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22 -- sebastian -- You received this message because you are subscribed to

[Mojolicious] Re: Perl Version

2018-04-09 Thread sri
http://mojolicious.org/perldoc/Mojolicious/Guides/FAQ#Which-versions-of-Perl-are-supported-by-Mojolicious -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an

Re: [Mojolicious] Mojo:;Pg

2018-04-02 Thread sri
Make a method that returns a promise. package MyApp::Controller::SomeThingy; sub whatever { my $self = shift; $self->some_model->search_something_p(...)->then(sub { my $results = shift; $self->render('some_template', results => $results); }); }

Re: [Mojolicious] Mojo:;Pg

2018-04-02 Thread sri
> > (1) The contents of this transmission are privileged and confidential and > intended solely for the use of the addressee. Any disclosure, distribution > or copying of the contents, other than by the addressee, is strictly > prohibited. If you receive this transmission in error, please

[Mojolicious] Re: Structured helpers

2018-03-28 Thread sri
> > That being said, I would ask to the collective wisdom of the group: > > 1. would proxy defined as explained in the cookboock work in templates? > Technically, you can always do "<%= $c->my_helper_prefix->foo('bar') %>". > 2. is this the recommended way to organize helpers in

[Mojolicious] Re: Mojolicious::Lite how to refresh table only

2018-03-23 Thread sri
Two messages have been deleted in this thread, and it was not done by one of the moderators. We have no idea what happened. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails

[Mojolicious] Re: Minion job id opaqueness

2018-03-14 Thread sri
> > While using Pg and SQLite backends, job ids are generated as incremental > integers. > > This ordering characteristic would come very handy in one application I'm > writing. Is it something dependable, or should I consider ids as opaque for > future-proofness? > While it seems unlikely

[Mojolicious] Re: How to get array from params?

2018-03-09 Thread sri
We've thought about adding the feature, but so far there have been no good proposals. After all it has to work with validation too. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving

[Mojolicious] Re: Localization of validation messages

2018-02-18 Thread sri
> > I've tried to be clever about this many times, and it always ends up in a > huge mess. So instead of trying to detect the exact issue, I will rather > just tell the user what needs to be done: > > % if (validation->has_error('username') { > <%=l 'You need to fill in a username, which

[Mojolicious] Re: Mojo::Base get all attributes names

2018-02-05 Thread sri
> > Is there any easy way to get all attributes names? > No. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [Mojolicious] SQL::Abstract::Pg

2018-02-04 Thread sri
> > Thanks for the feedback! Is this a correct implementation of what you're > saying? > > my $db = $pg->db; > my $results = $db->select('a', [qw/first last birthday age phone/], undef, > {limit => $limit, offset => 1}); > my $tx = $db->begin; > while ( my $next = $results->hash ) { >

Re: [Mojolicious] SQL::Abstract::Pg

2018-02-04 Thread sri
> > sub bulk_insert { > > my ($self, $table, $records, $options) = @_; > my ($stmt) = $self->pg->abstract->insert($table, $records->[0], > $options); > eval { > my $tx = $self->pg->db->begin; > my $i = $self->pg->db->dbh->prepare($stmt); > while ( my $next = shift @$records ) {

Re: [Mojolicious] How do I ensure only Mojo::Asset::File is used for uploads?

2018-02-03 Thread sri
We've been thinking about adding Mojo::Asset::*::to_file methods that would guarantee a Mojo::Asset::File object, but it's so rarely needed that it doesn't seem worth it. -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To

Re: [Mojolicious] How do I ensure only Mojo::Asset::File is used for uploads?

2018-02-03 Thread sri
> > I thought I tried that. Do I need to create the temp file first? > No, something like this should work perfectly fine. use Mojo::File 'tempfile'; ... $miffile->move_to(my $temp = tempfile); say $tempfile->slurp; ... -- sebastian -- You received this message because you are subscribed to

Re: [Mojolicious] SQL::Abstract::Pg

2018-02-03 Thread sri
> > For example, we can buffer minion jobs via enqueue and insert them to > minion_jobs all at once in the end of request. > > That feature also is very valuable for highload project if you want to > store some kind of logs in the database. > > So bulk inserts is definitely a good thing and I

[Mojolicious] SQL::Abstract::Pg

2018-01-28 Thread sri
Just wanted to give you a quick heads up about a new module we've just added to the Mojo::Pg distribution. So far the SQL generation features we've been able to provide with CRUD methods like ->select have been limited to current features of SQL::Abstract. That's about to change with the

[Mojolicious] Placeholder types

2017-12-27 Thread sri
I've opened a GitHub issue with a proposal for adding placeholder types. And would very much appreciate some feedback. https://github.com/kraih/mojo/issues/1175 It's basically a clear form of restrictive placeholders. $r->get('/users/(id:int)')->to('Users#show'); -- sebastian -- You

[Mojolicious] Re: Minion: better way to handle delayed jobs?

2017-12-15 Thread sri
> > I'll defer to the core team's judgment—I realize my situation may be > outside the mainstream usage. > And added. https://github.com/kraih/minion/commit/c988ccf84afa6b61af30c2abead40ff30e5d5354 -- sebastian -- You received this message because you are subscribed to the Google

[Mojolicious] Re: Minion: better way to handle delayed jobs?

2017-12-15 Thread sri
> > I'm adding many jobs into a queue (Pg backend) with something like this: > > https://gist.github.com/scottw/18a95ddaab44837e92526cdbc93d4275#file-inject > > Each job has a delay that increments by 1s. My worker handles the jobs: > >

[Mojolicious] Re: Advent Calendar

2017-12-02 Thread sri
And if you don't know yet what an Advent Calendar for programmers is, here's also an explanation: https://mojolicious.io/blog/2017/11/30/mojolicious-advent-2017/ Enjoy! -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To

[Mojolicious] Advent Calendar

2017-12-02 Thread sri
Just in case you missed it on Twitter or IRC. Our very own Dr. Berger is making a Mojolicious Advent Calendar on his new blog. https://mojolicious.io/blog/ -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from

[Mojolicious] Re: Session Tutorial - please review

2017-11-23 Thread sri
> > I was wondering about unleashing the following tutorial on the LPW this > weekend to get feedback. I have lost all objectivity on it, so I appeal > to the regulars to point out the most problematic areas. > > https://github.com/duffee/Mojolicious_session_example > > All comments welcome,

Re: [Mojolicious] Documentation "bug"

2017-11-23 Thread sri
Mojo::Template is used for many things, most do not generate HTML. https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Command.pm#L40 -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and

[Mojolicious] Re: What's next for Minion

2017-11-20 Thread sri
> > Getting the feeling that most users are happy with the current state of > Minion. Maybe best to be a bit more conservative with new additions, and > focus on things that have been planned since the start, like an admin ui. > A brand new admin ui has just been released with Minion 8. \o/

[Mojolicious] Re: Error installing Mojolicious-7.56

2017-11-18 Thread sri
> > I get the same error when I try to update. Windows 10 Pro 64bit, > Strawberry Perl 5.26.0. > Can you try changing all "@2x" in the distribution to "-2x" and see if that installs fine? -- sebastian -- You received this message because you are subscribed to the Google Groups

[Mojolicious] Re: Error installing Mojolicious-7.56

2017-11-18 Thread sri
Strange, we also don't see any problems in our Windows tests. https://ci.appveyor.com/project/kraih/mojo -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an

[Mojolicious] Re: Mojo::Promise swallows exceptions in rejection handlers

2017-11-16 Thread sri
> > I'm guessing that wasn't the intent, but > I'm not entirely sure after a brief glance at the implementation... > It is intended, of course we welcome ideas for making Mojo::Promise more dwim, as long as it doesn't conflict with the specs. -- sebastian -- You received this message because

[Mojolicious] Re: how can I mock Mojo::UserAgent in non-blocking request

2017-11-14 Thread sri
> > my $time; > $ua->get_p('/time')->then(sub { $time = $tx->res->json->{now} })->wait; > say $time; > I did a typo, oops. my $time; $ua->get_p('/time')->then(sub { $time = shift->res->json->{now} })->wait; say $time; -- sebastian -- You received this message because

[Mojolicious] Re: how can I mock Mojo::UserAgent in non-blocking request

2017-11-14 Thread sri
> > my $time; > $ua->get('/time', sub { > my ($ua, $tx) = @_; > > $time = $tx->res->json->{now}; > }); > > Mojo::IOLoop->start unless Mojo::IOLoop->is_running; > > say $time; > For this specific case you could just use a promise. my $time; $ua->get_p('/time')->then(sub { $time =

[Mojolicious] Re: Question regarding Mojolicious v7.49 changes to M:I:Delay

2017-11-10 Thread sri
> > When retrieving the starting point data from a back end it sometimes > includes references to other objects. > We keep most of the response data around in the "data" attribute of the > delay and start harvesting the referenced data, which we need to have > around before continuing to the

[Mojolicious] Signatures support

2017-10-25 Thread sri
Support for signatures in Mojolicious is also back on the table. https://github.com/kraih/mojo/issues/1142 -- sebastian -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send

  1   2   3   4   5   6   >