New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Term::ReadLine::event_loop doesn't quite match documentation #12002
Comments
From @dmcbrideCreated by @dmcbrideRocco pointed out to me that the new event_loop method has a small $Term::ReadLine::toloop = [ @_ ] if @_ > 1; should be: $Term::ReadLine::toloop = [ @_ ] if @_ > 0; It was originally intended that toloop would require two parameters Perl Info
|
From @dmcbridePatch for the typo. To answer the question from #p5p by rjbs (for posterity) which was, The problem is that in tkRunning, we don't shift off the $self object, In event_loop, we *are* shifting off $self, and thus we only need to |
From @dmcbride0001-The-event_loop-method-is-shifting-off-self-which-mea.patchdiff --git a/dist/Term-ReadLine/lib/Term/ReadLine.pm b/dist/Term-ReadLine/lib/Term/ReadLine.pm
index f1b1419..3770df0 100644
--- a/dist/Term-ReadLine/lib/Term/ReadLine.pm
+++ b/dist/Term-ReadLine/lib/Term/ReadLine.pm
@@ -454,7 +454,7 @@ sub event_loop {
# store the callback in toloop, again so that other modules will
# recognise it and call us for the loop.
- $Term::ReadLine::toloop = [ @_ ] if @_ > 1;
+ $Term::ReadLine::toloop = [ @_ ] if @_ > 0; # 0 because we shifted off $self.
$Term::ReadLine::toloop;
}
|
@dmcbride - Status changed from 'new' to 'open' |
From [Unknown Contact. See original ticket]Thanks, applied as 9705c32. |
@rjbs - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#111758 (status was 'resolved')
Searchable as RT111758$
The text was updated successfully, but these errors were encountered: