Net::FTP

Chapter 7 - Great CPAN Modules
by?Sam Tregar?
Apress ? 2002
has companion web siteCompanion Web Site

The Net::FTP module by Graham Barr is just one of a collection of modules offered in the libnet package. Net::FTP offers an object-oriented interface to the client side[16] of the FTP[17] protocol. With Net::FTP, users can write scripts that upload and download files from FTP servers with extreme ease.

Net::FTP is successful first and foremost because it answers a very common need. However, the module also benefits from an exceptionally clear interface. Learning the module is easy, and, better yet, the payoff is bigger than just learning to FTP files with Perl. This is because Net::FTP is implemented as a child class of both Net::Cmd and IO::Socket::INET (both also by Graham Barr). Once a user has learned Net::FTP, the other modules in the libnet distribution-Net::SMTP, Net::POP3 and Net::NNTP to name a few-will be easy for that user to pick up.

Net::FTP demonstrates the power of a careful use of inheritance to create a group of modules that share common base functionality. Overall Graham's modules are models of code clarity and object-oriented design. Anyone interested in implementing network protocols in Perl would benefit from a close examination of Net::FTP and the other modules in libnet.

[16]For the server side, see the excellent Net::FTPServer module by Richard Jones, Rob Brown, Keith Turner and Azazel.

[17]File Transfer Protocol, an internet protocol for transferring files. See RFC 959, available at http://www.rfc-editor.org.



Writing Perl Modules for CPAN
Writing Perl Modules for CPAN
ISBN: 159059018X
EAN: 2147483647
Year: 2002
Pages: 110
Authors: Sam Tregar

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net