diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-10-17 16:54:39 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-10-17 16:54:39 +0000 |
commit | 5f7566456ef3a657f9ba8882692b7a61467dff07 (patch) | |
tree | 848962bb8752a66ecf8d45e4bfb26eb3f9343495 /proxy_wizard | |
parent | 2098a594926838adea5c490dbdb72970620f73e5 (diff) | |
download | drakwizard-5f7566456ef3a657f9ba8882692b7a61467dff07.tar drakwizard-5f7566456ef3a657f9ba8882692b7a61467dff07.tar.gz drakwizard-5f7566456ef3a657f9ba8882692b7a61467dff07.tar.bz2 drakwizard-5f7566456ef3a657f9ba8882692b7a61467dff07.tar.xz drakwizard-5f7566456ef3a657f9ba8882692b7a61467dff07.zip |
do not reinvent find()
Diffstat (limited to 'proxy_wizard')
-rwxr-xr-x | proxy_wizard/Squid.pm | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/proxy_wizard/Squid.pm b/proxy_wizard/Squid.pm index ff9559e2..e938d2d3 100755 --- a/proxy_wizard/Squid.pm +++ b/proxy_wizard/Squid.pm @@ -262,13 +262,7 @@ level = $o->{var}{wiz_squid_level}"); } else { # should not happen die "wiz_squid_level error"; } - my $t = 0; - foreach (cat_($file)) { - if (/^\s*cache_peer/) { - $t = $_; - last; - } - } + my $t = find { /^\s*cache_peer/ } cat_($file); if ($o->{var}{wiz_squid_menupeer} == 1 && length $t) { substInFile { s|^\s*!#\s*(cache_peer.*)|#$&|; |