pervasive type constraints
[scpubgit/DX.git] / lib / DX / Role / SimpleAction.pm
index 62bf837..193716e 100644 (file)
@@ -4,9 +4,9 @@ use DX::Role;
 
 with 'DX::Role::Action';
 
-has target_path => (is => 'ro', required => 1);
+has target_path => (is => 'ro', required => 1, isa => ValuePath);
 
-has _updates => (is => 'lazy');
+has _updates => (is => 'lazy', isa => ArrayRef[Update]);
 
 requires '_build__updates';
 
@@ -21,7 +21,7 @@ sub for_deparse {
 
 sub dry_run {
   my ($self, $hyp) = @_;
-  my ($scope, @events) = $hyp->scope->apply_updates($self->_updates);
+  my ($scope, @events) = $hyp->scope->apply_updates(@{$self->_updates});
   return (
     $hyp->but(
       scope => $scope,