summaryrefslogtreecommitdiffstats
path: root/lib/MooseX/Role
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2008-12-06 20:23:00 -0500
committerdoy <doy@tozt.net>2008-12-06 20:23:00 -0500
commit7bb7288a5489b6264680a81d4c5ab31a0ceeea72 (patch)
tree69597ad9edf0b420852522726c3797f720574f7d /lib/MooseX/Role
parente72c5fd3a95e3babb5d4b30523c10b7678a0631d (diff)
downloadmoosex-role-matcher-7bb7288a5489b6264680a81d4c5ab31a0ceeea72.tar.gz
moosex-role-matcher-7bb7288a5489b6264680a81d4c5ab31a0ceeea72.zip
use ! as the prefix for negated matching rather than not_, since it's possible to have methods named 'not_foo'
Diffstat (limited to 'lib/MooseX/Role')
-rw-r--r--lib/MooseX/Role/Matcher.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/MooseX/Role/Matcher.pm b/lib/MooseX/Role/Matcher.pm
index 767bb1f..cdd9812 100644
--- a/lib/MooseX/Role/Matcher.pm
+++ b/lib/MooseX/Role/Matcher.pm
@@ -68,7 +68,7 @@ method match => sub {
# All the conditions must be true for true to be returned. Return
# immediately if a false condition is found.
for my $matcher (keys %args) {
- my ($invert, $name) = $matcher =~ /^(not_)?(.*)$/;
+ my ($invert, $name) = $matcher =~ /^(!)?(.*)$/;
my $value = $self->can($name) ? $self->$name : undef;
my $seek = $args{$matcher};