[Moose-commits] r7690 - Moose/trunk/lib/Moose/Manual
autarch at code2.0beta.co.uk
autarch at code2.0beta.co.uk
Sat Feb 14 17:58:42 GMT 2009
Author: autarch
Date: 2009-02-14 09:58:41 -0800 (Sat, 14 Feb 2009)
New Revision: 7690
Modified:
Moose/trunk/lib/Moose/Manual/Types.pod
Log:
Make more attribute 'ro' in the example code
Modified: Moose/trunk/lib/Moose/Manual/Types.pod
===================================================================
--- Moose/trunk/lib/Moose/Manual/Types.pod 2009-02-14 17:57:40 UTC (rev 7689)
+++ Moose/trunk/lib/Moose/Manual/Types.pod 2009-02-14 17:58:41 UTC (rev 7690)
@@ -92,7 +92,7 @@
Now you can use C<'MyApp::User'> as a type name:
has creator => (
- is => 'rw',
+ is => 'ro',
isa => 'MyApp::User',
);
@@ -102,7 +102,7 @@
attribute is a class. So this works:
has 'birth_date' => (
- is => 'rw',
+ is => 'ro',
isa => 'DateTime',
);
@@ -213,7 +213,7 @@
package Foo;
has 'sizes' => (
- is => 'rw',
+ is => 'ro',
isa => 'ArrayRefOfInts',
coerce => 1,
);
@@ -237,7 +237,7 @@
=> via { hex $_ };
has 'sizes' => (
- is => 'rw',
+ is => 'ro',
isa => 'ArrayRef[Int]',
coerce => 1,
);
@@ -307,7 +307,7 @@
use Moose;
has 'handle' => (
- is => 'ro',
+ is => 'rw',
isa => 'FileHandle',
);
@@ -354,7 +354,7 @@
type, or as the value for an attribute's C<isa> option:
has 'size' => (
- is => 'rw',
+ is => 'ro',
isa => subtype 'Int' => where { $_ > 0 },
);
More information about the Moose-commits
mailing list