pervasive type constraints
[scpubgit/DX.git] / lib / DX / Action / BindValue.pm
index c8f43d1..57b36d8 100644 (file)
@@ -6,7 +6,7 @@ use DX::Class;
 
 with 'DX::Role::SimpleAction';
 
-has new_value => (is => 'ro', required => 1);
+has new_value => (is => 'ro', required => 1, isa => Value);
 
 sub for_deparse {
   my ($self) = @_;
@@ -22,10 +22,12 @@ sub for_deparse {
 
 sub _build__updates {
   my ($self) = @_;
-  DX::Update::SetValue->new(
-    target_path => $self->target_path,
-    new_value => $self->new_value,
-  );
+  [
+    DX::Update::SetValue->new(
+      target_path => $self->target_path,
+      new_value => $self->new_value,
+    )
+  ]
 }
 
 1;