Running compiled Inline C perl scripts on more than one machine

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

•  Subject
• Author
• Posted on

Hi

I've created a number of Perl scripts which utilise the Perl Inline C
module thus needing a compile first prior to execution. Now, if I wish
to execute the scripts on another machine, what is the easiest way to
do this? I have tried it already and after installing Perl, copying my
scripts over together with the relevant libraries, I am finding that
upon execution, Perl wants to recompile the inline C code, every time.

I don't want to have to make a replica of my development environment on
each machine I wish to execute the scripts on. I don't wish to compile
the scripts to an .exe either.
Is there a method for moving scripts from one machine to another with
the minimum of fuss?
Simple scripts work ok with just the "out of the box ActiveState Perl
installation" and so do scripts utilising Win32::API but inline scripts
or those that feature modules containing inline code appear to be have
to be recompiled when I move them.

Any help would be appreciated.

Regards

Ant

Re: Running compiled Inline C perl scripts on more than one machine

When you transfer the Inline script (say 'test.pl') across to another
machine, you also need to transfer the '_Inline\lib\auto\test_pl_xxxx'
directory across as well.( 'xxxx' will be a string of 4 hexadecimal
characters). And the '_Inline\lib\auto\test_pl_xxxx' directory needs to be
placed in the same folder as 'test.pl'.

That should work ok from one Windows machine to another, as long as both
machines have binary-compatible versions of perl.
There's a potential for binaries built using perl 5.8.7 or later to be
incompatible with earlier versions of perl 5.8. It doesn't happen often -
when/if it does happen you'll get an error telling you something like
'PL_memory_wrap' was not found in the perl58.dll.

Cheers,
Rob

Re: Running compiled Inline C perl scripts on more than one machine

Spot on Rob. Thanks very much. I'd tried this prior to your post but I
must have missed something fundamental because it failed.
However, it now works, superb!!

Thats twice now that you have responded to my posts adn twice been on
the ball, cheers. Thanks for your time!.

Regards

Ant