ianwinter has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/env perl use Data::Dumper; use YAML::XS; my $config = LoadFile('config.yml')->{'production'}; print Dumper($config);
I'd also ideally like to be able to override the defaults. If my block looks like this:defaults: &defaults src: host: localhost database: db username: root password: nfs: /tmp development: <<: *defaults test: <<: *defaults production: <<: *defaults nfs: ian
All is well and fine. Any tips gratefully received, the alias stuff comes from a ruby background.production: src: host: localhost database: db username: root password: nfs: /tmp
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: YAML Alias (xml)
by Anonymous Monk on Apr 21, 2015 at 23:17 UTC |