Data::HAL::URI(3pm)
π Data::HAL::URI β URI wrapper π
okay bestie, listen up, because this one is genuinely precious. Data::HAL::URI is literally just a wrapper for URI objects. that's it. that's the whole vibe. it holds a URI and looks cute doing it. π
β¨ VERSION β¨
this doc is describing Data::HAL::URI version 1.001. yes, iconic, we know. π
πΈ SYNOPSIS πΈ
the group-chat-approved usage, fr fr:
my $relation = $resource->relation->as_string;
π¦ DESCRIPTION π¦
so like. it's a wrapper. for URI objects. π«Ά
no cap, that's the description. slim, chic, does the job. the way that it just... wraps. obsessed. π
π INTERFACE π
π§ Composition
- None β but URI methods are delegated through the
"uri"attribute. so it's giving proxy energy, not inheritance energy. iykyk.
π Constructors
β¨ "new"
my $u = Data::HAL::URI->new('http://example.com/something');
- takes a string argument π
- returns a
Data::HAL::URIobject π
that's it. one arg in, one adorable little object out. slay.
π Attributes
β¨ "uri"
- type:
URIπ - required β οΈ
- readonly π β it can only be set from the
"new"constructor, so don't even try it, bestie - this attribute delegates all methods to URI except
as_stringπ
π Methods
β¨ "as_string"
here's the tea, and it's actually kinda clever:
- if the thing is still equal to the
uriβ it hands you back the original argument you passed to the constructor π«Ά - and yes, equality also takes CURIE expansion into account β it's not just a dumb string comparison, she's thorough π
- otherwise β it returns the
urias a string π
and if you want the unaltered behaviour, no worries, that's still available through the "uri" accessor, like:
$resource->relation->uri->as_string
see? two ways to do the thing. main character energy either way. π
π Exports
None. nothing. zero. zilch. she keeps to herself, respectfully. π
π DIAGNOSTICS π
None. no warnings, no drama, no cryptic error messages to decode at 2am. bless. π
β CONFIGURATION AND ENVIRONMENT β
Requires no configuration files or environment variables. literally nothing to set up. plug and play. the vibe check passes itself. β
quick reminder bestie:"uri"is readonly and can only be set from"new". don't fight it, she's not changing. π
this page ships with perl v5.36.0, dated 2022-08-28 β so yes, she's a little vintage but she's still serving looks. stan. πβ¨
π¦ where this page comes from
- ubuntu noble: libdata-hal-perl 1.001-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libdata-hal-perl 1.001-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdata-hal-perl 1.001-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms