UR::Ro...hParams(3pm)
π UR::Role::PrototypeWithParams π
okay so bestie, welcome to the UR::Role::PrototypeWithParams page β that's the 3pm section of the perl docs btw, we're in the User Contributed Perl Documentation zone β¨
πΈ NAME πΈ
UR::Role::PrototypeWithParams β lowkey just binds a set of params to a role. that's it. that's the whole job. and she ate π
π¦ DESCRIPTION π¦
so here's the tea π« β objects of this class are what you get back when you call create() on a role's class. they're like, temporary little guys that pop into existence while a class is being defined, and their whole purpose is to bind a set of role params to a UR::Role::Prototype so you can use it in the "roles" section of a class description. they're giving backstage-pass energy, not main-character-forever energy, iykyk π
if you wanna know more, go read the "Parameterized Roles" section over in UR::Role β she explains it all π
β¨ Methods β¨
create(prototype => $role_proto, role_params => $hashref)β the constructor, no cap. both arguments are required, so don't come in here missing one, that's not the vibe π__role__()β returns itself. that's it, she's self-referential and unbothered π . this one gets used by the role composition mechanism to trigger autoloading the role's module whenever role names show up as strings in a class definition. so it's doing important behind-the-scenes work fr fr βinstantiate_role_instance($class_name)β returns aUR::Role::Instanceobject. simple as that, slay π
π₯ SEE ALSO π₯
go check these cuties out too:
UR::RoleUR::Role::PrototypeUR::Role::Instance
π bestie reminder: every single param, method and module name up there is literal β copy-paste responsibly, do not freestyle the spelling.
mwah, that's the whole page, you're basically a UR::Role expert now, periodt πβ¨ππ¦πΈ
this iconic little manual page came to you courtesy of perl v5.32.1, dated 2022-01-17 β ty for coming to my ted talk, ily, bye π«Ά
π¦ where this page comes from
- debian bookworm: libur-perl 0.470+ds-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libur-perl 0.470+ds-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libur-perl 0.470+ds-2 Β· 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