diff options
author | Patrick Spek <p.spek@tyil.nl> | 2017-07-29 03:04:34 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2017-07-29 03:04:34 +0200 |
commit | 7c4249285fb09530fb149659ffadb45ac948d602 (patch) | |
tree | 28adadd80d115c20096436ac87493fbe7b6fa1df | |
parent | cfe2b133a952945c24879118fc5f0aed16c3c0cf (diff) |
Update README back to use $ sigils
-rw-r--r-- | README.md | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -21,10 +21,10 @@ please. ```perl6 use Config; -my Config %config = Config.new(); +my Config $config = Config.new(); # Load a simple configuration hash -%config.read({ +$config.read({ keyOne => "value", keyTwo => { NestedKey => "other value" @@ -32,25 +32,25 @@ my Config %config = Config.new(); }); # Load a configuration files -%config.read("/etc/config.yaml"); +$config.read("/etc/config.yaml"); # Load a configuration file with a specific parser -%config.read("/etc/config", "Config::Parser::ini"); +$config.read("/etc/config", "Config::Parser::ini"); # Retrieve a simple key -%config.get("keyOne"); +$config.get("keyOne"); # As of v1.2.0, `Config` support associative indexing: -%config<keyOne>; +$config<keyOne>; # Retrieve a nested key -%config.get("keyTwo.NestedKey"); +$config.get("keyTwo.NestedKey"); # Write out the configuration file -%config.write("/etc/config.yaml"); +$config.write("/etc/config.yaml"); # Write out the configuration in another format -%config.write("/etc/config.json", "Config::Parser::json"); +$config.write("/etc/config.json", "Config::Parser::json"); ``` ### Available parsers |