diff options
Diffstat (limited to 'lib/Config.pm6')
-rw-r--r-- | lib/Config.pm6 | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Config.pm6 b/lib/Config.pm6 index 78dca0a..0fecadf 100644 --- a/lib/Config.pm6 +++ b/lib/Config.pm6 @@ -10,8 +10,8 @@ use Hash::Merge; unit class Config is Associative; has Hash $!content = {}; -has Str $!path = ""; -has Str $!parser = ""; +has Str $.path = ""; +has Str $.parser = ""; #| Clear the config. method clear() @@ -21,6 +21,12 @@ method clear() $!parser = ""; } +method clone ( + --> Config +) { + Config.new(:$!path, :$!parser).read: $!content; +} + #| Return the entire config hash. multi method get() { |