Hi Ben, thanks for answering!

On Monday, August 25, 2014 1:35:39 PM UTC+2, Ben van Staveren wrote:
>
>
> Hey Rasta, you're better off doing this in your startup: 
>
> $self->attr(_mango => sub { return Mango->new(...) }); 
> $self->helper(mango => return shift->app->_mango); 
>

I think it the second line should be 
$self->helper(mango => sub { return shift->app->_mango }); 
at least otherwise I get 'Can't call method "app" on an undefined value...'

But even if I use the attr approach you posted I still get the same error.
 

>
> The problem occurs when you are trying to execute a blocking operation 
> when non-blocking operations are already in progress, the usual culprit 
> for this are helpers. You'll have to find out what's causing a blocking 
> operation to take place :) 
>

Yes there is a second call issued (from browser, so it's not in the same 
method), which uses the same helper. But another call (blocking or 
non-blocking) to the driver should not be a problem right?
So should I create a new Mango() object for every call to make it work?

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

Reply via email to