sub generate_handles {
my $attribute = shift;
my $reader = $attribute->name;
+ my %handles = $attribute->_canonicalize_handles($attribute->handles);
my %method_map;
- for my $local_method (keys %{ $attribute->handles }) {
- my $remote_method = $attribute->handles->{$local_method};
+ for my $local_method (keys %handles) {
+ my $remote_method = $handles{$local_method};
my $method = 'sub {
my $self = shift;
if ref($args{default})
&& ref($args{default}) ne 'CODE';
- $args{handles} = { $self->_canonicalize_handles($args{handles}) }
- if $args{handles};
-
$args{type_constraint} = delete $args{isa}
if exists $args{isa};
is_deeply(
$object->meta->get_attribute('me')->handles,
- { name => 'name', age => 'age' },
+ [ 'name', 'age' ],
"correct handles layout for 'me'",
);