List::...::Typed(3pm)

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

πŸ’– List::...::Typed(3pm) πŸ’–

okay bestie, so this is a page from the User Contributed Perl Documentation and it's literally the whole vibe for List::Objects::WithUtils::Array::Immutable::Typed. yes the manual name got shortened to List::...::Typed(3pm) for the header, we're keeping it cute and abbreviated, slay.


✨ NAME ✨

List::Objects::WithUtils::Array::Immutable::Typed β€” Immutable typed arrays πŸŽ€

like. arrays. that check their types. and that you cannot touch. the whole package.


✨ SYNOPSIS ✨

use List::Objects::WithUtils 'immarray_of';
use Types::Standard -types;
my $array = immarray_of( Int() => 1, 2, 3 );

that's it, that's the whole entrance. immarray_of pulls up with Int() from Types::Standard and three little integers and it's giving main character energy fr fr πŸ’…


✨ DESCRIPTION ✨

okay so here's the tea πŸ“ β€” these are immutable type-checking array objects. basically it's a combination of List::Objects::WithUtils::Array::Typed and List::Objects::WithUtils::Array::Immutable. the typed one said "know your types" and the immutable one said "don't touch me" and they had a baby and this is her. she's iconic. she's unbothered. she's not changing for anyone.

Type-checking is performed when the object is created ⭐ β€” so the vibe check happens at birth, not later.

⚠️ and listen, bestie: attempts to modify the object will throw an exception. no cap. do not try it. she will yell at you. πŸ’€

This class consumes the following roles, which contain most of the relevant documentation:

  • List::Objects::WithUtils::Role::Array
  • List::Objects::WithUtils::Role::Array::WithJunctions
  • List::Objects::WithUtils::Role::Array::Typed
  • List::Objects::WithUtils::Role::Array::Immutable

(that's where the actual docs live, iykyk β€” go read those for the real details πŸ¦‹)


✨ AUTHOR ✨

Jon Portnoy <avenj@cobaltirc.org> πŸ‘‘


and that's the whole page!! perl v5.38.2, dated 2024-03-07, manual page List::...::Typed(3pm) β€” ily, go make some immutable typed arrays, periodt πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from