יובל קוג'מן (Yuval Kogman) > MooseX-Clone-0.05 > MooseX::Clone::Meta::Attribute::Trait::Copy

Download:
MooseX-Clone-0.05.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  1
View/Report Bugs
Source  

NAME ^

MooseX::Clone::Meta::Attribute::Trait::Copy - Simple copying of arrays and hashes for MooseX::Clone

SYNOPSIS ^

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

DESCRIPTION ^

Unlike the Clone trait, which does deep copying of almost anything, this trait will only do one additional level of copying of arrays and hashes.

This is both simpler and faster when you don't need a real deep copy of the entire structure, and probably more correct.

syntax highlighting: