Incomplete work for refactoring regions and flows
This commit is contained in:
parent
231bffa99b
commit
beb1baa096
13 changed files with 297 additions and 148 deletions
|
@ -175,6 +175,22 @@ sub setenv {
|
|||
}
|
||||
}
|
||||
|
||||
sub equals {
|
||||
my ($self, $other) = @_;
|
||||
return @{ $self->diff($other) } == 0;
|
||||
}
|
||||
|
||||
sub diff {
|
||||
my ($self, $other) = @_;
|
||||
|
||||
my @diff = ();
|
||||
foreach my $opt_key (sort @{$self->get_keys}) {
|
||||
push @diff, $opt_key
|
||||
if !$other->has($opt_key) || $other->serialize($opt_key) ne $self->serialize($opt_key);
|
||||
}
|
||||
return [@diff];
|
||||
}
|
||||
|
||||
# this method is idempotent by design
|
||||
sub validate {
|
||||
my $self = shift;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue