Re: [Mojolicious] nginx-unit and Mojolicious

2019-03-18 Thread Stefan Adams
Thanks for the report, Alex!  Do you happen to know what change was made in
nginx-unit that allowed for it to now be compatible with Mojolicious?

On Mon, Mar 18, 2019 at 3:57 PM Alex Povolotsky  wrote:

> Hello
>
> I'm glad to tell that unit, starting from 1.8.0, works fine with
> Mojolicious. For 1.7.0 and 1.7.1, a patch is available.
>
> Yes, unit( http://unit.nginx.org) is THE app server made by the same
> group who made nginx.
> --
> Alex
>
> --
> 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.
>

-- 
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] WebSocket Ping Frames

2019-03-18 Thread Dan Book
Perhaps you may want the websocket to time out when idle. I believe this
feature has been discussed in the past but I can't find an issue about it.

-Dan

On Mon, Mar 18, 2019 at 5:15 PM Veesh Goldman  wrote:

> Why doesn't Mojo::UserAgent automatically send pings when connected to a
> websocket? Under what circumstances would I not want to ping to show the
> connection is alive?
>
> --
> 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.
>

-- 
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.


[Mojolicious] WebSocket Ping Frames

2019-03-18 Thread Veesh Goldman
Why doesn't Mojo::UserAgent automatically send pings when connected to a
websocket? Under what circumstances would I not want to ping to show the
connection is alive?

-- 
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] Error handling with Mojo::SQLite

2019-03-18 Thread Dan Book
Also note that *not* catching the error and allowing it to render an
exception page and log the error message is often exactly what you want.

-Dan

On Mon, Mar 18, 2019 at 12:35 PM Dan Book  wrote:

> As mentioned in the documentation: "Any database errors will throw an
> exception as RaiseError is automatically enabled, so use eval or Try::Tiny
>  to catch them. "
>
> This is the standard way to handle errors in Perl. Syntax::Keyword::Try is
> also a nicer interface if you can use keyword plugins (perl 5.14+).
>
> -Dan
>
> On Mon, Mar 18, 2019 at 10:00 AM Luc Larochelle 
> wrote:
>
>> Hello Veesh, well to me that looks like "eval" , right ? I meant is there
>> a way with Mojo::SQLite to check errors ?
>>
>> On Saturday, 16 March 2019 15:12:11 UTC-4, Veesh Goldman wrote:
>>>
>>> Does Try::Tiny strike your fancy? It'll put the error into $_ in the
>>> catch block.
>>>
>>> Short of that, I'm fairly certain it'll crash your thread if it fails.
>>>
>>> On Fri, Mar 15, 2019, 10:22 PM Luc Larochelle 
>>> wrote:
>>>
 Hello everyone,

 While a 'select' statement can be double checked by the presence of the
 returned data, how can I confirm that statements such as 'insert' ,
 'update' or 'delete' are successful ?

 For instance, using SQL::Abstract and some helpers

 helper insertOne => sub {
 my ($c,$table) = @_;
 $c->sqlite->db->insert($table, $c->element);
 };



 I've seen in the documentation that one could *eval* and look into $@
 , but is there a more "inline" way to do this ?

 Cheers !

 Luc

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

>>> --
>> 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.
>>
>

-- 
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] Error handling with Mojo::SQLite

2019-03-18 Thread Dan Book
As mentioned in the documentation: "Any database errors will throw an
exception as RaiseError is automatically enabled, so use eval or Try::Tiny
 to catch them. "

This is the standard way to handle errors in Perl. Syntax::Keyword::Try is
also a nicer interface if you can use keyword plugins (perl 5.14+).

-Dan

On Mon, Mar 18, 2019 at 10:00 AM Luc Larochelle 
wrote:

> Hello Veesh, well to me that looks like "eval" , right ? I meant is there
> a way with Mojo::SQLite to check errors ?
>
> On Saturday, 16 March 2019 15:12:11 UTC-4, Veesh Goldman wrote:
>>
>> Does Try::Tiny strike your fancy? It'll put the error into $_ in the
>> catch block.
>>
>> Short of that, I'm fairly certain it'll crash your thread if it fails.
>>
>> On Fri, Mar 15, 2019, 10:22 PM Luc Larochelle  wrote:
>>
>>> Hello everyone,
>>>
>>> While a 'select' statement can be double checked by the presence of the
>>> returned data, how can I confirm that statements such as 'insert' ,
>>> 'update' or 'delete' are successful ?
>>>
>>> For instance, using SQL::Abstract and some helpers
>>>
>>> helper insertOne => sub {
>>> my ($c,$table) = @_;
>>> $c->sqlite->db->insert($table, $c->element);
>>> };
>>>
>>>
>>>
>>> I've seen in the documentation that one could *eval* and look into $@ ,
>>> but is there a more "inline" way to do this ?
>>>
>>> Cheers !
>>>
>>> Luc
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To post to this group, send email to mojol...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/mojolicious.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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.
>

-- 
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] Error handling with Mojo::SQLite

2019-03-18 Thread Luc Larochelle
Hello Veesh, well to me that looks like "eval" , right ? I meant is there a 
way with Mojo::SQLite to check errors ?

On Saturday, 16 March 2019 15:12:11 UTC-4, Veesh Goldman wrote:
>
> Does Try::Tiny strike your fancy? It'll put the error into $_ in the catch 
> block.
>
> Short of that, I'm fairly certain it'll crash your thread if it fails.
>
> On Fri, Mar 15, 2019, 10:22 PM Luc Larochelle  > wrote:
>
>> Hello everyone,
>>
>> While a 'select' statement can be double checked by the presence of the 
>> returned data, how can I confirm that statements such as 'insert' , 
>> 'update' or 'delete' are successful ?
>>
>> For instance, using SQL::Abstract and some helpers
>>
>> helper insertOne => sub {
>> my ($c,$table) = @_;
>> $c->sqlite->db->insert($table, $c->element);
>> };
>>
>>
>>
>> I've seen in the documentation that one could *eval* and look into $@ , 
>> but is there a more "inline" way to do this ?
>>
>> Cheers !
>>
>> Luc
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to mojol...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/mojolicious.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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.