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
Bug in Term::Complete Module with $_ Usage #7616
Comments
From adalbert.perbandt@infineon.comCreated by adalbert.perbandt@infineon.comThe sub "Complete" in the file "Complete.pm" assigns data Perl Info
|
From @smpetersDo you have an example that may demonstrate this problem? It would be Thanks! |
The RT System itself - Status changed from 'new' to 'open' |
From @smpetersActually, the bug can be demonstrated with the following script: #!/usr/bin/perl -w use strict; $_ = "Foo"; print "$_\n"; Now, here's the patch that fixes the problem. Inline Patch--- /usr/libdata/perl5/Term/Complete.pm Fri Sep 17 13:09:30 2004
+++ ./Term/Complete.pm Fri Nov 26 11:13:08 2004
@@ -5,7 +5,7 @@
use strict;
our @ISA = qw(Exporter);
our @EXPORT = qw(Complete);
-our $VERSION = '1.401';
+our $VERSION = '1.402';
# @(#)complete.pl,v1.2 (me@anywhere.EBay.Sun.COM) 09/23/91
@@ -113,6 +113,7 @@
}
system $tty_raw_noecho if defined $tty_raw_noecho;
LOOP: {
+ local $_;
print($prompt, $return);
while (($_ = getc(STDIN)) ne "\r") {
CASE: { |
From @rgsSteve Peters via RT wrote:
Thanks, applied as #23548 to bleadperl.
|
From adalbert.perbandt@infineon.com
Steve> Do you have an example that may demonstrate this problem? I didn't spend the effort to generate a minimal example but I think 1. This is a code snippet from inside a script: [...] my $env = IFXClearCase::EnvHandler->instance(); my $devenv = my @roComps = ($devenv); my %roCompBls; See the foreach loop. I have inserted print() statements immediately sub prompt4Baseline We then inspected the source code of the Complete.pm. In the code of [...] In the while statements condition part $_ gets overwritten. We did not Regards, Adalbert. |
From adalbert.perbandt@infineon.com
Steve> Actually, the bug can be demonstrated with the following Thanks a lot. Regards Adalbert. |
From @ysthOn Fri, Nov 26, 2004 at 05:14:33PM -0000, Steve Peters wrote:
I thought the preferred way to do this was "local *_;" in maint or |
@rgs - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#32639 (status was 'resolved')
Searchable as RT32639$
The text was updated successfully, but these errors were encountered: