On 2017-11-22 13:33:12, LANCEW wrote:
Show quoted text> We tried to replicate this issue with a file containing:
>
> ---
>
> package Change;
> use Moose;
>
> has old => (is => 'ro');
> has new => (is => 'ro');
>
> package main;
>
> my $change = Change->new( old => 'Dave', new => 'Stevan', );
>
> print $change->old . ' -> ' . $change->new;
>
> ---
>
> This generates the following error:
>
> Cannot assign a value to a read-only accessor at reader Change::new
> (defined at Change.pl line 5) line 3
> Change::new('Change', 'old', 'Dave', 'new', 'Stevan') called
> at Change.pl line 9
>
> ---
>
> So does this suggest that this issue can be closed?
No, this is the same issue, I think. The attribute accessor has overridden the constructor so now this class effectively has no constructor.