Method...ructor(3pm)
π Method::Generate::Constructor::Role::StrictConstructor β the perl manual page, but make it make sense π
okay bestie, so this is a page from the User Contributed Perl Documentation section of the perl manual β the manual name is Method::Generate::Constructor::Role::StrictConstructor, and no, that name is not a typo, it's just perl being perl. π«Ά
β¨ NAME β¨
Method::Generate::Constructor::Role::StrictConstructor β it's literally a role that makes Moo constructors strict. that's it. that's the whole vibe. π
πΈ VERSION πΈ
version 0.011 β yes she's on 0.011, she's a whole person, don't judge her.
π¦ DESCRIPTION π¦
so here's the tea, bestie: this role wraps _assign_new in Method::Generate::Constructor with a little bit of code. and what does that little bit of code do? it makes sure that every single argument you hand to the constructor is a valid init_args for the class. π
like, if you try to pass it something that isn't a legit init_args, it's gonna notice. no sneaky extra args slipping through the door. the vibe check is mandatory and everyone gets checked. periodt.
π STANDING ON THE SHOULDERS OF ... π
ngl, this code would not exist without the examples in MooX::InsideOut and MooseX::StrictConstructor. full credit to the ancestors, we are simply standing on their shoulders and we are grateful. π
π SEE ALSO π
MooX::InsideOutMooseX::StrictConstructor
π§ AUTHOR π§
George Hartzell <hartzell@cpan.org> β icon behavior, honestly. π«‘
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2020 by George Hartzell.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
fr fr, it's free software under the same terms as the Perl 5 programming language system itself β go wild, but legally. π
and that's the whole page, bestie!! π this little gem came to you courtesy of perl v5.36.0, dated 2022-12-06, from the Method...ructor(3pm) page. go forth and construct strictly. π
β¨π
π¦ where this page comes from
- debian bookworm: libmoox-strictconstructor-perl 0.011-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmoox-strictconstructor-perl 0.011-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmoox-strictconstructor-perl 0.011-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu questing: libmoox-strictconstructor-perl 0.011-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms