… | |
… | |
7 | use Coro::LWP; # afterwards LWP should not block |
7 | use Coro::LWP; # afterwards LWP should not block |
8 | |
8 | |
9 | =head1 ALTERNATIVES |
9 | =head1 ALTERNATIVES |
10 | |
10 | |
11 | Over the years, a number of less-invasive alternatives have popped up, |
11 | Over the years, a number of less-invasive alternatives have popped up, |
12 | which you might find more acceptable than this rather invasive and |
12 | which you might find more acceptable than this rather invasive and fragile |
13 | fragile module: |
13 | module. All of them only support HTTP (and sometimes HTTPS). |
14 | |
14 | |
15 | =over 4 |
15 | =over 4 |
16 | |
16 | |
17 | =item L<AnyEvent::HTTP> |
17 | =item L<AnyEvent::HTTP> |
18 | |
18 | |
19 | For HTTP and HTTPS only, works fine without Coro. Requires using a very |
19 | Works fine without Coro. Requires using a very different API than |
20 | different API than LWP. |
20 | LWP. Probably the best choice I<iff> you can do with a completely |
|
|
21 | different event-based API. |
21 | |
22 | |
22 | =item L<LWP::Protocol::AnyEvent::http> |
23 | =item L<LWP::Protocol::AnyEvent::http> |
23 | |
24 | |
24 | Makes LWP use L<AnyEvent::HTTP>. Does not make LWP event-based, but allows |
25 | Makes LWP use L<AnyEvent::HTTP>. Does not make LWP event-based, but allows |
25 | Coro threads to schedule unimpeded through its AnyEvent integration. |
26 | Coro threads to schedule unimpeded through its AnyEvent integration. |