|
NAMEPOE::Component::Client::DNS::Recursive - A recursive DNS client for POEVERSIONversion 1.12SYNOPSISuse strict; use warnings; use Getopt::Long; use POE qw(Component::Client::DNS::Recursive); my $trace; GetOptions ('trace' => \$trace); my $host = shift || die "Nothing to query\n"; my $type = shift; POE::Session->create( package_states => [ 'main', [qw(_start _response _trace)], ], ); $poe_kernel->run(); exit 0; sub _start { POE::Component::Client::DNS::Recursive->resolve( event => '_response', host => $host, ( $type ? ( type => $type ) : () ), ( $trace ? ( trace => $_[SESSION]->postback( '_trace' ) ) : () ), ); return; } sub _trace { my $packet = $_[ARG1]->[0]; return unless $packet; print $packet->string; return; } sub _response { my $packet = $_[ARG0]->{response}; return unless $packet; print $packet->string; return; } DESCRIPTIONPOE::Component::Client::DNS::Recursive is a POE component that implements a recursive DNS client.POE sessions and components can spawn a POE::Component::Client::DNS::Recursive instance to perform a DNS query. The component will perform its task and return the results to the requesting session. One may also enable tracing of the delegation path from the root name servers for the name being looked up. CONSTRUCTOR
OUTPUT EVENTSThe output events from the component as specified in the "resolve" constructor.If you have opted to use postbacks, then these parameters will be passed in the arrayref in "ARG1".
SEE ALSOPOE::Component::Client::DNSPerl Programming AUTHORChris Williams <chris@bingosnet.co.uk>COPYRIGHT AND LICENSEThis software is copyright (c) 2017 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. |