The only other method of this type is alarm_remove_all(). There is no
public method to list alarms, so it's not possible to remove all alarms
in a one-liner. In other words, alarm_remove_all() extends the public
API to support something that users could not already do. Otherwise I
would either have rejected it or now be considering whether to deprecate it.
Technically, people could track their alarms with a hash and
alarm_set(). This is significantly more work than a one-liner, but I
could use it to justify deprecating alarm_remove_all().
Unfortunately it's a lot harder to deprecate a feature than it is to
reject one. In the end, alarm_remove_all() may remain in POE::Kernel
because it's the path of least resistance.
You're still welcome to implement a POE::API module for
alias_remove_all(). I'd be interested to see the comparative benchmarks
for practical use cases.
On Sat Apr 19 16:39:49 2008, nicholasrperez@gmail.com wrote:
Show quoted text> I need to disagree with you regarding syntactic sugar. That one liner
> statement invokes all of the lookup and assertion checking for each
> and every known alias returned in alias_list. That can be
> computationally significant when compared to the looping that happens
> internally within POE::Resource::Aliases::_data_alias_clear_session.
> Bringing that functionality forward is a positive enhancement, not
> just syntactic sugar. Why else have other *_remove_all methods on
> POE::Kernel if you can simply accomplish the same thing with a one
> liner?
>
> On Sat, Apr 19, 2008 at 2:44 PM, RCAPUTO via RT <bug-POE@rt.cpan.org>
wrote:
Show quoted text> >
> > <URL:
http://rt.cpan.org/Ticket/Display.html?id=28891 >
> >
> > This feature is syntactic sugar for a one-line statement. It doesn't
> > enable users to do anything new, so it doesn't belong in POE::Kernel's
> > core feature set.
> >
> > The POE::API namespace exists so that people may extend POE::Kernel
> > without patching the core. Please see POE::API::Peek for precedent on
> > publishing mix-in POE::Kernel APIs.
> >
>
>
>