tie %options, 'Tie::IxHash',
'username' => { label => 'Reseller user name at OpenSRS',
tie %options, 'Tie::IxHash',
'username' => { label => 'Reseller user name at OpenSRS',
size => scalar(@tldlist),
options => [ @tldlist ],
default => 'com net org' },
size => scalar(@tldlist),
options => [ @tldlist ],
default => 'com net org' },
# Get the TLD of the new domain
my @bits = split /\./, $svc_domain->domain;
# Get the TLD of the new domain
my @bits = split /\./, $svc_domain->domain;
# See if it's one this export supports
my @tlds = split /\s+/, $self->option('tlds');
@tlds = map { s/\.//; $_ } @tlds;
# See if it's one this export supports
my @tlds = split /\s+/, $self->option('tlds');
@tlds = map { s/\.//; $_ } @tlds;
- return "Can't register top-level domain $tld, restricted to: " . $self->option('tlds') if ! grep { $_ eq $tld } @tlds;
+ return "Can't register top-level domain $tld, restricted to: "
+ . $self->option('tlds') if ! grep { $_ eq $tld || $_ eq "$sld$tld" } @tlds;
return "Net::OpenSRS does not support period other than 1 year" if $years != 1;
eval "use Net::OpenSRS;";
return "Net::OpenSRS does not support period other than 1 year" if $years != 1;
eval "use Net::OpenSRS;";