projects
/
gitmo/Mouse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
f411847
)
Make ScalarRef accept ref to ref in pure perl type constraints
Fuji, Goro [Sat, 25 Sep 2010 04:22:24 +0000 (13:22 +0900)]
lib/Mouse/PurePerl.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Mouse/PurePerl.pm
b/lib/Mouse/PurePerl.pm
index
5e136c9
..
23b89a9
100644
(file)
--- a/
lib/Mouse/PurePerl.pm
+++ b/
lib/Mouse/PurePerl.pm
@@
-156,7
+156,7
@@
sub Str {
sub Ref { ref($_[0]) }
sub ScalarRef {
my($value) = @_;
- return ref($value) eq 'SCALAR'
+ return ref($value) eq 'SCALAR' || ref($value) eq 'REF';
}
sub ArrayRef { ref($_[0]) eq 'ARRAY' }
sub HashRef { ref($_[0]) eq 'HASH' }