1 package DX::Predicate::Dict;
3 use DX::Utils qw(rspace res dict TYPE_OF);
6 with 'DX::Role::Predicate';
8 sub _resolution_space_for {
9 my ($self, $arg, $proto) = @_;
11 die "dict called with non-dict"
12 if $arg->is_set and not $arg->isa('DX::Value::Dict');
14 die "dict called with non-dict prototype"
15 if $proto and not $proto->isa('DX::Value::Dict');
17 my $deps = [ [ TYPE_OF ,=> $arg ] ];
20 $arg->is_set ? [] : [ $arg->action_for_set_value($proto||dict()) ];
23 geometry_depends_on => $deps,
24 aperture => $arg->aperture_for_set_value,
27 veracity_depends_on => $deps