Moose actually has a built in feature/shortcut for this.
This will create 4 attributes (name, age, sex, job) in your Foo class, all of which have the same options (is => 'rw').package Foo; use Moose; has [qw( name age sex job )] => ( is => 'rw' );
In reply to Re^2: Object methods from hashy structures
by stvn
in thread Object methods from hashy structures
by jfrm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |