Re: [Mojolicious] unit, PSGI and Mojolicous

2019-01-23 Thread Alex Povolotsky
It did not run because unit does not set PLACK_ENV; I've set it and now 
fights next problem. But nginx unit, according to tests, is a REALLY cool 
thing.

среда, 23 января 2019 г., 21:44:44 UTC+3 пользователь Stefan Adams написал:
>
> I don't know the first thing about PSGI, but Nginx Unit sounds really 
> interesting!  Thanks for bringing it up!
>
> Try this from the cookbook Plack middleware 
> 
>  
> and PSGI/Plack 
> ?
>
> use Mojolicious::Lite;use Plack::Builder;
> get '/welcome' => sub {
>   my $c = shift;
>   $c->render(text => 'Hello Mojo!');};
>
> builder {
>   enable 'Deflater';
>   app->start;};
>
>
> On Wed, Jan 23, 2019 at 9:48 AM Alex Povolotsky  > wrote:
>
>> Hello
>>
>> There is an app server, from nginx creators, named unit (
>> https://unit.nginx.org/). It supports Perl via PSGI, but fails with 
>> Mojolicious::Lite app.
>>
>> 2019/01/23 09:41:23.029 [error] 26579#26579 [unit] #4: PSGI: Failed to 
>> run Perl Application:
>> Undefined subroutine ::1 called.
>>
>> plack run the same app without problem, actually, I've tested a bare 
>> minimum one
>>
>> ===
>> #!/usr/bin/env perl
>> use Mojolicious::Lite;
>> get '/' => sub {
>> my $c = shift;
>> $c->render(text=>'hello');
>> };
>>
>> app->start;
>> ===
>>
>> Basic Plack code runs ok.
>>
>> I don't have any idea on tracing that error, maybe someone could help?
>>
>> 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...@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.


Re: [Mojolicious] unit, PSGI and Mojolicous

2019-01-23 Thread Stefan Adams
I don't know the first thing about PSGI, but Nginx Unit sounds really
interesting!  Thanks for bringing it up!

Try this from the cookbook Plack middleware

and PSGI/Plack
?

use Mojolicious::Lite;use Plack::Builder;
get '/welcome' => sub {
  my $c = shift;
  $c->render(text => 'Hello Mojo!');};

builder {
  enable 'Deflater';
  app->start;};


On Wed, Jan 23, 2019 at 9:48 AM Alex Povolotsky  wrote:

> Hello
>
> There is an app server, from nginx creators, named unit (
> https://unit.nginx.org/). It supports Perl via PSGI, but fails with
> Mojolicious::Lite app.
>
> 2019/01/23 09:41:23.029 [error] 26579#26579 [unit] #4: PSGI: Failed to run
> Perl Application:
> Undefined subroutine ::1 called.
>
> plack run the same app without problem, actually, I've tested a bare
> minimum one
>
> ===
> #!/usr/bin/env perl
> use Mojolicious::Lite;
> get '/' => sub {
> my $c = shift;
> $c->render(text=>'hello');
> };
>
> app->start;
> ===
>
> Basic Plack code runs ok.
>
> I don't have any idea on tracing that error, maybe someone could help?
>
> 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.


[Mojolicious] unit, PSGI and Mojolicous

2019-01-23 Thread Alex Povolotsky
Hello

There is an app server, from nginx creators, named unit 
(https://unit.nginx.org/). It supports Perl via PSGI, but fails with 
Mojolicious::Lite app.

2019/01/23 09:41:23.029 [error] 26579#26579 [unit] #4: PSGI: Failed to run 
Perl Application:
Undefined subroutine ::1 called.

plack run the same app without problem, actually, I've tested a bare 
minimum one

===
#!/usr/bin/env perl
use Mojolicious::Lite;
get '/' => sub {
my $c = shift;
$c->render(text=>'hello');
};

app->start;
===

Basic Plack code runs ok.

I don't have any idea on tracing that error, maybe someone could help?

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.