MooX::BuildArgs(3pm)
π MooX::BuildArgs π
okay so bestie, welcome to MooX::BuildArgs β a lil Perl thing from the User Contributed Perl Documentation collection (yes, that's the 3pm manual section, we love her). she's here to save your instantiation arguments for later use, no cap. π
β¨ NAME β¨
MooX::BuildArgs β Save instantiation arguments for later use. literally that's the whole job and she ate. π
πΈ SYNOPSIS πΈ
package Foo;
use Moo;
with 'MooX::BuildArgs';
has bar => (is => 'ro');
my $foo = Foo->new( bar => 32 );
print $foo->build_args->{bar}; # 32
see how clean that is?? you with the role, you make your object, and then the args you passed in are just... there. sitting pretty in build_args. iconic behavior fr fr. π¦
π DESCRIPTION π
okay so here's the vibe. sometimes you really need to get back at the arguments that were used to create an object, and you need them in their unadulterated form β like, before any coercions or init_args got their hands on them and changed stuff. this Moo role hands you exactly that, via the build_args attribute. periodt. β¨
β οΈ bestie listen. no attempt is made to weaken the args. so if you use this module and you have attributes withweak_refset, the references will not be weakened withinbuild_args. that's just how it is, i don't make the rules. π
π ATTRIBUTES π
build_args
my $args_hashref = $object->build_args();
Returns a hashref containing the captured arguments. that's it, that's the attribute. short queen, we stan. π
π₯ SEE ALSO π₯
go give these siblings some love, they're all part of the family:
MooX::BuildArgsHooksMooX::MethodProxyArgsMooX::RebuildMooX::SingleArg
iykyk π
π«Ά SUPPORT π«Ά
found a bug? got a feature request? pls pls pls don't suffer in silence β submit bugs and feature requests to the MooX-BuildArgs GitHub issue tracker:
<https://github.com/bluefeet/MooX-BuildArgs/issues>
the maintainers will literally be so happy to hear from you. π
π AUTHORS π
the main characters responsible for this masterpiece:
Aran Clary Deltac <bluefeet@gmail.com>
Peter Pentchev <roam@ringlet.net>
Mohammad S Anwar <mohammad.anwar@yahoo.com>
thank you for your service besties π«‘π
β LICENSE β
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. so go forth and remix, gorgeous. π
okay that's the whole page!! and a lil cute sign-off for you: this gem is documented for perl v5.30.3, dated 2020-09-12, and she is MooX::BuildArgs(3pm) forever and always. mwah ππΈβ¨
π¦ where this page comes from
- debian bookworm: libmoox-buildargs-perl 0.08-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libmoox-buildargs-perl 0.08-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