AnyEve...e::Help(3pm)
π NAME
okay so bestie, gather round π this is AnyEvent::FTP::Server::Role::Help β it's the Help role for FTP server, obviously. That's the whole name, that's the whole vibe, no notes. β¨
Oh and for the record, this page lives in the User Contributed Perl Documentation section, and its man page name is AnyEve...e::Help(3pm) β the truncation is real and it's giving mysterious main character energy, we don't question it. π
πΈ VERSION
version 0.20 β that's the one, that's the edition, slay. π
β¨ SYNOPSIS
so first things first, you gotta create a context π¦ like this:
package AnyEvent::FTP::Server::Context::EchoContext;
use Moo;
extends 'AnyEvent::FTP::Server::Context';
with 'AnyEvent::FTP::Server::Role::Help';
# implement the non-existent echo command
sub help_echo { 'ECHO <SP> text' }
sub cmd_echo
{
my($self, $con, $req) = @_;
$con->send_response(211 => $req->args);
$self->done;
}
1;
(notice how help_echo is literally just handing over the usage string, and cmd_echo does the actual work β they're a duo, an iconic pair, no cap π)
then start a server with that context π₯, like:
% aeftpd --context EchoContext
ftp://dfzcgohteq:igdcphxled@localhost:59402
once that's running, connect to it and go test the "HELP" command, bestie:
% telnet localhost 59402
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 aeftpd dev
help
214-The following commands are recognized:
214-ECHO HELP
214 Direct comments to devnull@bogus
help help
214 Syntax: HELP [<sp> command]
help echo
214 Syntax: ECHO <SP> text
help bogus
502 Unknown command
quit
221 Goodbye
Connection closed by foreign host.
look at her go π she's recognizing commands, she's answering help help, she's saying 502 Unknown command to help bogus with zero hesitation β the range, the talent, the audacity. π
π DESCRIPTION
so what is this role actually doing for you? boom:
this role provides a standard FTP "HELP" command. π―
it goes spelunking through your context class, finds any FTP commands ("cmd_*") you've defined, grabs the associated usage functions ("help_*") hanging out right next to them, and then implements the "HELP" command for you. that's it. that's the whole job. you write the little pieces, it does the gluing, you take the credit. periodt. π
β¨
π AUTHOR
author: Graham Ollis <plicease@cpan.org> π«Ά
contributors, aka the legends who also showed up:
- Ryo Okamoto π
- Shlomi Fish πΈ
- JosΓ© JoaquΓn Atria π§
π COPYRIGHT AND LICENSE
this software is copyright (c) 2017-2022 by Graham Ollis. π
it's free software, babes β you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. that's the deal, that's the license, iconic and legally binding. π
aaaand that's the whole page, bestie!! π this absolute masterpiece of a doc came to you via perl v5.40.1, dated 2026-02-16, in the fine old AnyEve...e::Help(3pm) section. go forth and let your FTP server help people out. ππ¦β¨
π¦ 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