Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: Search Timer

Quote Reply
Re: Search Timer In reply to
Hi,

Im not sure whether this is a bug for all users or just me because Ive been modding nph-build but when I tried to run nph-build.cgi from SSH it told me about an error in Condition.pm.

Original Code:
sub as_hash {
my $cond = shift;
ref $cond eq 'HASH' and return $cond;
my $href = {};
foreach my $arr (@{$cond->{cond}}) {
if (ref $arr eq ref []) {
$href->{$arr->[0]} = $arr->[2];
}
else {
my $h = _as_hash ($arr);
for my $k (keys %{$h}) {
$href->{$k} = $h->{$k};
}
}
}
return $href;
}

1;


...fixed code:
sub as_hash {
my $cond = shift;
ref $cond eq 'HASH' and return $cond;
my $href = {};
foreach my $arr (@{$cond->{cond}}) {
if (ref $arr eq ref []) {
$href->{$arr->[0]} = $arr->[2];
}
else {
my $h = as_hash ($arr);
for my $k (keys %{$h}) {
$href->{$k} = $h->{$k};
}
}
}
return $href;
}

1;


The underscore needed to be removed.

Paul Wilson. Shocked
(Dont blame me if I'm wrong!)
Subject Author Views Date
Thread Search Timer Paul 7140 Dec 26, 2000, 5:45 PM
Thread Re: Search Timer
pugdog 7022 Dec 26, 2000, 9:35 PM
Thread Re: Search Timer
Paul 7003 Dec 27, 2000, 4:32 AM
Thread Re: Search Timer
pugdog 7004 Dec 27, 2000, 4:54 AM
Thread Re: Search Timer
Paul 6991 Dec 27, 2000, 5:00 AM
Thread Re: Search Timer
pugdog 7006 Dec 27, 2000, 5:02 AM
Thread Re: Search Timer
Paul 7003 Dec 27, 2000, 5:05 AM
Thread Re: Search Timer
Alex 6991 Dec 27, 2000, 12:46 PM
Post Re: Search Timer
Paul 6965 Dec 27, 2000, 12:51 PM
Thread Re: Search Timer
Paul 6989 Dec 27, 2000, 12:57 PM
Thread Re: Search Timer
Alex 6968 Dec 27, 2000, 1:05 PM
Thread Re: Search Timer
Paul 7041 Dec 27, 2000, 1:37 PM
Thread Re: Search Timer
Alex 6987 Dec 27, 2000, 2:52 PM
Thread Re: Search Timer
Paul 7019 Dec 27, 2000, 2:56 PM
Thread Re: Search Timer
Alex 6992 Dec 27, 2000, 3:04 PM
Post Re: Search Timer
Paul 6969 Dec 27, 2000, 3:08 PM
Post Re: Search Timer
Paul 6948 Dec 27, 2000, 3:13 PM
Thread Re: Search Timer
Paul 6970 Dec 27, 2000, 3:37 PM
Post Re: Search Timer
Paul 6980 Dec 27, 2000, 3:51 PM
Post Re: Search Timer
Paul 6974 Dec 27, 2000, 4:25 PM
Post Re: Search Timer
Paul 6972 Dec 27, 2000, 5:13 PM
Post Re: Search Timer
Paul 7000 Dec 27, 2000, 3:29 PM