aboutsummaryrefslogtreecommitdiff
path: root/lib/Config.pm6
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Config.pm6')
-rw-r--r--lib/Config.pm67
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Config.pm6 b/lib/Config.pm6
index 61cc3a1..f0a75c3 100644
--- a/lib/Config.pm6
+++ b/lib/Config.pm6
@@ -28,6 +28,13 @@ class Config is export
return $!content;
}
+ #| Fallback method in case the key is Nil. Will always return the default
+ #| value.
+ multi method get(Nil $key, Any $default = Nil)
+ {
+ $default;
+ }
+
#| Get a value from the config object. To get a nested
#| key, use a . to descent a level.
multi method get(Str $key, Any $default = Nil)