How can I get ActivePerl to play well with cygwin screen?

I would like to use the cygwin (screen) development tools and call the ActiveState Perl debugger from cygwin, causing the following error.

bash-3.2$ perl -d test.pl The system cannot find the path specified. Unable to get Terminal Size. The Win32 GetConsoleScreenBufferInfo call didn't work. The COLUMNS and LINES environment variables didn't work. The resiz e program didn't work. at F:/Perl/lib/Term/ReadKey.pm line 362. Compilation failed in require at F:/Perl/lib/Term/ReadLine/Perl.pm line 64. at F:/Perl/lib/Term/ReadLine/Perl.pm line 64 Term::ReadLine::Perl::new('Term::ReadLine', 'perldb', 'GLOB(0x18e2e0c)', 'GLOB(0x1883e14)') called at F:/Perl/lib/perl5db.pl line 6073 DB::setterm called at F:/Perl/lib/perl5db.pl line 2237 DB::DB called at testReliance1.pl line 2 Attempt to reload Term/ReadLine/readline.pm aborted. Compilation failed in require at F:/Perl/lib/Term/ReadLine/Perl.pm line 64. END failed--call queue aborted at testReliance1.pl line 64. at testReliance1.pl line 64 bash-3.2$ 

I could not find a workaround for this.
I tried to use the cygwin perl privilege, but compiling perl modules under cpan is a nightmare for me, since most of them will not compile and do not have deep knowledge to fix compiler errors.

Providing a fake terminal for the debugger may work, but has no idea about the ability and how to proceed.
Please suggest if there is any workaround for this.

+6
windows perl windows-xp cygwin
source share
5 answers

From the "Environment" section of the Term :: ReadLine documentation :

The PERL_RL environment PERL_RL determines which clone ReadLine is loaded. If false, a dummy interface is used.

As a workaround to resolving incompatibilities, you can disable Term :: ReadLine with

  bash $ PERL_RL = 0 perl -d test.pl 
+1
source share

Remember that the Windows console provides a completely different environment for your regular * nix console. In general, Windows applications that want to interact with the console will not work in Cygwin consoles (for example, MinTTY, XTerm, Screen), since they only provide PTY emulation.

Andy Koppe, author of MinTTY , wrote a small program called conin so that program windows could be read from the console, but full support for output was still considered impracticable.

+1
source share

It seems to me that you have a lot of problems. ActiveState Perl is an attempt to port Perl for windows with binary distribution and version control for modules, this approach is dying. The success of strawberry perl and my personal experience makes me think that you are just using the wrong product.

I use only strawberries and the number of problems that I have encountered since the migration can count on one side. I am very happy going from ActiveState. I would advise you to give him a chance. Strawberry comes with a medium environment - it even compiles XS modules for you, and it opens up a genuine CPAN for you.

(this is a completely broken answer, but I'm pretty sure I used cybwin in cygwin and it worked)

Solution - Use Cygwins Term ReadKey

Essentially, you just need Cygwin Term::ReadKey sit higher in your lib hierarchy, which is why it is used.

  • Create directory D: \ foo_lib
  • Copy the term term / ReadKey from the cygwins / usr / lib / perl directory to D: \ foo_lib
  • Copy the term /ReadKey.pm to D: \ foo_lib \ Term \
  • add PERL5LIB = "D: \ foo_lib" to your StrawBerry perl environment.

or.


Run it, from Cygwin.

 perl -MTerm::ReadKey -E"say Term::ReadKey::termsizeoptions()" 

Regardless of this value, edit Term / ReadKey.pm from your Strawberry installation, hack it there, set the variable

  • my $termoption = value_you_got from above
  • replace &termsizeoptions() , with $termoption
+1
source share

Try this command before starting Perl:

 export COLUMNS LINES 
0
source share

Use wperl.exe, which is packaged with ActiveState perl. This is working fine.

0
source share

All Articles