Depends on the coders goal.
package DataTable; use Moose; has 'tablename' => (is => 'rw', isa => 'Str'); has 'columns' => (is => 'rw', isa => 'ArrayRef[Str]'); has 'indices' => (is => 'rw', isa => 'HashRef[Str]'); has 'datatypes' => (is => 'rw', isa => 'ArrayRef[Str]'); has 'lengths' => (is => 'rw', isa => 'ArrayRef[Int]'); has 'decimals' => (is => 'rw', isa => 'ArrayRef[Int]'); has 'signed' => (is => 'rw', isa => 'ArrayRef[Int]'); has 'allownull' => (is => 'rw', isa => 'ArrayRef[Int]'); has 'default' => (is => 'rw', isa => 'ArrayRef[Int]'); has 'usequote' => (is => 'rw', isa => 'ArrayRef[Int]'); 1;
Thats a lot of simplification right there. And I wouldn't be surprised to find that there might be a short cut to creating a bunch of attributes with the same definition.
In reply to Re^5: OO automatic accessor generation
by eric256
in thread OO automatic accessor generation
by Neighbour
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |