Skip to content

Instantly share code, notes, and snippets.

@gslin
Created November 27, 2011 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gslin/1397608 to your computer and use it in GitHub Desktop.
Save gslin/1397608 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010;
use Mojo::UserAgent;
use Mojolicious::Lite;
get '/test' => sub {
my $self = shift;
my $ua = Mojo::UserAgent->new;
my $body = $ua->get('http://www.google.com/')->res->body;
$self->render(text => '');
};
app->start;
__END__
@gslin
Copy link
Author

gslin commented Nov 27, 2011

Which gives me: Undefined subroutine &Mojo::IOWatcher::EV::timer called at /Users/gslin/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Mojo/IOLoop/Client.pm line 39.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment