Document this new default
[gitmo/MooseX-Role-Parameterized.git] / lib / MooseX / Role / Parameterized / Tutorial.pm
index 1163a49..5aba03b 100644 (file)
@@ -47,15 +47,14 @@ exactly like specifying the attributes of a class. Instead of C<has> you use
 the keyword C<parameter>, but your parameters can use any options to C<has>.
 
     parameter 'delegation' => (
-        is        => 'ro',
         isa       => 'HashRef|ArrayRef|RegexpRef',
         predicate => 'has_delegation',
     );
 
 Behind the scenes, C<parameter> uses C<has> to add attributes to a parameter
-class. The arguments to C<with> are used to construct a parameter object, which
-has the attributes specified by calls to C<parameter>. The parameter object is
-then passed to...
+class (except the "is" option defaults to "ro" for convenience). The arguments
+to C<with> are used to construct a parameter object, which has the attributes
+specified by calls to C<parameter>. The parameter object is then passed to...
 
 =head3 C<role>
 
@@ -89,7 +88,6 @@ You can rename methods with core Moose, but now you can rename attributes. You
 can now also choose type, default value, whether it's required, B<traits>, etc.
 
     parameter traits => (
-        is      => 'ro',
         isa     => 'ArrayRef[Str]',
         default => sub { [] },
     );
@@ -106,7 +104,6 @@ require that you specify a method name you wish the role to instrument, or
 which attributes to dump to a file.
 
     parameter instrument_method => (
-        is       => 'ro',
         isa      => 'Str',
         required => 1,
     );
@@ -120,7 +117,6 @@ operate. For example, you can tell the role whether to save intermediate
 states.
 
     parameter save_intermediate => (
-        is      => 'ro',
         isa     => 'Bool',
         default => 0,
     );
@@ -137,8 +133,7 @@ Your role may be able to freeze and thaw your instances using L<YAML>, L<JSON>,
 L<Storable>. Which backend to use can be a parameter.
 
     parameter format => (
-        is => 'ro',
-        isa => (enum ['Storable', 'YAML', 'JSON']),
+        isa     => (enum ['Storable', 'YAML', 'JSON']),
         default => 'Storable',
     );