Skip to content

Commit

Permalink
Extend the examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyil committed Apr 24, 2017
1 parent 10c2bd5 commit ede6b8c
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions README.md
Expand Up @@ -23,22 +23,31 @@ use Config;

my $config = Config.new();

# loading a simple configuration hash
# load a simple configuration hash
$config.read({
keyOne => "value",
keyTwo => {
NestedKey => "other value"
}
});

# 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
Expand Down

0 comments on commit ede6b8c

Please sign in to comment.