AnyEvent::FTP::Response - Response class for asynchronous ftp client
version 0.19
Instances of this class represent a FTP server response.
my $code = $client->code;
Integer code for the message. These can be categorized thus:
Positive preliminary reply
Positive completion reply
Positive intermediate reply
Transient negative reply
Permanent negative reply
Generally 4xx and 5xx messages are errors, where as 1xx, 3xx are various states of (at least so far) successful operations. 2xx indicates a completely successful operation.
4xx
5xx
1xx
3xx
2xx
my $message = $res->message;
The human readable message returned from the server. This is always a list reference, even if the server only returned one line.
my $bool = $res->is_success;
True if the response does not represent an error condition (codes 1xx, 2xx or 3xx).
my $bool = $res->is_preliminary;
True if the response is a preliminary positive reply (code 1xx).
my $str = $res->as_string; my $str = "$res";
Returns a string representation of the response. This may not be exactly what was returned by the server, but will include the code and at least part of the message in a human readable format.
You can also get this string by treating objects of this class as a string (using it in a double quoted string, or by using string operators):
print "$res";
is the same as
print $res->as_string;
Author: Graham Ollis <plicease@cpan.org>
Contributors:
Ryo Okamoto
Shlomi Fish
José Joaquín Atria
This software is copyright (c) 2017-2021 by Graham Ollis.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install AnyEvent::FTP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AnyEvent::FTP
CPAN shell
perl -MCPAN -e shell install AnyEvent::FTP
For more information on module installation, please visit the detailed CPAN module installation guide.