Net::RD...roperty(3)

πŸ“¦
version 0.43 Β· 3 versions
, in fedora 44

✨ Net::RDAP::JCard::Property ✨

okay so bestie, real talk: this page lives in the User Contributed Perl Documentation section of your manual, and it's all about Net::RDAP::JCard::Property β€” a module representing a property of a Net::RDAP::JCard object. πŸ’…


🌸 NAME 🌸

Net::RDAP::JCard::Property β€” a module representing a property of a Net::RDAP::JCard object. that's it, that's the name, she's self-explanatory and iconic for it πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#
# get a property by calling the properties() method on a Net::RDAP::JCard
# object
#
$prop = [ $jcard->properties('tel') ]->[0];

say $prop->param('type');
say $prop->value;

no cap, that's the whole vibe. get a property off a jCard, ask it for its type param, ask it for its value. slay. ✨


πŸ’– DESCRIPTION πŸ’–

so the data inside a jCard object (RFC 7095, https://www.rfc-editor.org/rfc/rfc7095.html) is stored in a whole set of properties, and this module is the one that represents them. it's giving personal assistant to the properties fr fr. 🫢

every property has exactly four elements, specifically:

  1. the type, which is a string such as "fn" (full name) or "email" (email address);
  2. parameters, which are represented as a hashref;
  3. a value type, which is a string such as "text" or "URI";
  4. the value, which can be a string or arrayref.

and Net::RDAP::JCard::Property provides an ergonomic way to access these elements. ergonomic!! like a lil ergonomic chair for your data. πŸ’œ


πŸŽ€ CONSTRUCTOR πŸŽ€

$prop = Net::RDAP::JCard::Property->new($ref);

you probably don't need to instantiate these objects yourself, bestie, but if you do, you just need to pass an arrayref containing the type, parameters, value type and value. that's the whole ritual. 🧚


⭐ NOTE ON CASE SENSITIVITY ⭐

in general, most values in vCard objects are case-insensitive, however, the jCard RFC (https://datatracker.ietf.org/doc/html/rfc7095) requires that property and value types be lowercase.

Net::RDAP::JCard::Property will internally preserve the case of property and value types so that JSON serialization via the TO_JSON() method will return the original data structure. yes queen, she remembers everything. πŸ™ˆ

please see the documentation for each of the methods listed below to see how case is handled for those methods. (spoiler: it varies. it's a whole journey. iykyk.) πŸ‘‘


🌈 METHODS 🌈

πŸ’… PROPERTY TYPE

$type = $prop->type;

returns a string containing the property type. see the vCard Properties IANA registry (https://www.iana.org/assignments/vcard-elements/vcard-elements.xhtml#properties) for a list of possible values.

this method will always return the property type in lowercase. periodt.


πŸ“ PROPERTY PARAMETERS

$params = $prop->params;

returns a hashref containing the property parameters. see the "vCard Parameters|https://www.iana.org/assignments/vcard-elements/vcard-elements.xhtml#parameters" IANA registry for a list of possible parameter names.

the keys of this hashref will always be in lowercase as per Section 3.4 of RFC 7095 (https://datatracker.ietf.org/doc/html/rfc7095#section-3.4). lowercase keys only, it's the law. βš–οΈ

$param = $prop->param($name);

returns the value of the $name parameter or "undef". $name will be matched case-insensitively against the keys in the hashref. so she's flexible here, unlike upstairs. πŸ’«


πŸ¦‹ PROPERTY VALUE TYPE

$value_type = $prop->value_type;

returns a string containing the property value type. see the vCard Value Data Types IANA registry (https://www.iana.org/assignments/vcard-elements/vcard-elements.xhtml#value-data-types) for a list of possible values.

this method will always return the value type in lowercase. consistent queen. ✨


πŸ”₯ URIness

some properties may be URIs, depending on the property type and value type. the may_be_uri() method will return a true value if the property value may be a URI (either because of the specification of its type, or the value of its value_type()). it's giving "maybe, maybe not, check with me first". 🌈


πŸ’œ PROPERTY VALUE

$value = $prop->value;

returns the property value. the actual goods. the main character. πŸ‘‘


copyright 2018-2023 CentralNic Ltd, 2024-2026 Gavin Brown. for licensing information, please see the "LICENSE" file in the Net::RDAP distribution. respect the paperwork bestie, it's important. πŸ“œ


and that's the tea, babes 🍡 this page came to you courtesy of perl v5.42.2, dated 2026-06-17 β€” go forth and query your jCard properties, you absolute icon πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from