diff options
author | Steve Hay <steve.m.hay@googlemail.com> | 2014-10-04 12:49:40 +0100 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2014-10-04 12:49:40 +0100 |
commit | 8bb43845710aa538de6b26d78891bc195053e4f8 (patch) | |
tree | bb4f8de73bdf779f0525d86ef3b4ba59151d27b7 | |
parent | 6cda6a94c38df76abe91f4d620a7377b8b889158 (diff) | |
download | perl-libnet-8bb43845710aa538de6b26d78891bc195053e4f8.tar.gz |
Improve support for $ftp->supported(CMD)
Enterprise FTP server (version 6600) returns a message beginning with "The following ftp server commands are recognized:" in response to a HELP command, which caused $ftp->supported('ALLO') to return 1 when in fact it should (surprisingly!) return 0.
-rw-r--r-- | lib/Net/FTP.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Net/FTP.pm b/lib/Net/FTP.pm index 2ad11ed..eb8e7dc 100644 --- a/lib/Net/FTP.pm +++ b/lib/Net/FTP.pm @@ -956,7 +956,7 @@ sub supported { unless $ftp->_HELP($cmd); my $text = $ftp->message; - if ($text =~ /following\s+commands/i) { + if ($text =~ /following.+commands/i) { $text =~ s/^.*\n//; while ($text =~ /(\*?)(\w+)(\*?)/sg) { $hash->{"\U$2"} = !length("$1$3"); |