Skip to content

Instantly share code, notes, and snippets.

@tempire
Created June 9, 2012 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tempire/2902439 to your computer and use it in GitHub Desktop.
Save tempire/2902439 to your computer and use it in GitHub Desktop.
use Mojo::UserAgent;
use Modern::Perl;
my $ua = Mojo::UserAgent->new;
$ua->get(
'tempi.re/ip' => sub {
warn Mojo::UserAgent->new->get('tempi.re/ip')->res->body;
}
);
$ua->get(
'mojolicio.us' => sub {
warn Mojo::UserAgent->new->get('mojolicio.us')
->res->dom->find('#introduction ul li:first-child');
}
);
Mojo::IOLoop->start;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment