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

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

✨ NAME ✨

okay so bestie, this page is Net::EPP::Frame::Command::Update::Host β€” it's literally an instance of Net::EPP::Frame::Command::Update but for host objects. πŸ’…

(and for the record, the page header up top reads Net::E...::Host(3pm), and it lives in the User Contributed Perl Documentation. iykyk.)


🌸 SYNOPSIS 🌸

the vibe check:

use Net::EPP::Frame::Command::Update::Host;
use strict;

my $info = Net::EPP::Frame::Command::Update::Host->new;
$info->setHost('ns0.example.tld');

print $info->toString(1);

and that? that gives you an XML document that looks exactly like this, no cap:

<?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>
      <info>
        <host:update
          xmlns:host="urn:ietf:params:xml:ns:host-1.0"
          xsi:schemaLocation="urn:ietf:params:xml:ns:host-1.0
          host-1.0.xsd">
            <host:name>example-1.tldE<lt>/host:name>
        </host:update>
      </info>
      <clTRID>0cf1b8f7e14547d26f03b7641660c641d9e79f45</clTRIDE<gt>
    </command>
</epp>

πŸ‘‘ OBJECT HIERARCHY πŸ‘‘

this is the family tree, and yes she comes from a long line of icons:

L<XML::LibXML::Node>
+----L<XML::LibXML::Document>
    +----L<Net::EPP::Frame>
        +----L<Net::EPP::Frame::Command>
            +----L<Net::EPP::Frame::Command::Update>
                +----L<Net::EPP::Frame::Command::Update::Host>

πŸ’– METHODS πŸ’–

$frame->setHost($host_name);

this one specifies the host object that's getting updated. the main character of the operation fr.

$frame->addStatus($type, $info);

add a status of $type, and the extra $info is optional bestie. 🫢

$frame->remStatus($type);

remove a status of $type. bye bye πŸ‘‹

$frame->addAddr({ 'ip' => '10.0.0.1', 'version' => 'v4' });

adds a whole set of IP addresses to the host object. EPP supports multiple addresses of different versions, so go off. 🌈

$frame->remAddr({ 'ip' => '10.0.0.2', 'version' => 'v4' });

removes a set of IP addresses from the host object. again: EPP supports multiple addresses of different versions. same energy, opposite direction. πŸ’€

my $el = $frame->chg;

this is the lazy-building of the 'host:chg' element. lazy but make it fashion ✨

$frame->chgName('ns2.example.com');

changes the name of the host. glow-up moment. πŸ¦‹

🌟 TTL Extension 🌟

$frame->chgTTLs({
    A => 3600,
    AAAA => 900,
});

this specifies TTLs for glue records. heads up tho: the server must support the TTL extension β€” no extension, no TTLs, that's the rule. 😭


and that's the whole page, bestie! πŸ’œ this was perl v5.40.1, dated 2025-04-19, and it's page Net::E...::Host(3pm). slay, go update some hosts, periodt. πŸŽ€

πŸ“¦ where this page comes from