From e17d933dae162eb2ce11b5f6787c21bc360c88e5 Mon Sep 17 00:00:00 2001 From: Graham Barr Date: Tue, 29 Jun 2004 15:39:46 +0000 Subject: Fixed Authen::SASL checking in SMTP.pm and POP3.pm --- Net/POP3.pm | 4 ++-- Net/SMTP.pm | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Net/POP3.pm b/Net/POP3.pm index 3a5aec0..a04e12a 100644 --- a/Net/POP3.pm +++ b/Net/POP3.pm @@ -13,7 +13,7 @@ use Net::Cmd; use Carp; use Net::Config; -$VERSION = "2.27"; +$VERSION = "2.28"; @ISA = qw(Net::Cmd IO::Socket::INET); @@ -401,7 +401,7 @@ sub auth { eval { require MIME::Base64; require Authen::SASL; - } or return $self->set_error(500,["Need MIME::Base64 and Authen::SASL todo auth"]); + } or $self->set_status(500,["Need MIME::Base64 and Authen::SASL todo auth"]), return 0; my $capa = $self->capa; my $mechanisms = $capa->{SASL} || 'CRAM-MD5'; diff --git a/Net/SMTP.pm b/Net/SMTP.pm index e7276de..44a955a 100644 --- a/Net/SMTP.pm +++ b/Net/SMTP.pm @@ -16,7 +16,7 @@ use IO::Socket; use Net::Cmd; use Net::Config; -$VERSION = "2.28"; +$VERSION = "2.29"; @ISA = qw(Net::Cmd IO::Socket::INET); @@ -109,8 +109,10 @@ sub etrn { sub auth { my ($self, $username, $password) = @_; - require MIME::Base64; - require Authen::SASL; + eval { + require MIME::Base64; + require Authen::SASL; + } or $self->set_status(500,["Need MIME::Base64 and Authen::SASL todo auth"]), return 0; my $mechanisms = $self->supports('AUTH',500,["Command unknown: 'AUTH'"]); return unless defined $mechanisms; -- cgit v1.2.3-24-ge0c7