remove vestigial method
[scpubgit/DX.git] / lib / DX / Predicate / Dict.pm
CommitLineData
9fd6087b 1package DX::Predicate::Dict;
efad53c4 2
3use DX::Utils qw(step dict TYPE_OF);
4use DX::Class;
5
6with 'DX::Role::Predicate';
7
8sub _possible_resolution_list {
9fd6087b 9 my ($self, $arg, $proto) = @_;
efad53c4 10 if ($arg->is_set) {
9fd6087b 11 die "dict called with non-dict"
efad53c4 12 unless $arg->isa('DX::Value::Dict');
13 return step(
14 actions => [],
8c6c9551 15 depends_on => [ [ TYPE_OF ,=> $arg ] ]
efad53c4 16 );
17 }
9fd6087b 18 if ($proto and not $proto->isa('DX::Value::Dict')) {
19 die "dict called with non-dict prototype";
20 }
21 my $set = $arg->action_for_set_value($proto||dict());
efad53c4 22 return step(
23 actions => [ $set ],
8c6c9551 24 depends_on => [ [ TYPE_OF ,=> $arg ] ]
efad53c4 25 );
26}
27
281;