AnyEve...esponse(3pm)
β¨ AnyEvent::FTP::Response β bestie edition π
okay so you're in AnyEvent::FTP::Response, which is a Perl module from the User Contributed Perl Documentation fam, and it's basically the little glow-up wrapper for a single FTP server response. π¦
VERSION β version 0.20. slay. π
πΈ NAME πΈ
AnyEvent::FTP::Response β it's the response class for the asynchronous ftp client. periodt. π
π DESCRIPTION π
So, like, instances of this class? They represent a FTP server response. that's it, that's the whole vibe. every time the server says something back to you, it gets wrapped up in one of these lil guys. π
π ATTRIBUTES π
π code
my $code = $client->code;
It's the integer code for the message. and bestie, these codes have categories, here's the tea:
- 1xx Positive preliminary reply
- 2xx Positive completion reply
- 3xx Positive intermediate reply
- 4xx Transient negative reply
- 5xx Permanent negative reply
So generally 4xx and 5xx messages are errors π (big yikes energy), whereas 1xx and 3xx are various states of β at least so far β successful operations. and 2xx? that one indicates a completely successful operation. ate. π₯
π message
my $message = $res->message;
The human readable message returned from the server. and this is always a list reference, even if the server only returned one line. one line, forty lines, doesn't matter, it's a list ref, no cap. π
π METHODS π
β is_success
my $bool = $res->is_success;
True if the response does not represent an error condition. that means codes 1xx, 2xx or 3xx. green flags only bestie πβ¨
β is_preliminary
my $bool = $res->is_preliminary;
True if the response is a preliminary positive reply β that's code 1xx. it's giving "we're so back". π
β as_string
my $str = $res->as_string;
my $str = "$res";
Returns a string representation of the response. heads up though: this may not be exactly what was returned by the server, but it will include the code and at least part of the message in a human readable format. so like, the vibe of the message, translated for humans. π«Ά
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;
literally identical, iykyk. π
π AUTHOR π
Author: Graham Ollis <plicease@cpan.org>
Contributors β the squad:
- Ryo Okamoto
- Shlomi Fish
- JosΓ© JoaquΓn Atria
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2017-2022 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. π
no gatekeeping here, it's free software fr fr.
and that's the whole page, bestie! this was AnyEve...esponse(3pm) as documented for perl v5.40.1, last touched 2026-02-16. mwah π go forth and parse some FTP responses β¨π¦πΈ
π¦ where this page comes from
- ubuntu stonking: libanyevent-ftp-perl 0.20-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms