1 2 3 4 5
my $promise = sub { $ua->aget('http://second')->then(sub { say 'qbert' }); }; $ua->aget('http://first')->then($promise)->then(sub { say 'third' })
You can clone a snippet to your computer for local editing. Learn more.