MooseX...t::Copy(3pm)

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

✨ NAME ✨

MooseX::Clone::Meta::Attribute::Trait::Copy β€” bestie, this is the trait that does simple copying of arrays and hashes for MooseX::Clone 🫢 (the manual page is titled MooseX...t::Copy(3pm) if you were squinting at the tab-completion, iykyk)


πŸ’– VERSION πŸ’–

This is version 0.06, no cap ✨


🌸 SYNOPSIS 🌸

Okay so literally all you do is this:

has foo => (
    isa => "ArrayRef",
    traits => [qw(Copy)],
);

That's it. That's the whole vibe. Slay πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea, bestie πŸ“ β€” there's a Clone trait, right, and Clone goes deep on almost anything. Like, everything. Full excavation. Every nested thing gets its own little copy.

This trait? Not that. This one does only one additional level of copying, and only for arrays and hashes. Just one level. One. Level. πŸ‘‘

And honestly? That's iconic of it. It's both simpler and faster when you don't actually need a real deep copy of the entire structure β€” and, per the docs, probably more correct too. Periodt πŸ’œ


🌈 AUTHOR 🌈

XXXX XXX'XX (Yuval Kogman) β€” hit them up at <nothingmuch@woobling.org> πŸ’Œ


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. So go off, fr fr πŸŽ€


πŸ’« cute little sign-off πŸ’«

This page came to you from perl v5.34.0, dated 2022-06-15, under the manual name MooseX...t::Copy(3pm) β€” and it was contributed by the lovely people in User Contributed Perl Documentation 🫢✨ bye bestie, go copy exactly one level of something πŸ¦‹

πŸ“¦ where this page comes from