S
SandyTipper
I've been stuck on this bit of illogic for days. It is stopping me dead in
my tracks.
I have the following code (irrelevant lines omitted and replaced by ...):
--------------
COH_LOCK: {
...
COH_LOOP:
for my $host_key (keys %$hosts_data_ref) {
...
my $host_ok = 1;
if ($room_number) {
$host_ok = 0 unless exists
$dynaroom_data_ref->{$room_number};
}
if ($bunch_number) {
$host_ok = 0 unless exists
$bunches_data_ref->{$bunch_number};
}
next COH_LOOP unless $host_ok;
clean_up_host($host_key);
$changes++;
}#COH_LOOP
Engine::File->save_data(+HOSTS) if $changes;
}#COH_LOCK
----------------
Using the debugger, I broke before the "next" statement
$room_number and $bunch_number are both integers > 1
both hash elements exist
as expected, $host_ok is 1
BUT WHEN STEPPING ON, "clean_up_host" EXECUTES! WHY??
my tracks.
I have the following code (irrelevant lines omitted and replaced by ...):
--------------
COH_LOCK: {
...
COH_LOOP:
for my $host_key (keys %$hosts_data_ref) {
...
my $host_ok = 1;
if ($room_number) {
$host_ok = 0 unless exists
$dynaroom_data_ref->{$room_number};
}
if ($bunch_number) {
$host_ok = 0 unless exists
$bunches_data_ref->{$bunch_number};
}
next COH_LOOP unless $host_ok;
clean_up_host($host_key);
$changes++;
}#COH_LOOP
Engine::File->save_data(+HOSTS) if $changes;
}#COH_LOCK
----------------
Using the debugger, I broke before the "next" statement
$room_number and $bunch_number are both integers > 1
both hash elements exist
as expected, $host_ok is 1
BUT WHEN STEPPING ON, "clean_up_host" EXECUTES! WHY??