summary refs log tree commit diff
diff options
context:
space:
mode:
authorfranck cuny <franck.cuny@gmail.com>2012-01-02 15:12:21 -0800
committerfranck cuny <franck.cuny@gmail.com>2012-01-02 15:12:21 -0800
commitd41d8b640be7a0a364fefd30355081df69cc5cf0 (patch)
treec294be39835dde97f6167eaa03a0adc8568d216c
parentupdate POD for some middlewares (diff)
downloadnet-http-spore-d41d8b640be7a0a364fefd30355081df69cc5cf0.tar.gz
use eq and ne instead of a regex
-rwxr-xr-x[-rw-r--r--]lib/Net/HTTP/Spore/Meta/Method/Spore.pm4
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;
     }
 };