… | |
… | |
63 | =cut |
63 | =cut |
64 | |
64 | |
65 | package Coro::LWP; |
65 | package Coro::LWP; |
66 | |
66 | |
67 | use strict; |
67 | use strict; |
|
|
68 | no warnings; |
|
|
69 | |
|
|
70 | BEGIN { |
|
|
71 | # suppress warnings |
|
|
72 | local $^W = 0; |
|
|
73 | require Net::Config; |
|
|
74 | } |
68 | |
75 | |
69 | # import these so they cna grab Socket::inet_aton |
76 | # import these so they cna grab Socket::inet_aton |
70 | use AnyEvent::Util (); |
77 | use AnyEvent::Util (); |
71 | use AnyEvent::DNS (); |
78 | use AnyEvent::DNS (); |
72 | |
79 | |
73 | use Coro::Select (); |
80 | use Coro::Select (); |
74 | use Coro::Util (); |
81 | use Coro::Util (); |
75 | use Coro::Socket (); |
82 | use Coro::Socket (); |
76 | |
83 | |
77 | use Socket (); |
84 | use Socket (); |
|
|
85 | |
78 | use IO::Socket::INET (); |
86 | use IO::Socket::INET (); |
79 | |
87 | |
80 | use Net::HTTP (); |
88 | use Net::HTTP (); |
81 | use Net::FTP (); |
89 | use Net::FTP (); |
82 | use Net::NNTP (); |
90 | use Net::NNTP (); |
… | |
… | |
88 | for (@Net::HTTP::ISA, @Net::FTP::ISA, @Net::NTTP::ISA) { |
96 | for (@Net::HTTP::ISA, @Net::FTP::ISA, @Net::NTTP::ISA) { |
89 | $_ = Coro::LWP::Socket:: if $_ eq IO::Socket::INET::; |
97 | $_ = Coro::LWP::Socket:: if $_ eq IO::Socket::INET::; |
90 | } |
98 | } |
91 | |
99 | |
92 | package Coro::LWP::Socket; |
100 | package Coro::LWP::Socket; |
|
|
101 | |
|
|
102 | no warnings; |
93 | |
103 | |
94 | use base Coro::Socket::; |
104 | use base Coro::Socket::; |
95 | |
105 | |
96 | sub new { |
106 | sub new { |
97 | my $self = shift; |
107 | my $self = shift; |