Created
November 27, 2011 14:10
-
-
Save gslin/1397608 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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__ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.