projects
/
gitmo/Mouse.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
make auto_deref also handles isa not only ArrayRef and HashRef, but also ArrayRef...
[gitmo/Mouse.git]
/
lib
/
Mouse
/
Meta
/
Method
/
Accessor.pm
diff --git
a/lib/Mouse/Meta/Method/Accessor.pm
b/lib/Mouse/Meta/Method/Accessor.pm
index
af49197
..
38531bc
100644
(file)
--- a/
lib/Mouse/Meta/Method/Accessor.pm
+++ b/
lib/Mouse/Meta/Method/Accessor.pm
@@
-88,7
+88,7
@@
sub generate_accessor_method_inline {
}
if ($should_deref) {
- if (ref($constraint) && $constraint->name eq 'ArrayRef') {
+ if (ref($constraint) && $constraint->name =~ '^ArrayRef\b') {
$accessor .= 'if (wantarray) {
return @{ '.$self.'->{'.$key.'} || [] };
}';