Net::E...Domain(3pm)

πŸ“¦
version 0.28 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– Net::EPP::Frame::Command::Create::Domain β€” the perl manpage but make it cute πŸ’–

okay so bestie, welcome to Net::EPP::Frame::Command::Create::Domain from the Net::EPP::Frame::Command::Create family, and yes it is exactly what it sounds like: it's an instance of Net::EPP::Frame::Command::Create but for domain objects specifically. it's giving "i make new domains exist" energy. ✨


πŸŽ€ NAME πŸŽ€

Net::EPP::Frame::Command::Create::Domain β€” an instance of Net::EPP::Frame::Command::Create for domain objects. that's the whole vibe. πŸ¦‹


🌸 SYNOPSIS 🌸

okay so here's the little ritual you do:

use Net::EPP::Frame::Command::Create::Domain;
use strict;

my $create = Net::EPP::Frame::Command::Create::Domain->new;
$create->setDomain('example.uk.com);

print $create->toString(1);

and the way that this just works?? it results in an XML document like this:

<?xml version="1.0" encoding="UTF-8"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0
  epp-1.0.xsd">
    <command>
      <check>
        <domain:create
          xmlns:contact="urn:ietf:params:xml:ns:contact-1.0"
          xsi:schemaLocation="urn:ietf:params:xml:ns:contact-1.0
          contact-1.0.xsd">
            <domain:name>example-1.tldE<lt>/domain:name>
        </domain:create>
      </check>
      <clTRID>0cf1b8f7e14547d26f03b7641660c641d9e79f45</clTRIDE<gt>
    </command>
</epp>

no cap, that's the output. πŸ”₯


πŸ‘‘ OBJECT HIERARCHY πŸ‘‘

the family tree, the lineage, the ancestry dot com moment:

L<XML::LibXML::Node>
+----L<XML::LibXML::Document>
    +----L<Net::EPP::Frame>
        +----L<Net::EPP::Frame::Command>
            +----L<Net::EPP::Frame::Command::Create>
                +----L<Net::EPP::Frame::Command::Create::Domain>

look at her, four levels deep in the inheritance chain, thriving. πŸ’…


✨ METHODS ✨

πŸ“ setDomain

my $element = $frame->setDomain($domain_name);

this one sets the name of the object that's about to be created. and it returns the "<domain:name>" element. so you get the element back. cute, right? 🫢

🧚 setPeriod

$frame->setPeriod(1, 'y');

sets the initial registration period. the second argument is optional, bestie β€” you don't gotta pass it if you don't wanna.

πŸ’œ setRegistrant

$frame->setRegistrant($id);

sets the registrant. that's it. that's the whole job. iconic. ⭐

🌈 setContacts

$frame->setContacts({
        'admin'   => 'H12345',
        'tech'    => 'H54321',
        'billing' => 'H23451',
}));

sets the contacts. all three of them, in one little hashref, all matching the vibe. πŸŽ€

πŸ’« TTL Extension πŸ’«

$frame->setTTLs({
    NS => 3600,
    DS => 900,
});

this lets you specify TTLs for DNS records above the zone cut. 🌸

⚠️ heads up bestie: the server must support the TTL extension. if it doesn't, this is not gonna slay, it's gonna flop. so vibe check your server first. πŸ’€

and that's the whole page, bestie β€” every method, every arg, every default, all present and accounted for, periodt. πŸ’–

this gorgeous little document was brought to you by perl v5.40.1, dated 2025-04-19 β€” mwah, thanks for coming to my ted talk, ily, bye πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from