Sam Vilain <[EMAIL PROTECTED]> writes: > Larry Wall wrote: > > > Users of the class includes people subclassing the class, so to them > > > they need to be able to use $.month_0 and $.month, even though there > > > is no "has $.month_0" declared in the Class implementation, only > > > "has $.month". >> We thought about defining the attribute variables that way, >> but decided that it would be clearer if they only ever refer to >> real attributes declared in the current class. > > Clearer in what way? > > This implies that you cannot; > > - refactor classes into class heirarchies without performing > code review of all methods in the class and included roles.
That's why it's generally a bad idea to use the C<$.whatever> forms outside your basic accessor methods. > - "wrap" internal attribute access of a superclass in a subclass Which is why it's generally a bad idea to use the C<$.whatever> forms outside your basic accessor methods. > This in turn implies that the $.foo syntax is, in general, bad > practice! Yup.