MooseX::Clone::Meta::Attribute::Trait::NoClone - A trait for attrs that should


MooseX-Clone documentation  | view source Contained in the MooseX-Clone distribution.

Index


NAME

Top

MooseX::Clone::Meta::Attribute::Trait::NoClone - A trait for attrs that should not be copied while cloning.

SYNOPSIS

Top

    with qw(MooseX::Clone);

    has _some_special_thingy => (
        traits => [qw(NoClone)],
    );

DESCRIPTION

Top

Sometimes certain values should not be carried over when cloning an object.

This attribute trait implements just that.

METHODS

Top

clone_value

If the init_arg param is set (that means an explicit value was given to clone) sets the attribute to that value.

Otherwise calls clear_value and initialize_instance_slot.


MooseX-Clone documentation  | view source Contained in the MooseX-Clone distribution.