1 package DX::Step::Normal;
3 use Types::Standard qw(ArrayRef);
8 has actions => (is => 'ro', isa => ArrayRef[Action], required => 1);
10 has depends_on => (is => 'ro', isa => DependencyGroupList, required => 1);
12 has alternative_step => (is => 'ro', isa => Step);
14 sub but_with_dependencies_on {
15 my ($self, @deps) = @_;
16 $self->but(depends_on => [ @{$self->depends_on}, @deps ]);
19 sub but_with_alternative_step {
20 my ($self, $step) = @_;
21 bless { %$self, alternative_step => $step }, ref($self);
25 my ($self, $old_hyp) = @_;
26 #::Dwarn($self->depends_on);
27 return ($self->_apply_to_hyp($old_hyp), $self->alternative_step);
31 my ($self, $old_hyp) = @_;
32 return undef unless my $hyp = $old_hyp->with_actions(@{$self->actions});
33 return $hyp->resolve_head_dependent_on($self->depends_on);