[Mojolicious] Re: GitHub Discussions

2020-12-19 Thread Sebastian Riedel
Since everybody seems to like GitHub Discussions so far, we are going to 
use that as our default forum for a bit. And https://forum.mojolicious.org 
will redirect to it.

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/dd49d0ab-c0a8-45d3-9d65-fe35f33d1a2en%40googlegroups.com.


[Mojolicious] GitHub Discussions

2020-12-08 Thread Sebastian Riedel
GitHub added a new feature for discussions. It could be a decent 
alternative to Google Groups. We are going to test it for a bit to see how 
it goes. Maybe give it a try with your next question.

https://github.com/mojolicious/mojo/discussions

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/af0e7577-b282-43e2-a2f8-60d29f366501n%40googlegroups.com.


[Mojolicious] Re: Using something like HTTP::Exception for exception handling

2020-11-25 Thread Sebastian Riedel

>
> Likewise, is a plugin or documented method for overriding the 
> `reply.exception` helper to use a specific template/layout when there are 
> errors?
>

https://docs.mojolicious.org/Mojolicious/Guides/Rendering#Rendering-exception-and-not_found-pages

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/a13a7231-a3c3-4171-8e6c-7f53ea6f07c9n%40googlegroups.com.


[Mojolicious] Re: perlbrew fails, IO::Socket::SSL, perhaps my paths or @INC ?

2020-11-20 Thread Sebastian Riedel
Publishing logs from our IRC channel is against the rules. I'm just giving 
you a warning for now, please don't do that again.

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/0e982c57-cb98-4283-8e06-64f08a1788d3n%40googlegroups.com.


[Mojolicious] Re: csrf vs testing

2020-11-03 Thread Sebastian Riedel
These CSRF protection features are mostly legacy features these days for 
backwards compatibility. Now we have SameSite cookies, to which modern 
browsers default.

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/6cce769b-2b91-4532-aa01-cf5cc58a0d5bn%40googlegroups.com.


Re: [Mojolicious] Re: Mojo::Log and UTF-8

2020-10-31 Thread Sebastian Riedel

>
> Ok, data is encoded from UTF-8 into bytes when I log a message, 
> but when this data is printed to STDERR
> How make it decoded from bytes to UTF-8 back? 
> my terminal supports UTF-8 and I want see nice messages instead of ХабÐ
>

UTF-8 *is* bytes. If you are encoding already encoded UTF-8 then you are 
double encoding.

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/9e334bec-97fd-45d7-b385-c28e813a0dd3n%40googlegroups.com.


Re: [Mojolicious] Cancel in-flight HTTP request?

2020-10-23 Thread Sebastian Riedel
You can set a response error on the transaction to cancel it safely. That's 
what the Mojolicious tests use.

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/0757-a4a1-4cd7-b6d6-79351815f3bbn%40googlegroups.com.


[Mojolicious] Re: Ways of rendering a stream

2020-10-23 Thread Sebastian Riedel

>
> Typically, with a stream, you'd just write the HTTP headers, and then just 
> start writing out your content. I don't understand why it's so challenging 
> with Mojolicious. I figured finalizing the response headers would be what I 
> needed, but now I have no idea.  
>
> I'm not trying to do anything fancy. I'm just trying to read records from 
> a database, and write them out to in a stream to the browser. I would think 
> many people would have this same use case without doing anything too 
> complicated in their web framework.
>

The drain callback is the only way, because we use an event loop and 
non-blocking I/O. The whole thing could theoretically be wrapped in 
promises and then made to look blocking with async/await, but that doesn't 
really change how it works internally.

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/c4412264-2954-4f5b-a0ed-45f506d53df4n%40googlegroups.com.


[Mojolicious] Re: How to "connect" embedded user agent to application being tested?

2020-10-22 Thread Sebastian Riedel

>
> my $got = $self->ua->get('/welcome')->result->text;
>

Relative URLs are resolved by the user agent to $self->ua->server->app, 
which in this case is probably a Mojo::HelloWorld instance. I strongly 
suggest you use a custom service class with its own Mojo::UserAgent 
instance as an attribute. Then make the full service base URL configurable 
and just set it to $app->foo_service->ua->server->url. Or similar... you 
get the idea.

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/731af92e-9aea-4625-a714-424244abc942n%40googlegroups.com.


Re: [Mojolicious] Re: web cam websocket

2020-09-15 Thread Sebastian Riedel

>
> An HTTP-level error response--maybe 426--would probably be most sensible. 
>

What error would common browsers give in that case? 

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/648435bf-62f7-45f6-a5fc-958d13411c42n%40googlegroups.com.


Re: [Mojolicious] Re: web cam websocket

2020-09-15 Thread Sebastian Riedel

>
> Given this, should Mojo even send a response? Or if it does, should it at 
> least warn “failed to negotiate subprotocol; sending handshake response 
> anyway”?
>

 So you want Mojolicious to cause a TCP level connection error instead of 
letting the handshake fail properly? That seems like a really bad idea.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/82d92a26-0dc5-4493-be0b-9d89c67ae14fn%40googlegroups.com.


[Mojolicious] Re: web cam websocket

2020-09-14 Thread Sebastian Riedel
Then you need to negotiate a subprotocol.

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/24ee8e0a-9470-425a-93e0-c2827a8d6152n%40googlegroups.com.


[Mojolicious] Re: Where to put view logic?

2020-07-29 Thread Sebastian Riedel

>
> The problem is that some of the display logic is fairly complicated: 
> one of my templates has a 30 line <% %> block before anything can be 
> displayed. It strikes me that these 30 lines (and others) are better 
> off in a subroutine or method. But where? MyApp::View? How would I 
> call it from a template? None of the documentation I can find 
> addresses this. I appreciate any pointers or examples. 
>

 You want application specific plugins with helpers.

https://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Adding-a-plugin-to-your-application
https://mojolicious.org/perldoc/Mojolicious/Guides/Rendering#Adding-helpers

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/0ed8a6ec-6654-43b1-9bc4-6563174d0976n%40googlegroups.com.


[Mojolicious] Re: proxy->start_p with custom response body

2020-07-09 Thread Sebastian Riedel

>
> I'm setting up an application that needs to proxy a request.
>
> I found this example and it's working well:
>
> https://metacpan.org/pod/Mojolicious::Plugin::DefaultHelpers#proxy-%3Estart_p
>
> I may need to possibly transform the response body (from HTML to JSON). 
> What would be the best way to do so when using this helper?
>

You would not use the helper. It is specifically for passing along 
unaltered response content efficiently.

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/22d5202a-2f29-4c41-9d5c-6db8c60fd9b5n%40googlegroups.com.


[Mojolicious] Re: multiline %= include

2020-06-16 Thread Sebastian Riedel

>
> How can I write a include statement in multiple lines?
> Something like this:
>

<%= include 'breadcrumb', path=> [
{ one=> 'first'  },
{ two=> 'second' }
] %>

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/79a893e7-12a6-40d0-9ce0-3d83aec1ea0co%40googlegroups.com.


Re: [Mojolicious] Async/await in Mojolicious Full App

2020-05-27 Thread Sebastian Riedel

>
> Oops! my bad. Apologies! I should have stayed. But, I had to get into a 
> skype call.
>

IRC is rarely synchronous, if you can't wait a few hours for an answer just 
stick to the mailing-list and
forget IRC. The friendly folks in #mojo will answer almost any question, 
but you might have to wait
24 hours for the right person to be online. We are distributed all around 
the world after all.

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/184fb652-1e8c-4646-9683-324d22b33c66%40googlegroups.com.


Re: [Mojolicious] Async/await in Mojolicious Full App

2020-05-27 Thread Sebastian Riedel
I'll assume it was you who asked the same question on IRC earlier. Had you 
been sticking around for a bit longer you would have seen my instructions 
for getting a working application that i tested locally.

14:08  to be sure i did a "mojo generate app" and then replaced 
the controller with http://paste.scsys.co.uk/589044

That's the important part, if that doesn't work your Perl or some module 
you installed is broken.

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/b4dd93ac-e60a-4973-828c-4d1b364889af%40googlegroups.com.


[Mojolicious] Re: mojo async/await with controller

2020-05-26 Thread Sebastian Riedel

>
> I am still getting the following.
>
> Note: my router is  
>  $r->post('/login')->to('sessions#on_user_login_p')->name('do_login');
>
> [2020-05-26 23:47:28.06952] [-19048] [debug] Routing to controller 
> "ConvergeAtCommex::Controller::Sessions" and action "on_user_login_p"
>
> [2020-05-26 23:47:28.06985] [-19048] [debug] Action not found in controller
>
>
That information seems completely unrelated to the original question in 
this thread. Please refrain from necroing.

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/e64dd2e6-bd40-4560-9737-45471c30e661%40googlegroups.com.


[Mojolicious] Re: Problem with streaming...

2020-05-10 Thread Sebastian Riedel
Please don't use HTML for formatting, the code is completely unreadable.

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/29a905a1-0836-479a-935b-60a8e38c456a%40googlegroups.com.


Re: [Mojolicious] Problem with streaming...

2020-05-04 Thread Sebastian Riedel
And if you want to stream directly to the browser that made the original 
request, there are also proxy helpers that do all the streaming stuff for 
you.


https://mojolicious.org/perldoc/Mojolicious/Plugin/DefaultHelpers#proxy-get_p

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/8e74cd59-e919-4845-8806-d8f2e70b62c4%40googlegroups.com.


Re: [Mojolicious] Re: $ ->has_error validation method in Mojolicious higher than 8.33 version

2020-04-14 Thread Sebastian Riedel
> The same code is used in the example of blog included in Mojo::Pg module.
> Method has_error is not working in this example too with 8.36 Mojolicious 
> version.
> The feedback of $v->has_error cannot be used for creating alert message about 
> empty field in a web form.
> Can you fix it so it worked like in previous versions?

Thanks, fixed.

https://github.com/mojolicious/mojo-pg/compare/e44efd108841...7a4a016fd69d
-- 
Sebastian Riedel
https://mojolicious.org
https://github.com/kraih
https://twitter.com/kraih

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/CANn9nhH8mfBG6OxKZCd-sbLv%3Dz9p_vT9uCKNeuooTWtm7CCB4Q%40mail.gmail.com.


[Mojolicious] Re: $ ->has_error validation method in Mojolicious higher than 8.33 version

2020-04-12 Thread Sebastian Riedel

>
> I have installed last version of Mojolicious and I found that the $ 
> ->has_error validation method was working with an error. 
> When I send data form with empty field, which must be required full, I get 
> empty value of $v->has_error. This method worked correctly in previous 
> version of Mojolicious (8.28 and 8.33) I used. 
> Please explain how to fix this bug.
>

Your description is very vague, so i can only guess. But you probably want 
to use the not_empty filter on the affected field.

https://mojolicious.org/perldoc/Mojolicious/Validator#not_empty

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/10a06567-66d7-46f3-a8e3-e74bc02b86e8%40googlegroups.com.


Re: [Mojolicious] Re: New server status plugin

2020-02-16 Thread Sebastian Riedel

>
> Just curious -- why did you choose to make Mojo::MemoryMap a part of 
> Mojolicious::Plugin::Status instead of its own stand alone?
>

For my convenience. Both are being developed together and coordinating
multiple CPAN distributions costs time. Unfortunately spare time is a very
limited resource for me these days, so i've got to cut some corners.

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/430da8f5-0d8b-47c7-9bda-d1eb9dc1b4e5%40googlegroups.com.


[Mojolicious] Re: New server status plugin

2020-02-14 Thread Sebastian Riedel
Forgot to mention that it will now also show you the slowest requests, with 
a little smiley
indicating the urgency of optimising that part of your code. :)

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/cc1a86c7-e6c9-4ef1-9fc3-7d7e85b11b8a%40googlegroups.com.


[Mojolicious] New server status plugin

2020-02-14 Thread Sebastian Riedel
This week was SUSE HackWeek again. And my main project this time was a 
rewrite of mojo-status. It got a
completely new storage backend based on File::Map, so it should be much 
more reliable now. And a bit
more pretty.

https://github.com/mojolicious/mojo-status

Since the topic comes up every now and then, i've also made the storage 
backend reusable as a module.

https://metacpan.org/pod/Mojo::MemoryMap

It is very fast, and can be safely shared between multiple prefork workers. 
But has the downside that
the maximum size cannot be changed once it has been initialised. So you 
need to plan a little ahead
when configuring the size.

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/8c80a9e4-f8bd-40e5-b751-dfb566686866%40googlegroups.com.


[Mojolicious] Re: Best practices for dynamic workflows

2020-02-14 Thread Sebastian Riedel

>
> The link between 
> modules would be a queue, not sure about the backend for those queues 
> yet, though, perhaps Pg or Celery.
>

Fyi. Mojolicious has a job queue too.

https://github.com/mojolicious/minion

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/c59b4bf6-a8f0-4eb8-b156-6ff3fe8fceec%40googlegroups.com.


Re: [Mojolicious] Mojolicious Web Clients Book

2020-02-14 Thread Sebastian Riedel
There's also a PDF version of the book now.

https://leanpub.com/mojo_web_clients/

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/1eb8f819-ad01-40b6-a255-9e9e8b392f9e%40googlegroups.com.


[Mojolicious] Re:

2020-01-21 Thread Sebastian Riedel
Thank you, glad it's working well for you. :)

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/b63e9fc3-91cc-4a1c-b1ae-71d422d80738%40googlegroups.com.


Re: [Mojolicious] Stickers!

2019-12-22 Thread Sebastian Riedel
>> We now have Mojolicious and Perl stickers over on Stickermule, enjoy! :)
>>
>> https://www.stickermule.com/user/1070707933/stickers

Afraid not, Stickermule closed their Marketplace.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/CANn9nhFD46RM_KdE%2B77FzxqMVJ-jBKmWYF0ZT-P%2BA9uXg%3D3P8Q%40mail.gmail.com.


Re: [Mojolicious] libcurl via Mojolicious

2019-12-10 Thread Sebastian Riedel
> > Another big disadvantage is that it doesn't use Mojo::Promise. I don't 
> > think it will attract too many Mojo users without.
>
> The latest version does, actually.

Ah, nice. Then you can simplify your example too.

my $promiser = Net::Curl::Promiser::Mojo->new();

my $handle = Net::Curl::Easy->new();
$handle->setopt(CURLOPT_URL() => $url);

$promiser->add_handle($handle)->then(
  sub { print "$url completed.$/" },
  sub { warn "$url failed: " . shift },
)->wait;

And if you really want to conform to the Mojo style you rename
add_handle to add_handle_p, because we like to make promise
returning methods obvious. ;)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/CANn9nhFX%2BA7gFmZAL3z67zNN2%3DNi1rOkhuhEauu9ZJ_hBhfFMA%40mail.gmail.com.


Re: [Mojolicious] Minion: getting data out.

2019-10-21 Thread Sebastian Riedel
>   state=> "inactive",
>
>   "state" => "finished",

Look at the different states, the job is simply not finished yet at the time.

-- 
Sebastian Riedel
https://mojolicious.org
https://github.com/kraih
https://twitter.com/kraih

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/CANn9nhEZ5GNLb9dcOwTsszFKCr_%3D01AhYUD3LoBMK-MVHJZ8uQ%40mail.gmail.com.


Re: [Mojolicious] Configuration override via Test::Mojo not being used

2018-09-27 Thread Sebastian Riedel
> Config overriding works only for full apps

Actually that's not true, but i see this here is a special case.
Config overrides only
work with full apps and instances of lite apps. Lite apps in classes
are a pretty
bad hack and do not work here.

-- 
Sebastian Riedel
https://mojolicious.org
https://github.com/kraih
https://twitter.com/kraih

-- 
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 post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Configuration override via Test::Mojo not being used

2018-09-27 Thread Sebastian Riedel
> Anyone have any ideas?

Upgrade Mojolicious?

-- 
Sebastian Riedel
https://mojolicious.org
https://github.com/kraih
https://twitter.com/kraih

-- 
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 post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Re: Looking for volunteers

2018-04-17 Thread Sebastian Riedel
> Oh great! If I wasn't clear about it, the link I provided is my attempt at
> #70.
>
> https://github.com/s1037989/minion/commit/6bc1ca7a40e8b8e38ba683008aab83fedb2d78af

That doesn't quite look right. Are you making all pages poll history data
even if they don't need it? And i think you're not padding the hour value
with leading zeroes.

-- 
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 post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Migrations are always run inside transaction

2018-02-07 Thread Sebastian Riedel
> All migrations are wrapped within transactions. But some schema changes,
> such as enum type modifications can not be run inside transactions.
>
> And code falls with message
>
> DBD::Pg::st execute failed: ERROR:  ALTER TYPE ... ADD cannot run inside a
> transaction block at /path/to/project/local/lib/perl5/Mojo/Pg/Migrations.pm
> line 66
>
> As I can see, for now there is no way to disable transaction for some
> migrations.
>
> So, what do you think, is it a good feature?

Most likely not worth it, since it would require huge code changes. And for enum
there are workarounds that work in transactions (rename type, create type, add
column, remove column).

-- 
Sebastian Riedel
http://mojolicio.us
http://github.com/kraih
http://twitter.com/kraih

-- 
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 post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Uploading "large" files with Mojolicious::Lite not working as expected

2018-02-06 Thread Sebastian Riedel
> When a file with size under 16MB is uploaded, everything works fine, but
> when a file larger then 16MB is uploaded (which is the default max) I am
> expecting to see "File is too big." message, instead I am getting connection
> reset.

That's not possible, a request has to be fully received to be able to send a
response, and that's often counterproductive, so a connection reset happens.

We've been looking for a better solution for years, but not found one yet.
Browsers make it a tricky problem.

Sebastian Riedel
http://mojolicio.us
http://github.com/kraih
http://twitter.com/kraih

-- 
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 post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


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

2018-02-01 Thread Sebastian Riedel
> I spoke with you about this briefly on Twitter, but just figured I'd put it
> out here, too.  What about multiple record inserts on a single call?
> Twitter thread.

Yes, it's possible, not sure about how useful it would actually be though.

-- 
Sebastian Riedel
http://mojolicio.us
http://github.com/kraih
http://twitter.com/kraih

-- 
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 post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Minion::Backend::Redis

2017-12-31 Thread Sebastian Riedel
> And second, as far as I know, current redis backend is still under
> construction. And I want to help make it as solid as Pg backend, but faster.

The Minion distribution includes a benchmark we use to compare backends.

https://github.com/kraih/minion/blob/master/examples/minion_bench.pl

> But if mojo team already have another plan for redis backend and you need a
> couple of hardworking hands to help, I'm very motivated and now you know how
> to find me. So feel free to contact me.

I don't think anyone is actively working on the Redis backend at the moment, and
i have not heard anything about plans.

-- 
Sebastian Riedel
http://mojolicio.us
http://github.com/kraih
http://twitter.com/kraih

-- 
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 post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Re: Error installing Mojolicious-7.56

2017-11-18 Thread Sebastian Riedel
Fix released with Mojolicious 7.57.

-- 
Sebastian Riedel
http://mojolicio.us
http://github.com/kraih
http://twitter.com/kraih

-- 
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 post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


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

2017-11-14 Thread Sebastian Riedel
> it works for me. thx :)
> I still want to know what's wrong with my demo code, it seems like
> mojo::ioloop's counter went some wrong, but I can't find it.

Since you're not stopping the event loop manually it keeps running
until there are no events to watch anymore. Mojo::UserAgent has a
pool of keep-alive connections that remain in the event loop, leaving
it file descriptors to watch, so it has no reason to stop by itself.

-- 
Sebastian Riedel
http://mojolicio.us
http://github.com/kraih
http://twitter.com/kraih

-- 
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 post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Question regarding Mojo::UserAgent non-blocking example

2017-11-02 Thread Sebastian Riedel
> $fetch = sub {
> ...
> $fetch->();
>
> $end->();
>   });
> };

I think you are correct, this code is better.

-- 
Sebastian Riedel
http://mojolicio.us
http://github.com/kraih
http://twitter.com/kraih

-- 
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 post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] UTF-8 in Mojo::File

2017-10-19 Thread Sebastian Riedel
> Does anybody know why the handling of UTF-8 characters in Mojo::File has
> changed?

There was a long discussion on IRC.



-- 
Sebastian Riedel
http://mojolicio.us
http://github.com/kraih
http://twitter.com/kraih

-- 
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 post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Minion Locking problem (deadlock) !

2017-06-29 Thread Sebastian Riedel
> $app->minion->add_task(demo_job => sub {
>   my $job = shift;
>   my $retval = {};
>
>   sleep 1 until $app->minion->lock('demo_job', 7200);
>
>   $job->on(finished => sub {
>   my ($job, $result) = @_;
>   my $debugger = $app->debug_logger;
>   $debugger->debug(sprintf("Job %d with task %s finished\n",
> $job->id, $job->task ));
>   $app->minion->unlock('demo_job');
>   });
>
>   $job->on(failed => sub {
>   my ($job, $err) = @_;
>   my $debugger = $app->debug_logger;
>   $debugger->debug(sprintf("Job %d with task %s failed %s\n",
> $job->id, $job->task, $err ));
>   $app->minion->unlock('demo_job');
>   });
>
>   $retval->{data}->[0]->{demo_job} = int(rand(1000));
>   $retval->{success} = Cpanel::JSON::XS::true();
>   return $job->finish($retval);
>   });

You can't use the finished and failed events from inside the task.

-- 
Sebastian Riedel
http://mojolicio.us
http://github.com/kraih
http://twitter.com/kraih

-- 
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 post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Molicious and Minion help request

2017-06-02 Thread Sebastian Riedel
> Could you please help me what I am doing wrong or what I missed ?

Add your task during application startup.

-- 
Sebastian Riedel
http://mojolicio.us
http://github.com/kraih
http://twitter.com/kraih

-- 
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 post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Intermittent 400's using Mojo::UserAgent

2017-03-10 Thread Sebastian Riedel
MOJO_USERAGENT_DEBUG=1

-- 
Sebastian Riedel
http://mojolicio.us
http://github.com/kraih
http://twitter.com/kraih

-- 
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 post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Integrating to other event based event based architectures

2017-02-09 Thread Sebastian Riedel
Just use the reactor directly.

http://mojolicious.org/perldoc/Mojo/IOLoop#reactor

--
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 post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Mojo::Pg example Blog

2016-12-23 Thread Sebastian Riedel
> I'd be happy to write the tests (I think I'm OK at writing tests), if
> someone could help with letting me know what should be tested.

Well, just "OK" is not really enough. If i accept a pull request with
tests, they would have to be exemplary, because they'd be used
to teach how to write tests.

Maybe some day i'll get around to write them myself.

-- 
Sebastian Riedel
http://mojolicio.us
http://github.com/kraih
http://twitter.com/kraih

-- 
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 post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Re: How does hypnotoad handle the startup function?

2016-10-25 Thread Sebastian Riedel
> Use Mojo::IOLoop::Delay in a statup function, does this comply with the
> specification?

You'd normally use Mojo::IOLoop->next_tick(sub {...}).

-- 
Sebastian Riedel
http://mojolicio.us
http://github.com/kraih
http://twitter.com/kraih

-- 
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 post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Morbo errors (unintialized value at Mojo/Server/Morbo.pm line 22)

2016-09-22 Thread Sebastian Riedel
> Is this a known issue, has something changed in how to launch morbo, or is
> something else afoot?

Nope, this seems highly unusual.

-- 
Sebastian Riedel
http://mojolicio.us
http://github.com/kraih
http://twitter.com/kraih

-- 
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 post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Is Mojolicious a sensible long-term choice for web services?

2016-03-22 Thread Sebastian Riedel
> An important point:
> - will it be around and maintained 5 year, 10 years, 20 years from now?
> - will there be maintainers and developers for it?
>
> How does Mojolicious stand in this respect? It seems to depend on a single
> man, Sebastian Riedel. Will Mojo die when he turns elswehere?

You don't really have to guess, this happened once before with
Catalyst, like 10 years ago. It's not as actively maintained as it
used to be, but still around.

-- 
Sebastian Riedel
http://mojolicio.us
http://github.com/kraih
http://twitter.com/kraih

-- 
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 post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Re: Wishlist thread

2014-01-08 Thread Sebastian Riedel

 1) ... 2) ... 3) ...


That's all one use case really, and i'm not even sure it's a valid one. If
someone else has an opinion on this i'd like to hear it.

-- 
Sebastian Riedel
http://mojolicio.us
http://github.com/kraih
http://twitter.com/kraih

-- 
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 post to this group, send email to mojolicious@googlegroups.com.
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/groups/opt_out.