Skip Menu |

This queue is for tickets about the POE-Component-Client-Keepalive CPAN distribution.

Report information
The Basics
Id: 14253
Status: resolved
Priority: 0/
Queue: POE-Component-Client-Keepalive

People
Owner: Nobody in particular
Requestors: cpan.20.spamproxy [...] spamgourmet.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.04
Fixed in: 0.04



Subject: patch Client-Keepalive.pm to work even if there's no ssl by disabling ssl
patch Client-Keepalive.pm version 0.04 to work even if there's no ssl by disabling ssl. This is perl, v5.8.6 built for i486-linux slackware 10.0 The "bug" exists if POE::Component::SSLify is not installed. To simulate, add a die() in the BEGIN block of POE/Component/SSLify.pm. With the patch, keepalive passes all tests whether SSLify is installed or not. This means that there is no explicit test for ssl support, but I don't feel qualified to add one. note: my email works, it's just a spamgourmet proxy so I can turn it off if I start getting spam.
--- poco-client-keepalive/Client-Keepalive.pm 2005-08-21 20:46:21.000000000 -0700 +++ poco-client-keepalive/Client-Keepalive.pm-new 2005-08-21 20:46:50.000000000 -0700 @@ -15,7 +15,19 @@ use POE::Wheel::SocketFactory; use POE::Component::Connection::Keepalive; use POE::Component::Client::DNS; -use POE::Component::SSLify qw( Client_SSLify); + +my $ssl_available; +eval { + require POE::Component::SSLify; +}; +if ($@) { + #can't load ssl -- disable. + $ssl_available = 0; +} else { + $ssl_available = 1; +} + + use constant DEBUG => 0; @@ -417,7 +429,10 @@ my $used = delete $self->[SF_USED]{$wheel_id}; if ($request->[RQ_SCHEME] eq 'https') { - $socket = Client_SSLify ($socket); + unless ($ssl_available) { + die "There is no SSL support, please install POE::Component::SSLify"; + } + $socket = POE::Component::SSLify::Client_SSLify ($socket); } $used->[USED_SOCKET] = $socket;
I applied your patch. I also commented out POE::Component::SSLify as a dependancy in Makefile.PL, so people trying to install it with CPAN or CPANPLUS don't run into conflict. Thanks!