aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md17
1 files changed, 13 insertions, 4 deletions
diff --git a/README.md b/README.md
index 6b9c52b..94daa4c 100644
--- a/README.md
+++ b/README.md
@@ -23,7 +23,7 @@ use Config;
my $config = Config.new();
-# loading a simple configuration hash
+# load a simple configuration hash
$config.read({
keyOne => "value",
keyTwo => {
@@ -31,14 +31,23 @@ $config.read({
}
});
-# loading a configuration files
+# load a configuration files
$config.read("/etc/config.yaml");
-# retrieving a simple key
+# load a configuration file with a specific parser
+$config.read("/etc/config", "Config::Parser::ini");
+
+# retrieve a simple key
$config.get("keyOne");
-# retrieving a nested key
+# retrieve a nested key
$config.get("keyTwo.NestedKey");
+
+# write out the configuration file
+$config.write("/etc/config.yaml");
+
+# write out the configuration in another format
+$config.write("/etc/config.json", "Config::Parser::json");
```
### Available parsers