Net::Finger(3pm)

Net::Finger3pm

A perl implementation of a finger client.

Usage

  use Net::Finger;
  # You can put the response in a scalar...
  $response = finger('[email protected]');
  unless ($response) {
      warn "Finger problem: $Net::Finger::error";
  }
  # ...or an array.
  @lines = finger('[email protected]', 1);

Overview

Net::Finger is a simple, straightforward implementation of a finger client in Perl -- so simple, in fact, that writing this documentation is almost unnecessary.

This module has one automatically exported function, appropriately entitled "finger()". It takes two arguments:

•

A username or email address to finger. (Yes, it does support the vaguely deprecated "user@host@host" syntax.) If you need to use a port other than the default finger port (79), you can specify it like so: "username@hostname:port".

•

(Optional) A boolean value for verbosity. True == verbose output. If you don't give it a value, it defaults to false. Actually, whether this output will differ from the non-verbose version at all is up to the finger server.

"finger()" is context-sensitive. If it's used in a scalar context, it will return the server's response in one large string. If it's used in an array context, it will return the response as a list, line by line. If an error of some sort occurs, it returns undef and puts a string describing the error into the package global variable $Net::Finger::error. If you'd like to see some excessively verbose output describing every step "finger()" takes while talking to the other server, put a true value in the variable $Net::Finger::debug.

Here's a sample program that implements a very tiny, stripped-down finger(1):

    #!/usr/bin/perl -w
    use Net::Finger;
    use Getopt::Std;
    use vars qw($opt_l);
    getopts('l');
    $x = finger($ARGV[0], $opt_l);
    if ($x) {
        print $x;
    } else {
        warn "$0: error: $Net::Finger::error\n";
    }

Releases

14 releases since Debian 2.1 (Slink); the text changed 7 times.

  1. 2.1
  2. 2.2
  3. 3.0
  4. 3.1
  5. 4.0–8
  6. 9–11
  7. 12
  8. 13

Bugs

•

Doesn't yet do non-blocking requests. (FITNR. Really.)

•

Doesn't do local requests unless there's a finger server running on localhost.

•

Contrary to the name's implications, this module involves no teledildonics.

Author

Dennis Taylor, <[email protected]>

From libnet-finger-perl 1.06-7 in Debian 13 (Trixie). Parsed by carta from the page's man source.