Skip to content
This repository has been archived by the owner on Jan 22, 2019. It is now read-only.

Commit

Permalink
use eq and ne instead of a regex
Browse files Browse the repository at this point in the history
  • Loading branch information
fcuny committed Jan 2, 2012
1 parent e64fe95 commit d41d8b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Net/HTTP/Spore/Meta/Method/Spore.pm
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
};
Expand Down

0 comments on commit d41d8b6

Please sign in to comment.