This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #29230] Class::Struct, accessor overrides not called from constructor
Class::Struct allows you to override the accessors it creates, but it
doesn't call them in its constructor.
In other words,
$struct->field('blah');
calls my override, but
$struct = structure->new('field' => 'blah');
doesn't. Class::Struct simply does
$r->{'field'} = $init{'field'}
but it would be more useful if it did
$r->field($init{'field'})