From: Marcel GrĂ¼nauer Date: Tue, 3 Feb 2009 23:02:37 +0000 (+0000) Subject: typo and style fixes for Moose::Manual documents X-Git-Tag: 0.67~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c5934de184d497d112deeace5b06ab4fe1032b45;p=gitmo%2FMoose.git typo and style fixes for Moose::Manual documents --- diff --git a/lib/Moose/Manual/Attributes.pod b/lib/Moose/Manual/Attributes.pod index 18f0f2e..85e7fa3 100644 --- a/lib/Moose/Manual/Attributes.pod +++ b/lib/Moose/Manual/Attributes.pod @@ -12,8 +12,8 @@ powerful class simply by declaring attributes. In fact, it's possible to have classes that consist solely of attribute declarations. An attribute is a property that every member of a class has. For -example, we might say that "every Person object has a first name and -last name". Attributes can be optional, so that we can say "some Person +example, we might say that "every C object has a first name and +last name". Attributes can be optional, so that we can say "some C objects have a social security number (and some don't)". At its simplest, an attribute can be thought of as a named value (as @@ -33,7 +33,7 @@ Use the C function to declare an attribute: has 'first_name' => ( is => 'rw' ); -This says that all person objects have an optional read-write +This says that all C objects have an optional read-write "first_name" attribute. =head2 Read-write Vs Read-only @@ -57,8 +57,9 @@ you declared your attribute as C then your accessor will be read-only. If you declared it read-write, you get a read-write accessor. Simple. -Given our Person example above, we now have a single C -accessor that can read or write a person object's first name. +Given our C example above, we now have a single C +accessor that can read or write a C object's C +attribute's value. If you want, you can also explicitly specify the method names to be used for reading and writing an attribute's value. This is @@ -101,7 +102,7 @@ you want to access this information, you must define clearer and predicate methods for an attribute. A predicate method tells you whether or not a given attribute is -currently set. Note an attribute can be explicitly set to undef or +currently set. Note an attribute can be explicitly set to C or some other false value, but the predicate will return true. The clearer method unsets the attribute. This is I the @@ -156,9 +157,9 @@ required, simply set the C option to true: ); There are a couple caveats worth mentioning in regards to what -required actually means. +"required" actually means. -Basically, all it says is that this attribute (name) must be provided +Basically, all it says is that this attribute (C) must be provided to the constructor. It does not say anything about its value, so it could be C. @@ -186,7 +187,7 @@ for the C option: ); If the size attribute is not provided to the constructor, then it ends -up being set to "medium": +up being set to C: my $person = Person->new(); $person->size; # medium diff --git a/lib/Moose/Manual/MooseX.pod b/lib/Moose/Manual/MooseX.pod index 30450dc..b444eb3 100644 --- a/lib/Moose/Manual/MooseX.pod +++ b/lib/Moose/Manual/MooseX.pod @@ -72,7 +72,7 @@ silently ignored. =head1 MooseX::Params::Validate We have high hopes for the future of C and -C. However, for now we recommend the decidely more +C. However, for now we recommend the decidedly more clunky (but also faster and simpler) C. This module lets you apply Moose types and coercions to any method arguments.