On Sat, Jun 19, 2010 at 05:15:44PM +0300, Octavian Rasnita wrote: > Hi, > > Just as a curiosity, why the following syntax works: > > has $_ => (is => 'rw', isa => 'Str') for 'a' .. 'zz'; > > but the following one doesn't: > > has $_ => (is => 'rw', isa => 'Str') for 'a' .. 'zzz'; > > Is the number of attributes that can be defined limited? > > Thanks. > > Octavian
The second one will eventually do has 'has' => (is => 'rw', isa => 'Str') which installs a method called 'has', which overwrites the 'has' function for creating attributes. When it gets to has 'hat', it'll be calling the accessor that was just installed, not the Moose keyword. -doy
