if ($left->equals($right)) {
return step(
actions => [],
- depends_on => [ $left, $right ],
+ depends_on => [ [ undef ,=> [ $left, $right ] ] ],
);
}
return (
$self->but(identity_path => $path);
}
+requires 'to_data';
+
+sub equals {
+ my ($self, $other) = @_;
+ require YAML;
+ YAML::Dump($self->to_data) eq YAML::Dump($other->to_data);
+}
+
1;
$self->but(members => \%members);
}
+sub to_data {
+ my ($self) = @_;
+ my $m = $self->members;
+ +{ map +($_ => $m->{$_}->to_data), $self->index_list };
+}
+
1;
sub is_true { 0 }
+sub to_data { \0 }
+
1;
has number_value => (is => 'ro', required => 1);
+sub to_data { 0+$_[0]->number_value }
+
1;
has string_value => (is => 'ro', required => 1);
+sub to_data { ''.$_[0]->string_value }
+
1;
sub is_true { 1 }
+sub to_data { \1 }
+
1;
sub is_set { 0 }
+sub to_data { undef }
+
+sub equals { 0 }
+
1;
outstanding_propositions => [
proposition(is_dict => 'X'),
proposition(member_at => 'X', string('a'), string('b')),
+ proposition(member_at => 'X', string('a'), string('b')),
],
actions => [],
);
);
#::Dwarn($ss->with_one_step->with_one_step);
-require YAML;
-warn deparse($ss->with_one_step->with_one_step);
+warn deparse($ss->with_one_step->with_one_step->with_one_step);