diff options
author | Patrick Spek <p.spek@tyil.nl> | 2017-04-23 21:38:48 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2017-04-23 21:38:48 +0200 |
commit | a1fdf43e36789e876fcb53b956d73c6e40ef2aa9 (patch) | |
tree | da8ef68a1df44012a25b41df1078253935af2f80 /lib/Config.pm6 | |
parent | db1db93e6b3bb7369234d55a2e514f2934dd8d09 (diff) |
Remove $_ in favor of a named var
Diffstat (limited to 'lib/Config.pm6')
-rw-r--r-- | lib/Config.pm6 | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Config.pm6 b/lib/Config.pm6 index f7abe4e..729ccba 100644 --- a/lib/Config.pm6 +++ b/lib/Config.pm6 @@ -48,10 +48,10 @@ class Config is export { my $index = $!content; - for $key.split(".") { - return $default unless defined($index{$_}); + for $key.split(".") -> $part { + return $default unless defined($index{$part}); - $index = $index{$_}; + $index = $index{$part}; } $index; @@ -60,10 +60,10 @@ class Config is export method has(Str $key) { my $index = $!content; - for $key.split(".") { - return False unless defined($index{$_}); + for $key.split(".") -> $part { + return False unless defined($index{$part}); - $index = $index{$_}; + $index = $index{$part}; } True; @@ -73,10 +73,10 @@ class Config is export { my $index := $!content; - for $key.split(".") { - $index{$_} = {} unless defined($index{$_}); + for $key.split(".") -> $part { + $index{$part} = {} unless defined($index{$part}); - $index := $index{$_}; + $index := $index{$part}; } $index = $value; |