This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate:
authorNicholas Clark <nick@ccl4.org>
Tue, 21 Oct 2003 18:58:30 +0000 (18:58 +0000)
committerNicholas Clark <nick@ccl4.org>
Tue, 21 Oct 2003 18:58:30 +0000 (18:58 +0000)
[ 21372]
Sync with libnet 1.17
p4raw-link: @21372 on //depot/perl: 73c20b238d7378e539b3486e16ad5c6e46696374

p4raw-id: //depot/maint-5.8/perl@21512
p4raw-integrated: from //depot/perl@21511 'copy in' lib/Net/Domain.pm
(@19661..) lib/Net/ChangeLog.libnet lib/Net/FTP.pm (@19812..)

lib/Net/ChangeLog.libnet
lib/Net/Domain.pm
lib/Net/FTP.pm

index 057db8e..26d7ac8 100644 (file)
@@ -1,3 +1,22 @@
+Change 830 on 2003/09/25 by <gbarr@pobox.com> (Graham Barr)
+
+       Net::FTP
+       - documentation fixes
+
+Change 829 on 2003/09/25 by <gbarr@pobox.com> (Graham Barr)
+
+       Net::FTP
+       - Allow spaces after the file size in the response to SIZE
+
+Change 828 on 2003/09/25 by <gbarr@pobox.com> (Graham Barr)
+
+       Net::Domain
+       - Avoid infinite loop
+
+Change 821 on 2003/06/18 by <gbarr@pobox.com> (Graham Barr)
+
+       Release 1.16
+
 Change 820 on 2003/06/17 by <gbarr@pobox.com> (Graham Barr)
 
        Net::FTP
index c213ce9..40ad2a8 100644 (file)
@@ -16,7 +16,7 @@ use Net::Config;
 @ISA = qw(Exporter);
 @EXPORT_OK = qw(hostname hostdomain hostfqdn domainname);
 
-$VERSION = "2.18"; # $Id: //depot/libnet/Net/Domain.pm#20 $
+$VERSION = "2.19"; # $Id: //depot/libnet/Net/Domain.pm#21 $
 
 my($host,$domain,$fqdn) = (undef,undef,undef);
 
@@ -174,9 +174,10 @@ sub _hostdomain {
 
        if(defined $dom) {
            my @h = ();
+           $dom =~ s/^\.+//;
            while(length($dom)) {
                push(@h, "$host.$dom");
-               $dom =~ s/^[^.]+.//;
+               $dom =~ s/^[^.]+.+// or last;
            }
            unshift(@hosts,@h);
        }
@@ -336,6 +337,6 @@ it under the same terms as Perl itself.
 
 =for html <hr>
 
-I<$Id: //depot/libnet/Net/Domain.pm#20 $>
+I<$Id: //depot/libnet/Net/Domain.pm#21 $>
 
 =cut
index aac963b..beda695 100644 (file)
@@ -22,7 +22,7 @@ use Net::Config;
 use Fcntl qw(O_WRONLY O_RDONLY O_APPEND O_CREAT O_TRUNC);
 # use AutoLoader qw(AUTOLOAD);
 
-$VERSION = "2.71"; # $Id: //depot/libnet/Net/FTP.pm#78 $
+$VERSION = "2.72"; # $Id: //depot/libnet/Net/FTP.pm#80 $
 @ISA     = qw(Exporter Net::Cmd IO::Socket::INET);
 
 # Someday I will "use constant", when I am not bothered to much about
@@ -206,7 +206,7 @@ sub size {
   my $io;
   if($ftp->supported("SIZE")) {
     return $ftp->_SIZE($file)
-       ? ($ftp->message =~ /(\d+)$/)[0]
+       ? ($ftp->message =~ /(\d+)\s*$/)[0]
        : undef;
  }
  elsif($ftp->supported("STAT")) {
@@ -216,14 +216,14 @@ sub size {
    my $line;
    foreach $line (@msg) {
      return (split(/\s+/,$line))[4]
-        if $line =~ /^[-rwx]{10}/
+        if $line =~ /^[-rwxSsTt]{10}/
    }
  }
  else {
    my @files = $ftp->dir($file);
    if(@files) {
      return (split(/\s+/,$1))[4]
-        if $files[0] =~ /^([-rwx]{10}.*)$/;
+        if $files[0] =~ /^([-rwxSsTt]{10}.*)$/;
    }
  }
  undef;
@@ -1362,17 +1362,16 @@ Send a SITE command to the remote server and wait for a response.
 
 Returns most significant digit of the response code.
 
-=item type (TYPE [, ARGS])
+=item ascii
 
-This method will send the TYPE command to the remote FTP server
-to change the type of data transfer. The return value is the previous
-value.
+Transfer file in ASCII. CRLF translation will be done if required
 
-=item ascii ([ARGS]) binary([ARGS]) ebcdic([ARGS]) byte([ARGS])
+=item binary
 
-Synonyms for C<type> with the first arguments set correctly
+Transfer file in binary mode. No transformation will be done.
 
-B<NOTE> ebcdic and byte are not fully supported.
+B<Hint>: If both server and client machines use the same line ending for
+text files, then it will be faster to transfer all files in binary mode.
 
 =item rename ( OLDNAME, NEWNAME )
 
@@ -1405,9 +1404,10 @@ records this value and uses it when during the next data transfer. For this
 reason this method will not return an error, but setting it may cause
 a subsequent data transfer to fail.
 
-=item rmdir ( DIR )
+=item rmdir ( DIR [, RECURSE ])
 
-Remove the directory with the name C<DIR>.
+Remove the directory with the name C<DIR>. If C<RECURSE> is I<true> then
+C<rmdir> will attempt to delete everything inside the directory.
 
 =item mkdir ( DIR [, RECURSE ])
 
@@ -1743,7 +1743,7 @@ For an example of the use of Net::FTP see
 
 =over 4
 
-=item http://www.csh.rit.edu/~adam/Progs/autoftp-2.0.tar.gz
+=item http://www.csh.rit.edu/~adam/Progs/
 
 C<autoftp> is a program that can retrieve, send, or list files via
 the FTP protocol in a non-interactive manner.
@@ -1767,6 +1767,6 @@ under the same terms as Perl itself.
 
 =for html <hr>
 
-I<$Id: //depot/libnet/Net/FTP.pm#78 $>
+I<$Id: //depot/libnet/Net/FTP.pm#80 $>
 
 =cut