diff options
author | Patrick Spek <p.spek@tyil.nl> | 2019-07-12 11:42:23 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2023-07-25 02:17:15 +0200 |
commit | 47621c2a8038ae2cef3c72edfc6007e793059480 (patch) | |
tree | 71faaedfa0772e1609eb12b7c5bf53d412c95a35 /lib/Config | |
parent | e6df07e3f419c616c9f699e61607cb6f2f0df955 (diff) |
Attempt to allow IO::Path for path based arguments
Diffstat (limited to 'lib/Config')
-rw-r--r-- | lib/Config/Parser/NULL.pm6 | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/Config/Parser/NULL.pm6 b/lib/Config/Parser/NULL.pm6 index 5113043..2352cfc 100644 --- a/lib/Config/Parser/NULL.pm6 +++ b/lib/Config/Parser/NULL.pm6 @@ -12,11 +12,16 @@ class Config::Parser::NULL is Config::Parser my %mock-config = (); #| Return the mock config, skipping the file entirely. - method read(Str $path --> Hash) + multi method read(Str $path --> Hash) { %mock-config; } + multi method read(IO::Path $path --> Hash) + { + %mock-config; + } + #| Set the mock config to return on read. method set-config(Hash $config) { @@ -24,7 +29,12 @@ class Config::Parser::NULL is Config::Parser } #| Return True, as if writing succeeded. - method write(Str $path, Hash $config --> Bool) + multi method write(Str $path, Hash $config --> Bool) + { + True; + } + + multi method write(IO::Path $path, Hash $config --> Bool) { True; } |