AnyEve...e::Help(3pm)

πŸ“¦ version 0.20, in ubuntu stonking

πŸ‘‘ 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 🧚

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