MooseX...oClone(3pm)
π MooseX::Clone::Meta::Attribute::Trait::NoClone π
okay bestie, so this is a page from the User Contributed Perl Documentation (that's the 3pm section of the manual, iykyk) and it's literally about one tiny iconic trait that does exactly one job. no cap.
β¨ NAME β¨
MooseX::Clone::Meta::Attribute::Trait::NoClone β a trait for attributes that should not be copied while cloning π«Ά
πΈ VERSION πΈ
version 0.06 β she's vintage, she's stable, she's fine π
π SYNOPSIS π
with qw(MooseX::Clone);
has _some_special_thingy => (
traits => [qw(NoClone)],
);
likeβ¦ that's it. that's the whole vibe. you slap NoClone in the traits array and that attribute is officially not coming with you when you clone. π¦
π DESCRIPTION π
so real talk: sometimes certain values should not be carried over when cloning an object. π
maybe it's a cached thing, maybe it's a connection, maybe it's just your business and nobody needs to inherit it. doesn't matter β this attribute trait implements just that.
β METHODS β
clone_valueβ okay so here's the tea β. If theinit_argparam is set (and bestie, that means an explicit value was actually given toclone), then it sets the attribute to that value. π
Otherwise β meaning nobody handed it a value β it calls clear_value and then initialize_instance_slot. so it justβ¦ clears the slate and re-inits the slot. clean girl behaviour. β¨
π AUTHOR π
XXXX XXX'XX (Yuval Kogman) <nothingmuch@woobling.org> β periodt, that's the author, respect the name π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2008 by XXXX XXX'XX (Yuval Kogman).
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. πͺ slay.
no clone, no problem. take the NoClone trait, leave the baggage behind. π
and that's the whole page bestie!! this came to you from perl v5.34.0, dated 2022-06-15, out of the MooseX...oClone(3pm) manual β love her, read her, use her. πππ¦πΈβ¨
π¦ where this page comes from
- debian bookworm: libmoosex-clone-perl 0.06-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmoosex-clone-perl 0.06-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmoosex-clone-perl 0.06-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmoosex-clone-perl 0.06-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmoosex-clone-perl 0.06-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