about summary refs log tree commit
diff options
context:
space:
mode:
-rw-r--r--Net/POP3.pm4
-rw-r--r--Net/SMTP.pm8
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;