List::...:Typed(3pm)
β¨ NAME β¨
okay bestie, so this page is all about List::Objects::WithUtils::Hash::Immutable::Typed β which is, and I cannot stress this enough, Immutable typed hashes π
πΈ SYNOPSIS πΈ
like, here's the whole vibe in four lines:
use List::Objects::WithUtils 'immhash_of';
use Types::Standard -types;
my $hash = immhash_of Int() => ( foo => 1, bar => 2 );
π DESCRIPTION π
So these are immutable type-checking hash objects, and honestly? They're basically a mashup π« β a combo of List::Objects::WithUtils::Hash::Typed and List::Objects::WithUtils::Hash::Immutable. Two icons, one object. Main character energy fr fr π
Here's the important bit: the type-checking happens when the object gets created. That's it. That's the moment. And then if you try to modify the object?? Nope. It throws an exception π She said no edits, periodt.
This class consumes the following roles, and ngl those roles are where basically all the actual documentation lives, so go read them:
List::Objects::WithUtils::Role::HashList::Objects::WithUtils::Role::Hash::TypedList::Objects::WithUtils::Role::Hash::Immutable
π¦ immhash_of
Creates a new immutable typed hash object β¨ (yes that's literally it, she does one thing and she does it beautifully)
π AUTHOR π
Jon Portnoy <avenj@cobaltirc.org> π«Ά
okay that's the whole page, mwah π credit where credit is due: this is documented under perl v5.38.2, dated 2024-03-07. slay, go forth and make your hashes immutable πβ
π¦ where this page comes from
- debian trixie: liblist-objects-withutils-perl 2.028003-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: liblist-objects-withutils-perl 2.028003-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: liblist-objects-withutils-perl 2.028003-5 Β· 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