diff options
author | Olivier Mengué <dolmen@cpan.org> | 2016-03-30 23:22:55 +0200 |
---|---|---|
committer | Olivier Mengué <dolmen@cpan.org> | 2016-03-30 23:22:55 +0200 |
commit | accdae76a26f699f093f02e6591df8b3ab99042f (patch) | |
tree | d861fa53add22b2cf538e1d028129c2e99d9d9ab | |
parent | e18489a1f13ca6ee9adfe9791a0a05e90feafb0f (diff) | |
download | eval-closure-accdae76a26f699f093f02e6591df8b3ab99042f.tar.gz eval-closure-accdae76a26f699f093f02e6591df8b3ab99042f.zip |
Use index() instead of regexp
-rw-r--r-- | lib/Eval/Closure.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Eval/Closure.pm b/lib/Eval/Closure.pm index 868e4a8..8f5da16 100644 --- a/lib/Eval/Closure.pm +++ b/lib/Eval/Closure.pm @@ -214,7 +214,7 @@ sub _clean_eval_closure { if ($alias) { require Devel::LexAlias; Devel::LexAlias::lexalias($code, $_, $captures->{$_}) - for grep !/^\&/, keys %$captures; + for grep index($_, '&')==-1, keys %$captures; } return ($code, $e); |