P is for Practical | |
PerlMonks |
Re: Array vs. Hash for sparsely integer-indexed databy tobyink (Canon) |
on Jan 25, 2013 at 22:49 UTC ( [id://1015424]=note: print w/replies, xml ) | Need Help?? |
You could tie an array to a hashref for storage. This would be lovely in terms of memory usage, but not especially performant.
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
In Section
Seekers of Perl Wisdom
|
|