Subject: | KinoSearch::Simple and DESTROY |
Date: | Sat, 26 Jan 2008 13:08:23 -0800 |
To: | bug-kinosearch [...] rt.cpan.org |
From: | Father Chrysostomos <sprout [...] cpan.org> |
I found a bug in KinoSearch::Simple 0.02_051 which I believe is still
present in the svn repo (rev. 2955).
The DESTROY method relies on another object’s (the indexer’s)
existence. If the KS:Simple object is stored in a global variable, or
a lexical variable visible to a package sub, etc., it is not destroyed
until the program quits. During global destruction, the indexer may
get destroyed first, so an unfinished (and unusable) index is created.
The attached patch should fix this. Is there any reason why
InvIndexer’s NUKE method should not call finish_indexing anyway? If
not, then the fix can be even simpler than this patch.
Message body is not shown because sender requested not to inline it.