Richard Simões > WWW-eNom > WWW::eNom



Annotate this POD


View/Report Bugs
Module Version: v1.3.3   Source   Latest Release: WWW-eNom-v1.4.0-TRIAL


WWW::eNom - Interact with eNom, Inc.'s reseller API


    use WWW::eNom;

    my $enom = WWW::eNom->new(
        username      => "resellid",
        password      => "resellpw",
        response_type => "xml_simple",
        test          => 1

        EndUserIP => "",
        ProductType => "Register",
        SLD => "myspiffynewdomain",
        TLD => "com"




Constructs a new object for interacting with the eNom API. If the "test" parameter is given, then the API calls will be made to the test server instead of the live one.

As of v0.3.1, an optional "response_type" parameter is supported. For the sake of backward compatibility, the default is "xml_simple"; see below for an explanation of this response type. Use of any other valid option will lead to the return of string responses straight from the eNom API. These options are:

AddBulkDomains (and many others)

    my $response = $enom->AddBulkDomains(
        ProductType => "register",
        ListCount   => 1,
        SLD1        => "myspiffynewdomain",
        TLD1        => "com",
        UseCart     => 1

Performs the specified command - see the eNom API users guide for the commands and their arguments.

For convenience, if you pass the "Domain" argument, it will be split into "SLD" and "TLD"; that is, you can say

    my $response = $enom->Check( SLD => "myspiffynewdomain", TLD => "com" );


    my $response = $enom->Check( Domain => "" );

The default return value is a Perl hash (via XML::Simple) representing the response XML from the eNom API; the only differences are

So for instance, a command Check( Domain = "enom.@" )> (the "@" means "com, net, org, biz, info") might return:

        Domain  => [qw(],
        Command => "CHECK",
        RRPCode => [qw(211 211 211 211 211)],
        RRPText => [
            "Domain not available",
            "Domain not available",
            "Domain not available",
            "Domain not available",
            "Domain not available"

You will need to read the API guide to check whether to expect responses in "RRPText" or "responses"; it's not exactly consistent.


As of v1.0.0, this module has been renamed to WWW::eNom. Net::eNom is now a thin wrapper to preserve backward compatibility.


Richard Simões, <rsimoes AT cpan DOT org>

Original version by Simon Cozens.


Copyright © 2013 Richard Simões. This module is released under the terms of the MIT License and may be modified and/or redistributed under the same or any compatible license.

syntax highlighting: