Re: Eclipse and PERL
by syphilis (Archbishop) on Oct 23, 2007 at 01:51 UTC
|
Hi RaduH,
Unfortunately, Expect won't work on Windows. (At least I don't know of anyone having managed to get it to work on Windows.)
Expect may work on Cygwin ... if you like to install Cygwin on your Win2000 box. But you would then also need to follow the correct module installation procedure as others have indicated. See perldoc perlmodinstall.
Cheers, Rob | [reply] [d/l] |
|
I am using the Windows box only for UI purposes. The files are on a drive mapped off of a Unix machine and I run the software on that Unix box. I use Eclipse only as IDE and have a separate ssh session to that Unix machine where I execute my scripts at the command line.
Thanks for all your advices. It seems to be a bit more complicated than I thought. I'll investigate your suggestions.
RH
| [reply] |
Re: Eclipse and PERL
by Joost (Canon) on Oct 22, 2007 at 23:41 UTC
|
You generally can't install perl modules just by copying them around. Either use the ppm package manager (since you're on active state perl) or install perl modules directly from CPAN using the (not very windows-friendly) default techniques* (see A Practical Guide to Compiling C based Modules under ActiveState using Microsoft C++ for some more info - I don't have much experience with this)
*) i.e. untar, cd to directory, perl Makefile.PL, (n)make install
| [reply] |
|
Well, from the CPAN pages: "Copy the module into your Perl's lib directory. That'll be one of the directories you see when you type perl -e "print qq(@INC)". "
I already have the .pm file (the zip from CPAN does contain Expect.pm) Even more, it does NOT have source code for me to compile to begin with.
Thanks,
RH.
| [reply] |
|
Well, Expect seems to be perl only (no C or other code) so it may work by copying, but other stuff can go wrong that the normal installation process does or checks for; for instance, Expect requires IO::Tty and IO::Pty, so it probably won't work unless you've got those modules installed too (including their requirements recursively)
If they're availabe, you should probably use the ppm packages for active state perl. Otherwise, for pure perl modules, you may be able to just install nmake and use that to install from CPAN directly using the CPAN shell.
| [reply] |
Re: Eclipse and Perl
by chromatic (Archbishop) on Oct 23, 2007 at 00:15 UTC
|
I second the recommendation to use PPM, but if you're determined to do things this way, you'll have to post the exact error message that Eclipse gives. Without that, all we can do is guess at what's wrong.
| [reply] |
|
Eclipse has that nice way of marking the line with a compilation error with a red dot on the side. The error message is "Compilation failed in require
A fatal error (trappable) Perl could not compile a file specified in a C<require> statement. Perl uses this generic message when none of the errors that it encountered were severe enough to halt compilation immediately." This is on the line where I include Expect (use Expect;) Given the dependencies I learned about from the replies here, it is possible that the Expect module is found but some dependencies are missing and therefore the error is inside the module where other modules (that are missing) are being included and Eclipse can only flag the "use Expect;" line for obvious reasons (if this is indeed the case).
| [reply] |
Re: Eclipse and PERL
by idsfa (Vicar) on Oct 23, 2007 at 15:45 UTC
|
| [reply] [d/l] [select] |
|
Hi idsfa,
I had tried your #2 before. I had added both the path to the Perl lib folder and to the current folder (bizarre as it may sound :) ) Didn't make a difference.
I tried your #1 just now and there's no difference. This confirms one more time that the problem is not reaching the Expect module, but reaching other dependencies the Expect module is referring and I may have not installed on the windoz box I mentioned.
I appreciate your advice. Like I said I really run the script on a Unix machine that seems to have everything installed and configured correctly (I have other questions related to using Expect now, but I still dig around by myself before asking for help).
Thanks again,
Radu
| [reply] |
|
the problem is not reaching the Expect module, but reaching other dependencies the Expect module is referring and I may have not installed on the windoz box
Yes, that's the problem. And the gotcha is that those dependencies don't build on Windows :-)
Cheers, Rob
| [reply] |
|