use DX::Step::Backtrack;
use Types::Standard qw(ArrayRef);
+use DX::Utils qw(expand_deps);
use DX::Class;
has depends_on => (is => 'lazy', init_arg => undef, builder => sub {
my ($self) = @_;
- my $_expand_dep = sub {
- my ($type, @path) = @{$_[0]};
- my @expanded = map {
- ref() ? @{$_->value_path or return ()} : $_
- } @path;
- return [ $type, @expanded ];
- };
- [ map $_expand_dep->($_),
- @{$self->current_resolution->veracity_depends_on} ];
+ expand_deps($self->current_resolution->veracity_depends_on);
});
has alternative_step => (is => 'lazy', init_arg => undef, builder => sub {
(@{$self->actions}
? [ statement => [
[ symbol => 'actions' ],
- [ block => [ @{$self->actions} ] ],
+ [ block => $self->actions ],
] ]
: ()),
[ statement => [