Skip Menu |
 

This queue is for tickets about the POE-Component-Schedule CPAN distribution.

Report information
The Basics
Id: 56447
Status: resolved
Priority: 0/
Queue: POE-Component-Schedule

People
Owner: dolmen [...] cpan.org
Requestors: chris [...] fedde.us
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 0.94
  • 0.92
  • 0.93_01
  • 0.93_02
Fixed in:
  • 0.94_01
  • 0.94_02
  • 0.94_03



Subject: Aliases not working in POE::Component::Schedule::Add
Download (untitled) / with headers
text/plain 230b
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. What do you think of restoring that behavior?
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/
Download (untitled) / with headers
text/plain 359b
I've created a test case and verified that aliases do not work. http://code.google.com/p/poe-component-schedule/source/browse/trunk/t/21-session-arg-alias.t?spec=svn61&r=61 But I think that the general fix would be that POE suppport aliases as arguments to refcount_{in,de}crement, so I've reported bug #57314. -- Olivier Mengué - http://o.mengue.free.fr/
Development version 0.94_01 released. -- Olivier Mengué - http://o.mengue.free.fr/
Download (untitled) / with headers
text/plain 239b
Le Dim 09 Mai 2010 17:32:48, DOLMEN a écrit : Show quoted text
> Development version 0.94_01 released.
It looks like the 2 new test I added are missing from the release. Probably a MANIFEST update problem. -- Olivier Mengué - http://o.mengue.free.fr/
Download (untitled) / with headers
text/plain 246b
Le Lun 10 Mai 2010 18:48:28, DOLMEN a écrit : Show quoted text
> It looks like the 2 new test I added are missing from the release. > Probably a MANIFEST update problem.
Development release 0.94_03 is available. -- Olivier Mengué - http://o.mengue.free.fr/
Public release 0.95 is available. -- Olivier Mengué - http://o.mengue.free.fr/


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.