Ricardo SIGNES > Net-Finger-Server-0.003 > Net::Finger::Server

Download:
Net-Finger-Server-0.003.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.003   Source   Latest Release: Net-Finger-Server-0.004

NAME ^

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

VERSION ^

version 0.003

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.

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 <rjbs@cpan.org>

COPYRIGHT AND LICENSE ^

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

This is free software; you can redistribute it and/or modify it under the same terms as perl itself.

syntax highlighting: