1 package DX::Step::Normal;
5 has actions => (is => 'ro', required => 1);
7 has depends_on => (is => 'ro', required => 1);
9 has alternative_step => (is => 'ro');
11 sub but_with_dependencies_on {
12 my ($self, @deps) = @_;
13 $self->but(depends_on => [ @{$self->depends_on}, @deps ]);
16 sub but_with_alternative_step {
17 my ($self, $step) = @_;
18 bless { %$self, alternative_step => $step }, ref($self);
22 my ($self, $old_hyp) = @_;
23 return ($self->_apply_to_hyp($old_hyp), $self->alternative_step);
27 my ($self, $old_hyp) = @_;
28 return undef unless my $hyp = $old_hyp->with_actions(@{$self->actions});
29 return $hyp->resolve_head_dependent_on($self->depends_on);