X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fftp.pl;h=3f0af1a8d7fa1431e3c82dafd711b0edad8e6f17;hb=190eec7cba34ea20a9dea7228e79de06d80262f7;hp=e67134810502756c050c008372edc12a8e5f8c54;hpb=3e3baf6d63945cb64e829d6e5c70a7d00f3d3d03;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/ftp.pl b/lib/ftp.pl index e671348..3f0af1a 100644 --- a/lib/ftp.pl +++ b/lib/ftp.pl @@ -1,4 +1,13 @@ #-*-perl-*- +# +# This library is no longer being maintained, and is included for backward +# compatibility with Perl 4 programs which may require it. +# +# In particular, this should not be used as an example of modern Perl +# programming techniques. +# +# Suggested alternative: Net::FTP +# # This is a wrapper to the chat2.pl routines that make life easier # to do ftp type work. # Mostly by Lee McLoughlin @@ -65,7 +74,7 @@ # No longer call die expect on fatal errors. Just return fail codes. # Changed returns so higher up routines can tell whats happening. # Get expect/accept in correct order for dir listing. -# When ftp_show is set then print hashes every 1k transfered (like ftp). +# When ftp_show is set then print hashes every 1k transferred (like ftp). # Allow for stripping returns out of incoming data. # Save last error in a global string. # @@ -88,15 +97,9 @@ # Initial revision # -eval { require 'chat2.pl' }; -die qq{$@ -The obsolete and problematic chat2.pl library has been removed from the -Perl distribution at the request of it's author. You can either get a -copy yourself or, preferably, fetch the new and much better Net::FTP -package from a CPAN ftp site. -} if $@ && $@ =~ /locate chat2.pl/; -die $@ if $@; -eval "require 'socket.ph'" || eval "require 'sys/socket.ph'" || die "socket.ph missing: $!\n"; +require 'chat2.pl'; # into main +eval "require 'socket.ph'" || eval "require 'sys/socket.ph'" + || die "socket.ph missing: $!\n"; package ftp;