Fix that 'changed' would return true just because the attribute existed :)

Another option would have been to implement 'delete_attribute'.
This commit is contained in:
Juerd Waalboer 2019-11-06 17:43:31 +01:00
parent bb8c52b593
commit 32e84f3725

View file

@ -41,7 +41,10 @@ sub add_contra {
sub has_attribute {
my ($self, $key) = @_;
return exists $self->{attributes}->{$key};
return (
exists $self->{attributes}->{$key}
and defined $self->{attributes}->{$key}
);
}
sub attribute {