provide and preserve aperture information
[scpubgit/DX.git] / lib / DX / Role / Value.pm
CommitLineData
9d759b64 1package DX::Role::Value;
2
3use DX::ActionBuilder::Null;
4use DX::Role;
5
6has action_builder => (
7 is => 'ro',
8 default => 'DX::ActionBuilder::Null',
6aa36401 9 handles => [ qw(can_set_value aperture_for_set_value action_for_set_value) ],
9d759b64 10);
11
345270ac 12sub value_path { shift->action_builder->target_path }
13
9d759b64 14sub is_set { 1 }
15
efad53c4 16sub but_set_action_builder {
17 my ($self, $ab) = @_;
18 $self->but(action_builder => $ab);
19}
20
9e13b86b 21requires 'to_data';
22
23sub equals {
24 my ($self, $other) = @_;
25 require YAML;
26 YAML::Dump($self->to_data) eq YAML::Dump($other->to_data);
27}
28
9d759b64 291;