diff options
author | Graham Barr <gbarr@pobox.com> | 1998-06-20 03:20:58 +0000 |
---|---|---|
committer | Graham Barr <gbarr@pobox.com> | 1998-06-20 03:20:58 +0000 |
commit | 7cce163ae6dd50dd1ba42e5c0a04f1f65ec39a11 (patch) | |
tree | df254f45da4259d5602743bd40e9c4b57776409d | |
parent | c20dd2ed85af6ed295a7d4e7e0cf053f2137005d (diff) | |
download | perl-libnet-7cce163ae6dd50dd1ba42e5c0a04f1f65ec39a11.tar.gz |
Net::FTP
- Another small tweak to ->supported()
-rw-r--r-- | Net/FTP.pm | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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; } |