In Moose, if you want a data structure as a default you must use a code ref.
has list =>
default => sub { [] };
This incurs an object construction penalty for calling that code ref. This is to ensure each object gets its own reference, not the same one over and over again. Because Mite is compiled, we may be able to get around this.
has list =>
default => [];
Use Data::Dump::Streamer to dump reference defaults (except code refs) and add them to the constructor at compile time.
In Moose, if you want a data structure as a default you must use a code ref.
This incurs an object construction penalty for calling that code ref. This is to ensure each object gets its own reference, not the same one over and over again. Because Mite is compiled, we may be able to get around this.
Use Data::Dump::Streamer to dump reference defaults (except code refs) and add them to the constructor at compile time.