… | |
… | |
46 | use AnyEvent::Util (); |
46 | use AnyEvent::Util (); |
47 | use AnyEvent::Handle (); |
47 | use AnyEvent::Handle (); |
48 | |
48 | |
49 | use base Exporter::; |
49 | use base Exporter::; |
50 | |
50 | |
51 | our $VERSION = '2.13'; |
51 | our $VERSION = '2.14'; |
52 | |
52 | |
53 | our @EXPORT = qw(http_get http_post http_head http_request); |
53 | our @EXPORT = qw(http_get http_post http_head http_request); |
54 | |
54 | |
55 | our $USERAGENT = "Mozilla/5.0 (compatible; U; AnyEvent-HTTP/$VERSION; +http://software.schmorp.de/pkg/AnyEvent)"; |
55 | our $USERAGENT = "Mozilla/5.0 (compatible; U; AnyEvent-HTTP/$VERSION; +http://software.schmorp.de/pkg/AnyEvent)"; |
56 | our $MAX_RECURSE = 10; |
56 | our $MAX_RECURSE = 10; |
… | |
… | |
1328 | # other formats fail in the loop below |
1328 | # other formats fail in the loop below |
1329 | |
1329 | |
1330 | for (0..11) { |
1330 | for (0..11) { |
1331 | if ($m eq $month[$_]) { |
1331 | if ($m eq $month[$_]) { |
1332 | require Time::Local; |
1332 | require Time::Local; |
1333 | return Time::Local::timegm ($S, $M, $H, $d, $_, $y); |
1333 | return eval { Time::Local::timegm ($S, $M, $H, $d, $_, $y) }; |
1334 | } |
1334 | } |
1335 | } |
1335 | } |
1336 | |
1336 | |
1337 | undef |
1337 | undef |
1338 | } |
1338 | } |