0

I am using Activeperl for my windows 64 bit machine, I want to use expect.pm module for windows 64 bit, but getting these errors:

Can't locate Expect.pm in @INC (you may need to install the Expect module) (@INC contains: D:/Software/eclips/.metadata/.plugins/org.epic.debug 

I have googled it many are saying this module is not supported in windows 64 bit. Can somebody guide me how can I install it, if not so do I need to shift Linux environment?

serenesat
  • 4,611
  • 10
  • 37
  • 53
Bhushan Patil
  • 59
  • 1
  • 12

2 Answers2

2

According to CPAN the only way for this to work in Windows is through Cygwin.

This appears to be due to a dependency on IO:tty, which has the same suggestion to use it through Cygwin.

Degustaf
  • 2,655
  • 2
  • 16
  • 27
  • Well, any virtual unix machine will do, not just cygwin. – ikegami Jun 12 '15 at 17:06
  • @ikegami: cygwin is not a virtual machine, it is a linux emulation layer and environment in Windows – ysth Jun 12 '15 at 17:36
  • 1
    @ysth, And that's the definition of a virtual machine. "In computing, a virtual machine (VM) is an emulation of a particular computer system. " – ikegami Jun 12 '15 at 17:38
  • it does not therefore follow that an emulation of a particular computer system is a virtual machine. cygwin is not a virtual machine. – ysth Jun 12 '15 at 18:06
2

It won't run on Windows. Expect creates a pseudo-tty to try fool the child program into not buffering its output. Windows doesn't have ttys.

ikegami
  • 367,544
  • 15
  • 269
  • 518
  • would have been better as a comment or edit to Degustaf's answer – ysth Jun 12 '15 at 16:00
  • @ysth, Explaining that it can't possibly run on Windows is not a comment when the question asks if he needs to switch to Linux to use the module. As for duplicating Degustaf's answer, I didn't see any other answers when I posted. Besides, i don't care for his answer that "you need to use another OS if you want it to work in Windows". – ikegami Jun 12 '15 at 16:09
  • well, then, maybe it should be a comment on the question. because it isn't an answer to (paraphrasing only lightly) "how do I use Expect.pm with ActivePerl, or do I need to switch to Linux", which Degustaf's answer does nicely answer. – ysth Jun 12 '15 at 16:59
  • @ysth, Why do you think I need to spell out that you can't use a module on Windows after explaining that the the module relies on features Windows doesn't have? but fine, I did it. – ikegami Jun 12 '15 at 17:08