diff options
Diffstat (limited to 'lib/Config.pm6')
-rw-r--r-- | lib/Config.pm6 | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Config.pm6 b/lib/Config.pm6 index 1a1deab..d0c1d93 100644 --- a/lib/Config.pm6 +++ b/lib/Config.pm6 @@ -124,11 +124,14 @@ class Config is Associative is export #| Load a configuration file from the given path. Optionally #| set a parser module name to use. If not set, Config will #| attempt to deduce the parser to use. - multi method read(Str $path, Str $parser = "") - { + multi method read( + Str $path, + Str $parser = "", + Bool :$skip-not-found = False + ) { Config::Exception::FileNotFoundException.new( path => $path - ).throw() unless $path.IO.f; + ).throw() unless ($path.IO.f || $skip-not-found); $!parser = self.get-parser($path, $parser); |