Reusing data with YAML Anchors, Aliases and Merge Keys
I just added a feature called "Merge Keys" to YAML::PP. No Perl YAML module supports this so far. You can merge mappings defined elsewhere in your YAML document into other mappings with that. Here is a short example:
---
defaults: &defaults
A: 1
B: 2
mapping:
<< : *defaults
A: 23
C: 99
# same as:
mapping:
B: 2
A: 23
C: 99
If you don't know the &defaults/*defaults
notation, here follows a basic
introduction before I explain the merge keys.