Minor fix to get Mo::has(handles => qr/.*/) working again

This commit is contained in:
Brian Fraser
2013-01-31 20:00:09 -03:00
parent 5b9932ca28
commit a814b0be64

View File

@@ -140,6 +140,8 @@ our %metadata_for;
}
my %export_for;
%Mo::Internal::Keyword = map { $_ => 1 } qw(has extends override);
sub Mo::import {
# Set warnings and strict for the caller.
warnings->import(qw(FATAL all));
@@ -351,7 +353,7 @@ sub _has_handles {
map { $_, $_ }
grep { $_ =~ $handles }
grep { !exists $Mo::Object::{$_} && $target_class->can($_) }
grep { $_ ne 'has' && $_ ne 'extends' }
grep { !$Mo::Internal::Keyword{$_} }
keys %{ _stash_for $target_class }
};
}