Archived
1
0

Implement delId method for traces

This commit is contained in:
Mercier Pierre-Olivier 2014-01-15 19:43:22 +01:00
parent b38f15b0b6
commit 4877749a76

View File

@ -120,7 +120,7 @@ sub delId
{
if (!$value || $value == $group->getValue())
{
#$self->{groups} = \{ grep { ! } @{ $self->{groups} } };
$self->{groups} = \{ grep { $_->{id} ne $key } @{ $self->{groups} } };
}
last;
}
@ -255,8 +255,18 @@ sub delId
my $key = shift;
my $value = shift;
foreach my $item (@{ $self->{groups} })
foreach my $group (@{ $self->{groups} })
{
if ($group->{id} eq $key)
{
if (!$value || $value == $group->getValue())
{
$self->{groups} = \{ grep { $_->{id} ne $key } @{ $self->{groups} } };
}
last;
}
$group->delId($key, $value);
}
}
@ -404,6 +414,11 @@ sub parseEval
}
}
sub delId
{
# Do nothing here, just an abstract method
}
sub getIds
{
my $self = shift;