X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperltootc.pod;h=ee0bd02f622ca92abc48df3626fffcccbc9d35fa;hb=78f9721bf0dc33981bedf125bcfa5c0c42b69eba;hp=85ae6fba0356277984b48b0a426ef2c77e960a4c;hpb=87275199ef473a0bd08ce6f46db30d4d432f4876;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perltootc.pod b/pod/perltootc.pod index 85ae6fb..ee0bd02 100644 --- a/pod/perltootc.pod +++ b/pod/perltootc.pod @@ -12,7 +12,7 @@ the class itself. Here are a few examples where class attributes might come in handy: -=over +=over 4 =item * @@ -184,7 +184,7 @@ to which beginning Perl programmers attempt to put symbolic references, we have much better approaches, like nested hashes or hashes of arrays. But there's nothing wrong with using symbolic references to manipulate something that is meaningful only from the perspective of the package -symbol symbol table, like method names or package variables. In other +symbol table, like method names or package variables. In other words, when you want to refer to the symbol table, use symbol references. Clustering all the class attributes in one place has several advantages. @@ -653,8 +653,8 @@ settings can then be used in constructors for initialization of a particular object. The class's eponymous hash can also be used to implement I. A translucent attribute is one that has a class-wide default. Each object can set its own value for the -attribute, in which case C<$object-Eattribute()> returns that value. -But if no value has been set, then C<$object-Eattribute()> returns +attribute, in which case C<< $object->attribute() >> returns that value. +But if no value has been set, then C<< $object->attribute() >> returns the class-wide default. We'll apply something of a copy-on-write approach to these translucent @@ -1294,8 +1294,8 @@ or the AutoLoader, because they alter the lexical scope in which the module's methods wind up getting compiled. The usual mealy-mouthed package-mungeing doubtless applies to setting -up names of object attributes. For example, C<$self-E{ObData1}> -should probably be C<$self-E{ __PACKAGE__ . "_ObData1" }>, but that +up names of object attributes. For example, C<< $self->{ObData1} >> +should probably be C<< $self->{ __PACKAGE__ . "_ObData1" } >>, but that would just confuse the examples. =head1 SEE ALSO