about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>1998-06-20 03:20:58 +0000
committerGraham Barr <gbarr@pobox.com>1998-06-20 03:20:58 +0000
commit7cce163ae6dd50dd1ba42e5c0a04f1f65ec39a11 (patch)
treedf254f45da4259d5602743bd40e9c4b57776409d
parentc20dd2ed85af6ed295a7d4e7e0cf053f2137005d (diff)
downloadperl-libnet-7cce163ae6dd50dd1ba42e5c0a04f1f65ec39a11.tar.gz
Net::FTP
- Another small tweak to ->supported()

-rw-r--r--Net/FTP.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/Net/FTP.pm b/Net/FTP.pm
index 32733af..a9d86d7 100644
--- a/Net/FTP.pm
+++ b/Net/FTP.pm
@@ -21,7 +21,7 @@ use Net::Cmd;
 use Net::Config;
 # use AutoLoader qw(AUTOLOAD);
 
-$VERSION = "2.42"; # $Id: //depot/libnet/Net/FTP.pm#27 $
+$VERSION = "2.43"; # $Id: //depot/libnet/Net/FTP.pm#28 $
 @ISA     = qw(Exporter Net::Cmd IO::Socket::INET);
 
 # Someday I will "use constant", when I am not bothered to much about
@@ -638,12 +638,15 @@ sub supported {
 
     my $text = $ftp->message;
     if($text =~ /following\s+commands/i) {
-        $text =~ s/.*\n//;
+        $text =~ s/^.*\n//;
         $text =~ s/\n/ /sog;
         while($text =~ /(\w+)([* ])/g) {
             $hash->{"\U$1"} = $2 eq " " ? 1 : 0;
         }
     }
+    else {
+        $hash->{$cmd} = $text !~ /unimplemented/i;
+    }
 
     $hash->{$cmd} ||= 0;
 }