From 7bb7288a5489b6264680a81d4c5ab31a0ceeea72 Mon Sep 17 00:00:00 2001 From: doy Date: Sat, 6 Dec 2008 20:23:00 -0500 Subject: use ! as the prefix for negated matching rather than not_, since it's possible to have methods named 'not_foo' --- lib/MooseX/Role/Matcher.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/MooseX') 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}; -- cgit v1.2.3-54-g00ecf