projects
/
gitmo/Mouse.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Moose compat: throw an error on $self->reader(value)
[gitmo/Mouse.git]
/
lib
/
Mouse
/
Attribute.pm
diff --git
a/lib/Mouse/Attribute.pm
b/lib/Mouse/Attribute.pm
index
1a971bf
..
b5dfb1d
100644
(file)
--- a/
lib/Mouse/Attribute.pm
+++ b/
lib/Mouse/Attribute.pm
@@
-78,6
+78,7
@@
sub generate_accessor {
$accessor .= '}';
}
else {
+ $accessor .= 'confess "Cannot assign a value to a read-only accessor" if @_;';
}
if ($attribute->is_lazy) {