PrePAN

Sign in to PrePAN

LWP::UserAgent::Chained Chained interface for LWP::UserAgent

Good

Synopsis

my $ua = LWP::UserAgent::Chained->new;
   $ua->get($url)
      ->success(sub {  my ($res) = @_;  ... })
      ->server_error(sub { my ($res) = @_; ... })
      ->dispatch( retry => 3, interval => 1 );

Description

It might be simple and useful for LWP::UserAgent if it has chained API. How do you feel?

It's been just a vaporware now (the repository above is empty).

Comments

github repo is empty.
If did't handle errors, it's get same behavior of die?
It may be supposed not to die if error occurs, because LWP::UserAgent doesn't on error. But it may be better to die on error, I think.
Mojo::UserAgent does some similar chaining, though very mojolicious-centric. Still, its API is nice.
I haven't known that. I'll refer to it. Thanks!

Please sign up to post a review.