$for_id => $deps_for,
};
my $new_deps = $self->_merge_deps_for(
- $self->deps, $for_id, map @{$_}[1..$#$_], @$deps_for
+ $self->deps, $for_id, @$deps_for
);
ref($self)->new(
deps => $new_deps,
my %new_revdeps = %{$self->revdeps};
my $new_deps = $self->deps;
$new_deps = $self->_unmerge_deps_for(
- $new_deps, $_, map @{$_}[1..$#$_], @{$new_revdeps{$_}}
+ $new_deps, $_, @{$new_revdeps{$_}}
) for @for_ids;
delete @new_revdeps{@for_ids};
ref($self)->new(
unless $arg->isa('DX::Value::Dict');
return step(
actions => [],
- depends_on => [ [ undef ,=> [ TYPE_OF ,=> $arg ] ] ]
+ depends_on => [ [ TYPE_OF ,=> $arg ] ]
);
}
if ($proto and not $proto->isa('DX::Value::Dict')) {
my $set = $arg->action_for_set_value($proto||dict());
return step(
actions => [ $set ],
- depends_on => [ [ undef ,=> [ TYPE_OF ,=> $arg ] ] ]
+ depends_on => [ [ TYPE_OF ,=> $arg ] ]
);
}
return step(
actions => [],
depends_on => [
- [ undef ,=> [ CONTENTS_OF ,=> $left ], [ CONTENTS_OF ,=> $right ] ]
+ [ CONTENTS_OF ,=> $left ], [ CONTENTS_OF ,=> $right ]
],
);
}
step(
actions => [ $set ],
depends_on => [
- [ $right =>
- [ CONTENTS_OF ,=> $left ], [ CONTENTS_OF ,=> $right ]
- ]
+ [ CONTENTS_OF ,=> $left ], [ CONTENTS_OF ,=> $right ]
]
)
} else {
step(
actions => [ $set ],
depends_on => [
- [ $left =>
- [ CONTENTS_OF ,=> $left ], [ CONTENTS_OF ,=> $right ]
- ]
+ [ CONTENTS_OF ,=> $left ], [ CONTENTS_OF ,=> $right ]
]
)
} else {
unless $coll->does('DX::Role::StructuredValue');
my $basic_deps = sub {
(depends_on => [
- [ undef ,=>
- [ EXISTENCE_OF ,=> $coll, ($_[1]||$_[0])->string_value ],
- [ CONTENTS_OF ,=> $_[0] ],
- ],
- [ $value ,=>
- [ CONTENTS_OF ,=> $coll, ($_[1]||$_[0])->string_value ],
- [ CONTENTS_OF ,=> $value ],
- ],
+ [ EXISTENCE_OF ,=> $coll, ($_[1]||$_[0])->string_value ],
+ [ CONTENTS_OF ,=> $_[0] ],
+ [ CONTENTS_OF ,=> $coll, ($_[1]||$_[0])->string_value ],
+ [ CONTENTS_OF ,=> $value ],
])
};
if ($value->is_set) {
#has depends_on => (is => 'ro', isa => DependencyGroupList, required => 1);
has depends_on => (is => 'ro', required => 1, coerce => sub {
- my ($dep_groups) = @_;
+ my ($deps) = @_;
my @exp;
- assert_DependencyGroupList $dep_groups;
- [ map {
- my ($on, @deps) = @$_;
- my @exp;
- DEP: foreach my $dep (@deps) {
- my ($type, @path) = @$dep;
- push @exp, [
- $type,
- map { ref() ? @{$_->value_path or next DEP} : $_ } @path
- ];
- }
- (@exp ? [ $on, @exp ] : ());
- } @$dep_groups ];
+ DEP: foreach my $dep (@$deps) {
+ my ($type, @path) = @$dep;
+ push @exp, [
+ $type,
+ map { ref() ? @{$_->value_path or next DEP} : $_ } @path
+ ];
+ }
+ \@exp
});
has resolves => (is => 'ro', isa => Proposition);