MooseX...::Trait(3pm)

πŸ“¦
version 0.02 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

MooseX::MultiInitArg::Trait β€” a composable role that lets you give your attributes multiple init arguments, bestie πŸ’–

(it lives in the MooseX...::Trait(3pm) section of the User Contributed Perl Documentation, iykyk)


🌸 DESCRIPTION 🌸

Okay so picture this: you've got an attribute, and you want it to be reachable from the constructor under, like, a whole list of names. Not one. A list. Aliases. A little squad of names all pointing at the same attribute 🫢

That's literally what this is. It's a composable trait β€” meaning you just add it onto an attribute β€” and once it's there, you can specify a list of aliases, and every one of those aliases gets recognized as a constructor argument for that attribute. No cap. πŸ’…

Composable. Trait. Attribute. Aliases. Constructor arguments. That's the whole vibe. ✨


πŸ‘‘ AUTHOR πŸ‘‘

Paul Driver, <frodwith at cpan.org> β€” iconic, we love them 🌈


Copyright 2007-2008 by Paul Driver. Periodt.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. πŸͺπŸ’œ


fr fr, that's the whole page. Go forth and alias your init args, main character πŸ’…βœ¨

πŸ’– MooseX...::Trait(3pm) Β· perl v5.34.0 Β· 2022-06-15 Β· mwah, stan πŸ¦‹ πŸŽ€ ⭐ πŸ’€

πŸ“¦ where this page comes from