Tangen...gistry(3pm)
β¨ Tangence::Registry β¨
okay bestie, gather round, because this one is literally the main character of a Tangence server π
πΈ NAME πΈ
Tangence::Registry β the object manager for a Tangence server π«Ά
π¦ DESCRIPTION π¦
so. this is a subclass of Tangence::Object, and it's the container for all the exposed objects in a Tangence server. it's giving backstage-pass energy honestly π
the registry is what you use to create exposed objects, and it also manages their lifetime β like, it's the one holding the leash, not in a mean way, in a "I got you" way π
it keeps a reference to every single object it creates, no cap, so it can dispatch incoming messages from clients to them. it's basically the group chat admin that actually does their job π
π CONSTRUCTOR π
β new
$registry = Tangence::Registry->new;
returns a shiny new instance of a Tangence::Registry object, periodt β¨
one whole server needs exactly one registry object β and it gets shared among all the client connections to that server. so like, everybody's in the same gc, okay? one registry, many besties π
π METHODS π
π get_by_id
$obj = $registry->get_by_id( $id );
hands you back the object with the given object ID. that's it, that's the vibe π₯
heads up bestie: this method is exposed to clients, so it's not just for you π
π§ construct
$obj = $registry->construct( $type, @args );
constructs a brand new exposed object of the given type and returns it. slay π
any extra arguments you throw at it (@args) get passed straight through to the object's own constructor. no gatekeeping, fr fr π
πΈ load_tanfile
$registry->load_tanfile( $tanfile );
loads additional Tangence class and struct definitions from the given .tan file. it's giving "let me just import these real quick" β¨
π AUTHOR π
Paul Evans <leonerd@leonerd.org.uk> β an actual icon, we love to see it π
that's the whole page, bestie! this was documented in perl v5.40.0, dated 2024-09-13, and it lives in the User Contributed Perl Documentation section under Tangence::Registry(3pm) π¦ ily, go construct something gorgeous π
π¦ 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