|
NAMEPOE::Component::Client::Whois - A one shot non-blocking RFC 812 WHOIS query.VERSIONversion 1.38SYNOPSISuse strict; use warnings; use POE qw(Component::Client::Whois); use Data::Dumper; POE::Session->create( package_states => [ 'main' => [ qw(_start _response) ], ], ); $poe_kernel->run(); exit 0; sub _start { my ($kernel,$heap) = @_[KERNEL,HEAP]; POE::Component::Client::Whois->whois( host => "whois.nic.uk", query => 'bingosnet.co.uk', event => '_response', _arbitary => [ qw(moo moo moo) ] ); undef; } sub _response { print STDERR Dumper( $_[ARG0] ); } DESCRIPTIONPOE::Component::Client::Whois provides a lightweight one shot non-blocking RFC 812 WHOIS query to other POE sessions and components. The component will attempt to guess the appropriate whois server to connect to based on the query string passed.If no guess can be made it will connect to whois.internic.net for domains, whois.arin.net for IPv4 addresses and whois.6bone.net for IPv6 addresses. CONSTRUCTOR
OUTPUTARG0 will be a hashref, which contains the original parameters passed to whois() ( including any arbitary data ), plus either one of the following two keys:'reply', an arrayref of response lines from the whois server, assuming no error occurred; 'error', in lieu of a valid response, this will be defined with a brief description of what went wrong; No parsing is undertaken on the returned data, this is an exercise left to the reader >;] KUDOSketas, for first suggesting this module; buu, decay and hazard from #perl @ freenode, for helpful suggestions;This module is based on the linux whois client from <http://www.linux.it/~md/software/>. SEE ALSORFC 812 <http://www.faqs.org/rfcs/rfc812.html>.AUTHORChris Williams <chris@bingosnet.co.uk>COPYRIGHT AND LICENSEThis software is copyright (c) 2020 by Chris Williams.This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Visit the GSP FreeBSD Man Page Interface. |