Net::Whois

Raku interface to the Whois service

NAME

Net::Whois - Raku interface to the Whois service

SYNOPSIS

use Net::Whois;

my Net::Whois $w .= new;
my %h = $w.query: $who, $using;
for %h.kv -> $k, $v { say "$k => $v[*]" }

DESCRIPTION

Net::Whois is an interface to the Whois service

This is a very simple module that does what I just happened to need.

new()

The constructor takes no arguments.

multi method query(Str:D _ ~~ IP | Domain or die 'Not a valid IP or domain name' }, Str:D raw! --> List)

multi method query(Str:D _ ~~ IP | Domain or die 'Not a valid IP or domain name' }, Str:D multiple --> Hash)

multi method query(Str:D _ ~~ IP | Domain or die 'Not a valid IP or domain name' }, *@servers, Bool :raw --> Hash)

The first form of the method looks for the server and returns a List of values. If the :$raw flag is used then the result is returned verbatim.

The second form returns a Hash of the whois fields. The whois output may consist of several sections; if the :$multiple flag is used the values of the same-named field are concatenated into the same value string.

The third form takes a list of servers to query. It returns a Hash whose keys are the name of the server and the values are the hashes returned by the second form of the method, or the lists returned by the first form of the method if the :$raw flag has been used.

Installation

To install it using zef (a module management tool):

$ zef install Net::Whois

AUTHOR

Fernando Santagata [email protected]

COPYRIGHT AND LICENSE

Copyright 2023 Fernando Santagata

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

Net::Whois v0.0.1

Raku interface to the Whois service

Authors

  • Fernando Santagata

License

Artistic-2.0

Dependencies

Test Dependencies

Provides

  • Net::Whois

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.