in reply to perl2exe question

No! The DOS exe binary is not going to work on a Unix machine. What perl2exe is doing -> it compiles perl into opcodes, and then attaches the compiled opcode after a stub which is a PC binary file. If you run this program, the perl stub will seek to its end to locate the Perl opcode, and then execute the opcode with its built-in interpreter.

Sun runing Solaris 5.6 is a totally different architecture to PC, it is not binary compatible with PC at all. You can not expect the same EXE to work under Solaris.

Well, most of the Solaris installations have perl installed as default. But these are usually old versions of perl. You probably need to tell the system administrator to install the latest version of Perl on the system first. And at the beginning of your perl script, include the line #!/usr/local/bin/perl -w. Change the permission of your script to executable by everyone. The Apache webserver on Unix is able to run your perl script directly, provided that the webserver is configured properly.

The directory structure on Unix is different to DOS. So your pathnames on unix have '/' separators. One advice is when you code under Windows Active Perl, try to use '/' as path separator (windows can recognise '/').

And also don't call windows specific modules like the Win32, etc. Only use compatible modules from CPAN if you can.

Remember that the byte ordering is different on Sun boxes, so keep that in mind when handling binary files.

And most importantly, build test suites to *TEST* your packages. So that when you migrate the application from Windows to Unix platform, perform something like make test will verify that the installation is working as expected. The guide for making test cases is on CPAN under Test::More and Test::Simple.

Replies are listed 'Best First'.
Re: Re: perl2exe question
by Anonymous Monk on Sep 23, 2003 at 07:53 UTC
    What perl2exe is doing -> it compiles perl into opcodes, and then attaches the compiled opcode after a stub which is a PC binary file.
    No, that's not what goes on. perl2exe does some kind of xor on the sourcecode, and stuffs that at the end of the stub. No bytecode is generated. bytecode does not work reliably.