in reply to Anonymous array in object
With
and%fields = ( __mpp => [ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 ], )
... my $self = { %fields }; ...
you only copy the reference and not the array itself. So all objects use the same array, which is not what you want. Consider using Storable::dclone to copy the default structure.
|
|---|