Apocalypse > POE-Component-Client-SimpleFTP > POE::Component::Client::SimpleFTP::Utils

Download:
POE-Component-Client-SimpleFTP-0.003.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.003   Source  

NAME ^

POE::Component::Client::SimpleFTP::Utils - Miscellaneous FTP utility functions

VERSION ^

  This document describes v0.003 of POE::Component::Client::SimpleFTP::Utils - released May 04, 2011 as part of POE-Component-Client-SimpleFTP.

SYNOPSIS ^

        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!";
        }

DESCRIPTION ^

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:

code

Imports all of the code_* subs

FUNCTIONS ^

code_preliminary

Tests whether the code is a 1yz code ( Positive Preliminary reply ) and returns a boolean value.

code_success

Tests whether the code is a 2yz code ( Positive Completion reply ) and returns a boolean value.

code_intermediate

Tests whether the code is a 3yz code ( Positive Intermediate reply ) and returns a boolean value.

code_failure

Tests whether the code is a 4yz or 5yz code ( Transient/Permanent Negative Completion reply ) and returns a boolean value.

code_tls

Tests whether the code is a 6yz code ( Protected reply ) and returns a boolean value.

EOL

Returns the end-of-line terminator as specified in RFC 959

mdtm_parser

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.

feat_parser

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.

SEE ALSO ^

Please see those modules/websites for more information related to this module.

AUTHOR ^

Apocalypse <APOCAL@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2011 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.

DISCLAIMER OF WARRANTY ^

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "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 SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE 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 MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (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 SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

syntax highlighting: