switch recheck to using an on_completion_step
[scpubgit/DX.git] / lib / DX / Role / Value.pm
CommitLineData
9d759b64 1package DX::Role::Value;
2
3use DX::ActionBuilder::Null;
4use DX::Role;
5
efad53c4 6has identity_path => (is => 'ro');
7
9d759b64 8has action_builder => (
9 is => 'ro',
10 default => 'DX::ActionBuilder::Null',
11 handles => [ qw(can_set_value action_for_set_value) ],
12);
13
345270ac 14sub value_path { shift->action_builder->target_path }
15
9d759b64 16sub is_set { 1 }
17
efad53c4 18sub but_set_action_builder {
19 my ($self, $ab) = @_;
20 $self->but(action_builder => $ab);
21}
22
0498469a 23sub but_set_identity_path {
24 my ($self, $path) = @_;
25 $self->but(identity_path => $path);
26}
27
9e13b86b 28requires 'to_data';
29
30sub equals {
31 my ($self, $other) = @_;
32 require YAML;
33 YAML::Dump($self->to_data) eq YAML::Dump($other->to_data);
34}
35
9d759b64 361;