$info->{reader} = $attr->reader if $attr->has_reader;
$info->{accessor} = $attr->accessor if $attr->has_accessor;
}
+ $info->{'constructor key'} = $attr->init_arg
+ if $attr->has_init_arg && $attr->init_arg ne $attr_name;
if( defined(my $lazy = $attr->is_lazy) ){
$description .= 'lazy-building ';
$info->{reader} = $attr->reader if $attr->has_reader;
$info->{accessor} = $attr->accessor if $attr->has_accessor;
}
+ $info->{'constructor key'} = $attr->init_arg
+ if $attr->has_init_arg && $attr->init_arg ne $attr_name;
if( defined(my $lazy = $attr->is_lazy) ){
$description .= 'lazy-building ';
{
'info' => {
'reader' => 'attr7',
- 'writer' => '_attr7'
+ 'writer' => '_attr7',
+ 'constructor key' => '-attr7',
},
'name' => 'attr7',
'description' => 'Optional value'
has attr4 => (is => 'rw', isa => 'ArrayRef[Str]', required => 1);
has attr5 => (is => 'rw', isa => 'ArrayRef[Str]', required => 1, auto_deref => 1);
has attr6 => (is => 'rw', lazy_build => 1);
-has attr7 => (reader => 'attr7', writer => '_attr7');
+has attr7 => (reader => 'attr7', writer => '_attr7', init_arg => '-attr7');
sub foo {