AnyEve...ontext(3pm)

πŸ“¦ version 0.20, in ubuntu stonking

✨ 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

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 from perl v5.40.1, dated 2026-02-16, and it's the AnyEve...ontext(3pm) page β€” the FTP Server client context class, aka AnyEvent::FTP::Server::Context. Love that for her. bye bestie πŸ’œπŸŒΈ
πŸ“¦ where this page comes from