Hello,

I have this simple code:

use Mojolicious::Lite; 

# Non-blocking
> get '/' => sub {
>   my $c = shift;
>   $c->ua->get('mojolicio.us' => sub {
>     my ($ua, $tx) = @_;
>     $c->render(data => $tx->res->dom->at('title')->text);
>   });
> };
> app->start;


If I reload the page multiple times, sometimes I get the following error 
message:
[error] Event "read" failed: Can't call method "res" on an undefined value 
at /Library/Perl/5.16/Mojolicious/Controller.pm line 221

How can I avoid this?

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