Tangen...Struct(3pm)
β¨ NAME β¨
Tangence::Meta::Struct β bestie, it's the structure that represents one Tangence structure type π
π¦ DESCRIPTION π¦
Okay so picture this: this data structure is literally just a little container that holds all the info about one Tangence structure type. That's it. That's the job.
And here's the vibe β once you've constructed it and defined it, it's immutable. Locked in. Frozen. No take-backs, no edits, no "wait bestie let me change one thing." It is what it is, periodt. π
π CONSTRUCTOR π
πΈ new
$struct = Tangence::Meta::Struct->new( name => $name )
Hand it a name, it hands you back a shiny new instance representing that name. Iconic behavior honestly.
πΈ define
$struct->define( %args )
This is where you actually give the structure its definition β like, the real content, the whole personality.
fields => ARRAYβ an ARRAY reference stuffed with metadata about the structure's fields. And what's in that array? Instances ofTangence::Meta::Field, obviously. Each one. Every single one. π«Ά
π ACCESSORS π
πΈ defined
$defined = $struct->defined
Returns true if somebody actually came through and provided a definition of the structure using "define". If it's true, congrats, she's defined. If notβ¦ well. π
πΈ name
$name = $struct->name
Returns the name of the structure. Simple. Clean. The name. π
πΈ fields
@fields = $struct->fields
Returns a list of the fields defined on the structure β and listen, in their order of definition, okay? Order matters, don't come for me about it. The sequence is the sequence. β¨
π AUTHOR π
Paul Evans <leonerd@leonerd.org.uk>
And that's the whole page, bestie β written up against perl v5.40.0, dated 2024-09-13, from the User Contributed Perl Documentation collection. Go forth and structure your structures. π§π
π¦ where this page comes from
- ubuntu resolute: libtangence-perl 0.33-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtangence-perl 0.33-1 Β· 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