diff options
author | franck cuny <franck.cuny@gmail.com> | 2012-01-02 15:12:21 -0800 |
---|---|---|
committer | franck cuny <franck.cuny@gmail.com> | 2012-01-02 15:26:55 -0800 |
commit | 84acaa54e6cd6447568e2c0d67906116926635c8 (patch) | |
tree | 00176a57db63efa025e5437b34f2dd69632d547b | |
parent | pod fix (diff) | |
download | net-http-spore-84acaa54e6cd6447568e2c0d67906116926635c8.tar.gz |
use eq and ne instead of a regex
-rwxr-xr-x[-rw-r--r--] | lib/Net/HTTP/Spore/Meta/Method/Spore.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Net/HTTP/Spore/Meta/Method/Spore.pm b/lib/Net/HTTP/Spore/Meta/Method/Spore.pm index 9ebe5f0..b046b04 100644..100755 --- a/lib/Net/HTTP/Spore/Meta/Method/Spore.pm +++ b/lib/Net/HTTP/Spore/Meta/Method/Spore.pm @@ -37,14 +37,14 @@ sub find_spore_method_by_name { sub remove_spore_method { my ($meta, $name) = @_; - my @methods = grep { !/$name/ } $meta->get_all_spore_methods; + my @methods = grep { $_ ne $name } $meta->get_all_spore_methods; $meta->local_spore_methods(\@methods); $meta->remove_method($name); } before add_spore_method => sub { my ($meta, $name) = @_; - if ($meta->_find_spore_method_by_name(sub {/^$name$/})) { + if ($meta->_find_spore_method_by_name(sub {$_ eq $name})) { confess "method '$name' is already delcared in ".$meta->name; } }; |