AnyEve...ontext(3pm)
β¨ NAME β¨
AnyEvent::FTP::Server::Context β it's the FTP Server client context class, bestie π
Think of it as the lil' brain that holds onto everything about one client's session on your FTP server. Manual name is AnyEve...ontext(3pm) (the universe truncates things, not me), and it lives in the User Contributed Perl Documentation set. π«Ά
πΈ VERSION πΈ
version 0.20 β she's serving, she's current-ish, slay.
π METHODS π
Okay so this is the whole menu, and we are going through every single one, no skips, no shortcuts. Periodt.
π cmd_quit
$ctx->cmd_quit($con, $req);
This one sends a quit command through $con. And $req? She's unused, girlie is just there for the vibes, sitting in the parameter list doing absolutely nothing. π Returns the $ctx object.
π done
$ctx->done;
TODO: document. That's it. That's the whole thing. The author said "I'll come back to this" and then didn't, and honestly? Relatable. Returns the $ctx object anyway. β¨
π help_quit
my $quit_str = $ctx->help_quit;
Returns the string "QUIT". That's the whole job. She's simple, she's reliable, she's giving minimal effort maximum payoff. π
π invalid_command
$ctx->invalid_command($con, $req);
Sends an invalid command response β specifically because of the request $req β through $con. So when your client says something unhinged, this is the one clapping back. π
π invalid_syntax
$ctx->invalid_syntax($con, $raw);
Sends a "command not understood" response through $con. Different flavour of rejection than the one above β this is the syntax one. π
π process_queue
$ctx->process_queue;
Processes the request queue. She's the little engine that could. π₯
π push_request
$ctx->push_request($con, $req);
Pushes the request onto the queue. The setup to process_queue's payoff. Iconic duo honestly.
π ready
my $bool = $ctx->ready;
$ctx->ready($bool)
Gets or sets the "is ready" status β and that status is a boolean. So you can peek at it, or you can set it. Two jobs, one method, main character energy. β¨
π ascii_layer
$ctx->ascii_layer;
The PerlIO layer to apply when writing (STOR, STOU, APPE) and when reading (RETR) while operating under ASCII file transfer mode. π¦
So specifically: by default, there's a layer that takes CRLF and emits native line endings β that's for writing. And another that takes native line endings and emits CRLF when reading.
ngl the original sentence gets a lil tangled around "a takes native line endings" β I'm keeping it as written so I don't go inventing behaviour that isn't there. π
π AUTHOR π
Author: Graham Ollis <plicease@cpan.org> π
Contributors, aka the group chat that made this happen:
- 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. So like, go off, but respectfully. π«Ά
β¨ cute sign-off, since we don't do boring footers here: this page is fromperl v5.40.1, dated2026-02-16, and it's theAnyEve...ontext(3pm)page β the FTP Server client context class, akaAnyEvent::FTP::Server::Context. Love that for her. bye bestie ππΈ
π¦ 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