On Tue, 29 Mar 2016 07:24:35 GMT, SREZIC wrote:
Show quoted text> For the common case (i.e. indexing starts at zero and there are no
> "holes") it would be nice if there is a shorter accessor declaration
> without the need to specify the indexes. For example, the example from
> Class-Accessor-Array's synopsis could be written as:
>
> package Your::Class;
> use Class::Accessor::Array {
> accessors => [qw(foo bar)],
> };
Agreed. However...
I plan to be reasonably compatible with Class::XSAccessor::Array. Aside from attributes, CXA also has getters, setters, predicates, lvalue_accessors, and perhaps I want to support them too someday. How would you reconcile cases like:
package Your::Class;
use Class::Accessor::Array {
accessors => [qw(foo bar)],
getters => [qw(one two)],
};
BTW, this special form is even shorter:
package Your::Class;
use Class::Accessor::Array ['foo', 'bar'];
or perhaps:
package Your::Class;
use Class::Accessor::Array 'foo', 'bar';
I don't know which ones to support yet. The Class::Accessor modules "family" are sort of compatible with one another but there are enough incompatibilities among them.