Direct mail didn't work, so I'm trying the list. Since I wrote this
email, I've fixed this bug in my local version, as well as made a few
tweaks to speed/clean things up a bit. Does anyone want to see the
changes?
---------- Forwarded message ----------
From: Eric Hacker
Date: Feb 15, 2007 10:01 PM
Subject: PoCo::SimpleLog unregister bug?
To: [EMAIL PROTECTED]
Hello,
Thank you for providing PoCo::SimpleLog. It is just the thing for
broadcasting events to multiple potential subscribers.
I am having trouble with unregistering. I have a default handler and
it is catching events after unregistration. The syntax for
unregistration appears correct (as I copied it straight from the
Synopsis). The first unregistration works, but none of the later ones
do. My states are numbered, so the first one happens to be '1'.
In looking at the source on line 248 I see you compare:
if ( $_[HEAP]->{'LOGS'}->{ $args{'LOGNAME'} }->{ $args{'SESSION'} }->{
$evnt } eq $args{'EVENT'} )
however on line 186 you have:
$_[HEAP]->{'LOGS'}->{ $args{'LOGNAME'} }->{ $args{'SESSION'} }->{
$args{'EVENT'} } = 1;
so I think line 248 should be:
if ( $evnt eq $args{'EVENT'} )
This would explain how my first passes and not the others. I haven't
tested this yet, nor written a test case yet. I'm exhausted for today
and won't get back to this project until next week at the earliest. I
thought I'd send a note. Then again, I'm tired enough that I could be
way off.
Regards,
--
Eric Hacker, CISSP
aptronym (AP-troh-NIM) noun
A name that is especially suited to the profession of its owner
I _can_ leave well enough alone, but my criteria for well enough is
pretty darn high.