projects
/
gitmo/Mouse.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Fix for default in a constructor reported and tested by rjbs :)
[gitmo/Mouse.git]
/
lib
/
Mouse
/
Object.pm
diff --git
a/lib/Mouse/Object.pm
b/lib/Mouse/Object.pm
index
8c36df3
..
9921711
100644
(file)
--- a/
lib/Mouse/Object.pm
+++ b/
lib/Mouse/Object.pm
@@
-39,7
+39,7
@@
sub new {
my $value = $attribute->has_builder
? $instance->$builder
: ref($default) eq 'CODE'
- ? $default->()
+ ? $default->($instance)
: $default;
$attribute->verify_type_constraint($value)