pervasive type constraints
[scpubgit/DX.git] / lib / DX / Action / AddValue.pm
index b9c8c69..8271f70 100644 (file)
@@ -5,14 +5,16 @@ use DX::Class;
 
 with 'DX::Role::SimpleAction';
 
-has new_value => (is => 'ro', required => 1);
+has new_value => (is => 'ro', required => 1, isa => Value);
 
 sub _build__updates {
   my ($self) = @_;
-  DX::Update::AddValue->new(
-    target_path => $self->target_path,
-    new_value => $self->new_value,
-  );
+  [
+    DX::Update::AddValue->new(
+      target_path => $self->target_path,
+      new_value => $self->new_value,
+    )
+  ]
 }
 
 1;