Le Ven 09 Avr 2010 18:37:54, CFEDDE a écrit :
Show quoted text> POE::Component::Schedule::add goes out of it's way to ensure that the
> first argument is a session or a session ID. Historically PoCo::Cron
> Accepted aliases as the first argument.
The check is those line:
# Remember only the session ID
$session = ref $session ? $session->ID : $session;
# We don't want to loose the session until the event has been handled
$poe_kernel->refcount_increment($session, $refcount_counter_name)
or croak __PACKAGE__ . "->add: first arg must be a POE session ID:
$!";
By looking at the code, I do not see any problem in giving an alias: an
alias is just a string, so it should follow the same code path as a
session id. Any string that is accepted as an identifier for a session
by refcount_increment() should work.
Show quoted text> What do you think of restoring that behavior?
I don't see any problem with the current code, except maybe changing the
error message or the documentation.
Do you have a failing test to propose?
--
Olivier Mengué -
http://o.mengue.free.fr/