On 5 Aug 2007, at 17:07, Fergal Daly wrote:
use Test::More no_plan; use Test::Deep;
Lovely, thanks :)
my $expect = { name => re(qr/porky/),value => code(sub { $_[0] >= 0 && $_[0] < 10 || (0, "out of range [0,10)")}),spigot_state => 'active', }; my $value = { name => 'My name is porky', value => 11, # <-- fails here spigot_state => 'active', }; cmp_deeply( $value, $expect, 'Whoopee!'); although it looks like I have a bug in the diagnostic output, it shows undef instead of 11,
Oops. Want me to file a ticket? :) Thanks for that Fergal - using it now. -- Andy Armstrong, hexten.net
