Skip Menu |

This queue is for tickets about the Config-Validate CPAN distribution.

Report information
The Basics
Id: 33525
Status: open
Priority: 0/
Queue: Config-Validate

People
Owner: Nobody in particular
Requestors: djerius [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.2.6



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 {}
From: keksinat0r [...] keksinat0r.org
On Fri Feb 22 20:04:16 2008, DJERIUS wrote: Show quoted text
> 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 > > {}
According to the bug information, this bug is solved in 0.2.6, but I got 0.2.6 here and this bug still persists?! md5: c07548582d33953b37b35229e33a0a82