MouseX...tructor(3pm)
β¨ NAME β¨
MouseX::StrictConstructor β bestie, this makes your object constructors blow up on unknown attributes π₯ no cap.
π¦ SYNOPSIS π¦
use Mouse;
use MouseX::StrictConstructor;
that's literally it. two lines. iconic.
π DESCRIPTION π
okay so here's the tea: just loading this module makes your constructors "strict". that's the whole vibe. you don't call anything, you don't configure anything, you just use it and it's giving locked-in β¨
and then β if your constructor gets called with an attribute argument that your class does not declare? it dies. like, immediately. no chill, no mercy, just death π
and honestly? that's a feature. it's a great way to catch small typos π like bestie you typed nmae instead of name and now your object is silently broken for three hours. not anymore. the constructor said "we don't do that here" and ended it. main character energy honestly π
π BUGS π
all complex software has bugs lurking in it, and this module is no exception π₯² like every icon has a hater, every codebase has a bug.
if you find a bug, please either email me, or add the bug to cpan-RT. that's it, that's the ask π«Ά
πΈ SEE ALSO πΈ
- Mouse
- Moose
- MooseX::StrictConstructor
π AUTHOR π
Fuji, Goro (gfx) <gfuji(at)cpan.org>
π COPYRIGHT AND LICENSE π
Copyright (c) 2010, Fuji, Goro (gfx). All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
k bye bestie, go forth and make your constructors strict π
this was the User Contributed Perl Documentation page for MouseX::StrictConstructor, chillin' under perl v5.36.0 and dated 2022-12-11 πβ¨
π¦ where this page comes from
- debian bookworm: libmousex-strictconstructor-perl 0.02-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmousex-strictconstructor-perl 0.02-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmousex-strictconstructor-perl 0.02-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmousex-strictconstructor-perl 0.02-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmousex-strictconstructor-perl 0.02-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