in reply to Re: Object methods from hashy structures
in thread Object methods from hashy structures

Moose actually has a built in feature/shortcut for this.

package Foo; use Moose; has [qw( name age sex job )] => ( is => 'rw' );
This will create 4 attributes (name, age, sex, job) in your Foo class, all of which have the same options (is => 'rw').

-stvn