USAGE

        #!/usr/bin/perl
        use WWW::CNic::NG;
        use strict;

        my $cnic = WWW::CNic::NG->new(
                'username'      => 'H12345',
                'password'      => 'password',
                'test'          => 1, # run against the test database
        );

        # $response is a WWW::CNic::Response submodule:
        my $response = $cnic->whois('domain' => 'example.uk.com');

SYNOPSIS

\*(C`WWW::CNIC::NG\*(C' provides a simpler and more consistent interface to the \*(C`WWW::CNIC\*(C' module. It allows you to reuse the same object for multiple \s-1API\s0 calls, and provides Toolkit commands as methods of the object.

Executing Toolkit Commands

If you have used \*(C`WWW:CNic\*(C' you will be familiar with using it like so:

my $query = WWW::CNic->new( 'command' => 'whois', 'username' => 'H12345', 'password' => 'password', 'domain' => 'example.uk.com', );

$query->set(%more_params);

# $response is a WWW::CNic::Response submodule: my $response = $query->execute;

This is somewhat cumbersome compared to the earlier example. \*(C`WWW::CNIC::NG\*(C' serves to tidy up some of this mess.

Instead of specifying the desired command as a parameter supplied to the constructor, you simply call the method you want to use on the \*(C`WWW::CNIC::NG\*(C' object. The method's parameters are then used to prepare a query, and the response from the server is returned from the method.

COPYRIGHT

This module is (c) 2011 CentralNic Ltd. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

RELATED TO WWW::CNic::NG…

  • http://toolkit.centralnic.com/

  • WWW::CNic::Cookbook

  • WWW::CNic::Simple