Possible EPIC Perl bug

pablo1999
2010-04-01
2013-05-20
  • pablo1999
    pablo1999
    2010-04-01

    I'm running Eclipse IDE for PHP developers 1.2.2.2010 and I installed the EPIC Perl plugin 0.6.35

    I'm running a perl code that works fine on a Linux system but it doesnt run properly on Eclipse in a Windows environment.

    The code has the following line:

    $result eq 'yes' ? ++$metResult : ++$didNotMeetResult;

    So every time a user enter 'yes' the $metResult should increment. Instead is only incrementing the $didNotMeetResult variable.

    What do I have to do to this plugin so it behaves like it does in Linux?

     
  • Jan Ploski
    Jan Ploski
    2010-04-01

    EPIC doesn't run your code; the Perl interpreter does. The line of code you quoted is probably executes just the same in both environments. What might be different between systems is how input/output is handled/buffered/etc. Or maybe you are hitting a bug in a particular version of Perl (very unlikely). Try running your program on the command line without EPIC to see how it behaves then.

     
  • pablo1999
    pablo1999
    2010-04-01

    I'm using Cygwin on a Windows XP machine and the Perl is located inside C:\Cygwin\bin\perl.exe   When I run the script using only cygwin using the shell it works fine but when using Eclipse it behaves differently.

    In Eclipse I specified "C:\Cygwin\bin\perl.exe" as the executable and Cygwin as the interpreter.

    So if it works in the shell using cigwyn but not in eclipse where is the issue occurring?

     
  • Jan Ploski
    Jan Ploski
    2010-04-01

    Most likely the difference is in the I/O. Eclipse/EPIC does not emulate an "ANSI terminal", so certain functions related to reading keyboard input will not be available or will behave differently.