develooper Front page | perl.perl5.porters | Postings from January 2012

Re: [perl #108470] Term::ReadLine should use AE instead of Tk for event looping

From:
Darin McBride
Date:
January 18, 2012 09:32
Subject:
Re: [perl #108470] Term::ReadLine should use AE instead of Tk for event looping
Message ID:
5127950.5zjH3yZlhl@naboo
On Wednesday January 18 2012 7:40:35 AM Nicholas Clark via RT wrote:
> ie I'd love to see AnyEvent as an option, even the default. But I don't feel
> comfortable with making it a hard dependency, and removing the option to
> use the existing Tk code.

Tk is not a hard dependency at the moment, unless you want an event loop.  AE 
will not be a hard dependency (with my proposed patch), either.  I don't want 
to see AE dragged in to the core.  At least, not due to this wishlist item - 
that's a completely separate discussion which I'm not interested in opening 
here.

It's a soft dependency: if you want to use AE, T::RL should be able to support 
it.  If you want to use Tk, I'd suggest using AE anyway, but the revised patch 
doesn't force it.  If you don't want any event loop, that still works as 
before, too.  I don't want to force users of T::RL into using an event loop as 
I expect that wanting an event loop is likely to be a minority.

So, other than a lack of automated unit tests, I see the revised patch as one 
that likely answers your concerns.

As for portability, I have no idea.  According to cpantesters, AE seems to 
pass on all platforms, so I'm not sure where the concern is there, and, even 
then, if it doesn't work on your platform, don't use it, this patch still 
falls back to Tk-only if Tk is loaded but AE isn't.




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About