diff options
author | Patrick Spek <p.spek@tyil.nl> | 2020-07-04 13:46:25 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2020-07-12 08:59:13 +0200 |
commit | bd3bc6769547e89dc5d3e255aa4babc2cc5ffe48 (patch) | |
tree | 974bf72d443dbf0d1bffea29793becee806b43bc /lib/Config/Parser.pm6 | |
parent | 2d0de9cc3f93f661044f20b55c6a03860e8a0de8 (diff) |
Overhaul Config to 3.0.0
Diffstat (limited to 'lib/Config/Parser.pm6')
-rw-r--r-- | lib/Config/Parser.pm6 | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/lib/Config/Parser.pm6 b/lib/Config/Parser.pm6 index d067513..5d0343b 100644 --- a/lib/Config/Parser.pm6 +++ b/lib/Config/Parser.pm6 @@ -1,26 +1,13 @@ #! /usr/bin/env false -use v6.c; +use v6.d; -use Config::Exception::UnimplementedMethodException; +unit class Config::Parser; -class Config::Parser -{ - #| Attempt to read the file at a given $path, and returns its - #| parsed contents as a Hash. - method read(Str $path --> Hash) - { - Config::Exception::UnimplementedMethodException.new( - method => "read" - ).throw(); - } +#| Attempt to read the file at a given $path, and returns its +#| parsed contents as a Hash. +method read(IO() $path --> Hash) { … } - #| Attempt to write the $config Hash at a given $path. Returns - #| True on success, False on failure. - method write(Str $path, Hash $config --> Bool) - { - Config::Exception::UnimplementedMethodException.new( - method => "write" - ).throw(); - } -} +#| Attempt to write the $config Hash at a given $path. Returns +#| True on success, False on failure. +method write(IO() $path, Hash $config --> Bool) { … } |