NAME

Net::Finger::Server - a simple finger server

VERSION

version 0.005

SYNOPSIS

use Net::Finger::Server -run;

That's it! You might need to run with privs, since by default it will bind to port 79.

You can also:

use Net::Finger::Server -run => { port => 1179 };

...if you want.

Actually, both of these are sort of moot unless you also provide an isa argument, which sets the base class for the created server. Net::Finger::Server is, for now, written to work as a Net::Server subclass.

DESCRIPTION

How can there be no finger servers on the CPAN in 2008? Probably because there weren't any in 1999, and by then it was already too late. Finger might be dead, but it's fun for playing around.

Right now Net::Finger::Server uses Net::Server, but that might not last. Stick to the documented interface.

Speaking of the documented interface, you'll almost certainly want to subclass Net::Finger::Server to make it do something useful.

PERL VERSION

This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years.

Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl.

METHODS

username_regex

hostname_regex

The username_regex and hostname_regex methods return regex used to match usernames and hostnames in query strings. They're fairly reasonable, and suggestions for change are welcome. You can replace them, though, without breaking compliance with RFC 1288, since it doesn't define what a hostname or username is.

listing_reply

This method is called when a {C} query is received -- in other words, an empty query, used to request a listing of all users. It is passed a hashref of arguments, of where there is only one right now:

verbose - boolean; did client request a verbose reply?

The default reply is a rejection notice.

user_reply

This method is called when a {Q1} query is received -- in other words, a request for information about a named user. It is passed the username and a hashref of arguments, of where there is only one right now:

verbose - boolean; did client request a verbose reply?

The default reply is a rejection notice.

forward_reply

This method is called when a {Q2} query is received -- in other words, a request for the server to relay a request to another host. It is passed a hashref of arguments:

username - the user named in the query (if any)
hosts    - an arrayref of the hosts in the query, left to right
verbose  - boolean; did client request a verbose reply?

The default reply is a rejection notice.

unknown_reply

This method is called when the request can't be understood. It is passed the query string.

AUTHOR

Ricardo SIGNES <cpan@semiotic.systems>

CONTRIBUTOR

Ricardo Signes <rjbs@semiotic.systems>

COPYRIGHT AND LICENSE

This software is copyright (c) 2022 by Ricardo SIGNES.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.