Subject: | Nested, optional elements' defaults don't propagate upwards |
Nested elements defaults don't seem to trigger creation of the
containing item. For example, I expected
my $schema = {
foo => { type => 'nested',
optional => 1,
child => {
a => {
type => 'integer',
default => 3
},
}
}
};
$result = validate( {}, $schema );
to produce
{ foo => { a => 3 }}
instead it produces
{}