I am using Eclispe 3.4 - EPIC 0.6.24 on WinXP machine.
I was able to run the perl script from Eclipse
and was able to user entered the data when it prompts to read input from (Eclipse console) on using $pwd=<STDIN>;
But, following is not working since, trying to use the stty -noecho concept for password reading.
use Term::ReadKey;
ReadMode 'noecho';
my $password = ReadLine 0;
chomp ($password); # Removes all CR and LF from the end of the line.
ReadMode 'normal';
return $password;
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Whereas, if I run from command prompt, it will work.
But, its working not in Eclipse console and giving following error.
Enter your cws password: GetConsoleMode failed, LastError=|6| at C:/Perl/lib/Term/ReadKey.pm line 264.
[code]
#!c:/perl/bin/perl -w
$|=1; # make STDOUT unbuffered
use Term::ReadKey;
print "Enter your cws password: ";
my $pwd = &_password();
sub _password() {
ReadMode 'noecho';
my $password = ReadLine 0;
chomp ($password); # Removes all CR and LF from the end of the line.
ReadMode 'normal';
return $password;
}
[/code]
Though, I am not sure to post this issue in the Eclispe forum or EPIC forum?
Thanks for any help.
~ Subba
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When you run a script in Eclipse, it is a forked process and the communication between the Eclipse console and the Perl process occurs durign stdout/stderr/stdin streams. There is no terminal to be controlled.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am using Eclispe 3.4 - EPIC 0.6.24 on WinXP machine.
I was able to run the perl script from Eclipse
and was able to user entered the data when it prompts to read input from (Eclipse console) on using $pwd=<STDIN>;
But, following is not working since, trying to use the stty -noecho concept for password reading.
use Term::ReadKey;
ReadMode 'noecho';
my $password = ReadLine 0;
chomp ($password); # Removes all CR and LF from the end of the line.
ReadMode 'normal';
return $password;
Whereas, if I run from command prompt, it will work.
But, its working not in Eclipse console and giving following error.
Enter your cws password: GetConsoleMode failed, LastError=|6| at C:/Perl/lib/Term/ReadKey.pm line 264.
[code]
#!c:/perl/bin/perl -w
$|=1; # make STDOUT unbuffered
use Term::ReadKey;
print "Enter your cws password: ";
my $pwd = &_password();
sub _password() {
ReadMode 'noecho';
my $password = ReadLine 0;
chomp ($password); # Removes all CR and LF from the end of the line.
ReadMode 'normal';
return $password;
}
[/code]
Though, I am not sure to post this issue in the Eclispe forum or EPIC forum?
Thanks for any help.
~ Subba
When you run a script in Eclipse, it is a forked process and the communication between the Eclipse console and the Perl process occurs durign stdout/stderr/stdin streams. There is no terminal to be controlled.