On Wed, Jan 19, 2000 at 11:56:14PM -0500, [EMAIL PROTECTED] wrote:
> JNP> On Wed, Jan 19, 2000 at 11:06:15PM -0500, [EMAIL PROTECTED] wrote:
> >> well, i finally spent a little serious time and found my stupid bug. bad
> >> hash name in a constructor method vs. its use in another method. it
> >> passed undef as a socket/fd to Event::io->new. even though that was my
> >> bug, it should have caused a clean exit/die from event.pm so i feel this
> >> is a bug.
>
> JNP> Hm. I'm not sure. Certainly, it is reasonable to clear the fd like:
>
> JNP> $io_watcher->fd(undef);
>
> would that stop/cancel the watcher? what effect does it have other than
> to clear the attribute?
IIRC, it is like calling $io->stop.
> JNP> Are you saying that you want a warning if that happens in the
> JNP> constructor?
>
> i think that is what happened so it looks like a good place for a
> warning. makes no sense to do an io event on an undef fd.
Presently, all attributes are available via the constructor in the same
manner as the function interface. I'm not sure I want to break the
symmetry.
--
"Never ascribe to malice that which can be explained by stupidity."
via, but not speaking for Deutsche Bank