Hello,
> + * Fix bomb in group watchers.
just a success note: it passes the test on Linux now, too. Well!
Another thing was fixed as well, so I can no longer say
$groupWatcher->add(\$groupWatcher);
in a script. But if I do this in the debugger, my Linux perl crashes with a
segmentation fault.
The following should work, shouldn't it?
$w1=Event->group(parked=>1);
$w2=Event->group(parked=>1);
$w1->add(\$w2);
It is denied.
Preparing the talk, I noticed the following.
This script:
- snip --
use Event;
$w=Event->io(fd=>\*STDIN, cb=>sub {<STDIN>; warn "CALLED!\n";});
print "io default poll attribute:", $w->poll, "\n";
Event::loop;
- snip --
starts a loop which does nothing even if you enter something at STDIN because there
seems to be no default for the poll attribute. I think it should be, or the watcher
should not become active. I only checked this for poll.
- The doc says, and it is a good thing, that insufficient attribute settings cause an
implicit call of stop(). But
Event->io;
does not call stop(), it terminates the script by an exception. This may be subject to
discussion, I only mention it. I personally would prefer a warning or (at the users
choice (controlled by a class variable?)) a silent implicit stop() call.
- The prio() method replies the current priority. Additionally, if a parameter is
passed, it MODIFIES it. So, I would expect the following to report AND modify, but it
does not report if it modifies (3rd line):
$w=Event->io(parked=>1);
print "Default: ", $w->prio, "\n";
print "Changed: ", $w->prio(6), "\n";
print "Checked: ", $w->prio, "\n";
Again, I did not check this for other attribute methods.
Greetings
Jochen