UNIVER...ect::ID(3pm)
π UNIVERSAL::Object::ID π
okay bestie, so the page you're reading is literally titled UNIVER...ect::ID(3pm) β yes, the terminal cut it off like that, she's dramatic π
β and underneath all that abbreviation it's UNIVERSAL::Object::ID, living in the User Contributed Perl Documentation. And it does exactly one absurd little thing: it gives every object a unique identifier. every single one. no cap. π
β¨ NAME β¨
UNIVERSAL::Object::ID β supply a unique object identifier to every object π¦
πΈ SYNOPSIS πΈ
use DateTime; # for example
use UNIVERSAL::Object::ID;
my $date = DateTime->now;
print $date->object_id;
likeβ¦ that's it. you load one module and suddenly your DateTime object is out here knowing its own object_id. iconic behavior, honestly. π
π DESCRIPTION π
The way this works is: loading UNIVERSAL::Object::ID makes the Object::ID role available to every object. not some objects. not your objects. every object. π«Ά
β οΈ bestie, use at your own risk β polluting UNIVERSAL is not to be taken lightly. this is a big deal and you should treat it like one. π
The best place to use this module is in your own personal or internal use code, rather than in a widely distributed software library. basically: keep it in-house, don't ship it to the whole world. π β¨
Or!! you can use Method::Lexical to safely apply the UNIVERSAL effect to just your lexical scope. so the chaos is contained, which is lowkey the responsible main character move. π
π SEE ALSO π
Object::IDMethod::Lexical
and that's the whole page, bestie π
cute little sign-off: this was served up courtesy of perl v5.36.0, dated 2022-06-16, and stamped with the same abbrev'd UNIVER...ect::ID(3pm) energy it started with. mwah. ππ
π¦ where this page comes from
- ubuntu noble: libobject-id-perl 0.1.2-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libobject-id-perl 0.1.2-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libobject-id-perl 0.1.2-3 Β· 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