projects
/
gitmo/Class-MOP.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Add back rafl and rhesa's original changes and tweak them for steven's okay for defau...
[gitmo/Class-MOP.git]
/
lib
/
Class
/
MOP
/
Attribute.pm
diff --git
a/lib/Class/MOP/Attribute.pm
b/lib/Class/MOP/Attribute.pm
index
aba370d
..
37dc2f9
100644
(file)
--- a/
lib/Class/MOP/Attribute.pm
+++ b/
lib/Class/MOP/Attribute.pm
@@
-248,7
+248,9
@@
sub get_write_method_ref {
}
sub is_default_a_coderef {
- ('CODE' eq ref($_[0]->{'default'}))
+ my ($value) = $_[0]->{'default'};
+ return unless ref($value);
+ return ref($value) eq 'CODE' || (blessed($value) && $value->isa('Class::MOP::Method'));
}
sub default {