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:
parent
bb8c52b593
commit
32e84f3725
1 changed files with 4 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue