| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package AnyEvent::Finger; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 2 |  |  | 2 |  | 62705 | use strict; | 
|  | 2 |  |  |  |  | 11 |  | 
|  | 2 |  |  |  |  | 57 |  | 
| 4 | 2 |  |  | 2 |  | 10 | use warnings; | 
|  | 2 |  |  |  |  | 3 |  | 
|  | 2 |  |  |  |  | 58 |  | 
| 5 | 2 |  |  | 2 |  | 8 | use base qw( Exporter ); | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 593 |  | 
| 6 |  |  |  |  |  |  |  | 
| 7 |  |  |  |  |  |  | our @EXPORT_OK = qw( finger_client finger_server ); | 
| 8 |  |  |  |  |  |  |  | 
| 9 |  |  |  |  |  |  | # ABSTRACT: Simple asynchronous finger client and server | 
| 10 |  |  |  |  |  |  | our $VERSION = '0.14'; # VERSION | 
| 11 |  |  |  |  |  |  |  | 
| 12 |  |  |  |  |  |  |  | 
| 13 |  |  |  |  |  |  | sub finger_client ($$$;$) | 
| 14 |  |  |  |  |  |  | { | 
| 15 | 2 |  |  | 2 | 1 | 3891 | my($hostname) = shift; | 
| 16 | 2 |  |  |  |  | 397 | require AnyEvent::Finger::Client; | 
| 17 | 2 |  |  |  |  | 11 | AnyEvent::Finger::Client | 
| 18 |  |  |  |  |  |  | ->new( hostname => $hostname ) | 
| 19 |  |  |  |  |  |  | ->finger(@_); | 
| 20 | 2 |  |  |  |  | 10 | (); | 
| 21 |  |  |  |  |  |  | } | 
| 22 |  |  |  |  |  |  |  | 
| 23 |  |  |  |  |  |  |  | 
| 24 |  |  |  |  |  |  | # keep the server object in scope so that | 
| 25 |  |  |  |  |  |  | # we don't unbind from the port.  If you | 
| 26 |  |  |  |  |  |  | # don't want this, then use the OO interface | 
| 27 |  |  |  |  |  |  | # for ::Server instead. | 
| 28 |  |  |  |  |  |  | my $keep = []; | 
| 29 |  |  |  |  |  |  |  | 
| 30 |  |  |  |  |  |  | sub finger_server ($;$) | 
| 31 |  |  |  |  |  |  | { | 
| 32 | 1 |  |  | 1 | 1 | 4264 | require AnyEvent::Finger::Server; | 
| 33 | 1 |  |  |  |  | 7 | my $server = AnyEvent::Finger::Server | 
| 34 |  |  |  |  |  |  | ->new | 
| 35 |  |  |  |  |  |  | ->start(@_); | 
| 36 | 1 |  |  |  |  | 3 | push @$keep, $server; | 
| 37 | 1 |  |  |  |  | 2 | $server; | 
| 38 |  |  |  |  |  |  | } | 
| 39 |  |  |  |  |  |  |  | 
| 40 |  |  |  |  |  |  | 1; | 
| 41 |  |  |  |  |  |  |  | 
| 42 |  |  |  |  |  |  | __END__ |