Hi All,

Decided to ask this one of the list rather than #Moose.

Is there / should there be a *Moose::Meta::Role->rename_attribute* method?
It is easy to change the guts of an attribute using the *has "+"  *syntax,
but I have not found an official way to change the name of an attribute.   I
am wondering if Moose::Meta::Role should contain a rename_attribute method
that does something like the following:

        my ( $self, $old_name, $new_name ) = @_ ;

        my $attr = $self->meta->get_attribute( $old_name );
        $self->add_attribute( $new_name, $attr );
        $self->remove_attribute( $old_name );

Thoughts,

Chris

Reply via email to