On Wed, Dec 10, 2003 at 01:44:17PM -0800, Gary Funck wrote:
> Follow-up, adding a check to see if $oldmagic is "" made the complaints
> go away:
> 
>    1248     my $oldmagic =
> $self->{db_toks}->{$OLDEST_TOKEN_AGE_MAGIC_TOKEN};
>    1249     $oldmagic = 0 if (defined($oldmagic) && $oldmagic eq "");
>    1250     if (!defined ($oldmagic) || $atime < $oldmagic) {
>    1251       $self->{db_toks}->{$OLDEST_TOKEN_AGE_MAGIC_TOKEN} = $atime;
>    1252     }
> 
> this can be recoded more succinctly, I'm sure.

FYI: you changed the logic of the code there.  if there is no oldest
token atime (ie: this is the first token to be learned), it should set
the value to the atime.  you've now forced oldest to be 0 until the
first expire occurs and fixes it.

the !defined bit is supposed to catch when there is no oldest token, but
apparently instead of undef, it sometimes comes back as "" (boo DB_File!)

can you open a ticket in bugzilla about this?

-- 
Randomly Generated Tagline:
"The cardinal rule at our school is simple. No shooting at teachers. If
 you have to shoot a gun, shoot it at a student or an administrator."
                 - "Word Smart II", from Princeton Review Pub.

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to