Skip Menu |
 

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

Maintainer(s)' notes

The new source repo is now at https://github.com/dolmen/p5-POE-Component-Schedule

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
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 230
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?
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-26546-1272215459-193.56447-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1071
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/
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-26546-1272215459-193.56447-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-26546-1272215459-193.56447-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6780-1273401833-937.56447-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 359
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/
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-6780-1273401833-937.56447-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-26546-1272215459-193.56447-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-6780-1273401833-937.56447-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6772-1273424038-1038.56447-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 140
Download (untitled) / with headers
text/plain 140b
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-6772-1273424038-1038.56447-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-26546-1272215459-193.56447-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-6780-1273401833-937.56447-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-6772-1273424038-1038.56447-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6788-1273440768-814.56447-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 85
Development version 0.94_01 released. -- Olivier Mengué - http://o.mengue.free.fr/
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-6788-1273440768-814.56447-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-26546-1272215459-193.56447-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-6780-1273401833-937.56447-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-6772-1273424038-1038.56447-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-6788-1273440768-814.56447-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6782-1273531708-116.56447-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 239
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/
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-6782-1273531708-116.56447-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-26546-1272215459-193.56447-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-6780-1273401833-937.56447-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-6772-1273424038-1038.56447-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-6788-1273440768-814.56447-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-6782-1273531708-116.56447-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6780-1274804368-957.56447-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 246
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/
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-6780-1274804368-957.56447-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-26546-1272215459-193.56447-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-6780-1273401833-937.56447-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-6772-1273424038-1038.56447-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-6788-1273440768-814.56447-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-6782-1273531708-116.56447-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-6780-1274804368-957.56447-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6776-1274862495-436.56447-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 81
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.