POE::Component::Client::SimpleFTP::Utils - Miscellaneous FTP utility functions
This document describes v0.004 of POE::Component::Client::SimpleFTP::Utils - released November 04, 2014 as part of POE-Component-Client-SimpleFTP.
use POE::Component::Client::SimpleFTP::Utils qw( :code ); # in an event handler my $code = shift; if ( code_success( $code ) ) { print "FTP command OK\n"; } else { warn "FTP command error!"; }
This module provides the various utility functions for use in your FTP application. You can import any sub listed in the POD or those tags:
Imports all of the code_* subs
Tests whether the code is a 1yz code ( Positive Preliminary reply ) and returns a boolean value.
Tests whether the code is a 2yz code ( Positive Completion reply ) and returns a boolean value.
Tests whether the code is a 3yz code ( Positive Intermediate reply ) and returns a boolean value.
Tests whether the code is a 4yz or 5yz code ( Transient/Permanent Negative Completion reply ) and returns a boolean value.
Tests whether the code is a 6yz code ( Protected reply ) and returns a boolean value.
Returns the end-of-line terminator as specified in RFC 959
Returns a DateTime object representing the modification timestamp of a file. Useful for parsing "mdtm" in POE::Component::Client::SimpleFTP replies!
NOTE: The MDTM format does not supply a timezone, you have to process that yourself!
On an error returns undef.
Returns an array of FEAT capabilities present on the server. Useful for parsing "feat" in POE::Component::Client::SimpleFTP replies!
On an error returns an empty array.
Please see those modules/websites for more information related to this module.
POE::Component::Client::SimpleFTP
Apocalypse <APOCAL@cpan.org>
This software is copyright (c) 2014 by Apocalypse.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
The full text of the license can be found in the LICENSE file included with this distribution.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
To install POE::Component::Client::SimpleFTP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POE::Component::Client::SimpleFTP
CPAN shell
perl -MCPAN -e shell install POE::Component::Client::SimpleFTP
For more information on module installation, please visit the detailed CPAN module installation guide.