MooX::BuildArgs(3pm)

πŸ“¦
version 0.08 Β· 4 versions
, in debian bookworm, ubuntu jammy

πŸ’– 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 with weak_ref set, the references will not be weakened within build_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::BuildArgsHooks
  • MooX::MethodProxyArgs
  • MooX::Rebuild
  • MooX::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