Marion Wardermann wrote:
> 
> Hi,
> I'd like to run a programme using Inline::C on a webserver where I can't use any 
>C-Compiler. Could you tell me a way how to manage that ?

Marion,

Please accept my apology for the delay in this answer. The holdup stems
from my trying to decide how to best answer the question.

Unfortunately the answer isn't clear cut. But I'll give you my best
advice and also let you know what's coming up on this front.

The first premise is that you have another machine with the same
architecture (including Perl version, Perl build flags, etc) that you
can actually make Inline compile the C extension on. It is important
that the Perl on your build machine closely match the Perl on your
server machine.

Given that, are you just using Inline in a Perl "program" or is it a
Perl "module" that you want to install?

A) Let's take the case of the first one. An easy way to do this is to
ensure that Inline uses the ./.Inline directory to build in. Just do
this.

1) Create a new directory; say '/home/marion/test/'
2) Put your Inline program in there.
3) Create another directory '/home/marion/test/.Inline/'
4) Run the Inline program.
5) Check inside '/home/marion/test/.Inline/' to make sure the compiled
object is in there.
6) Tar or zip up the '/home/marion/test/'
7) Move the zip file to your server and unzip it.
8) The program should work as long as Inline.pm is installed.
9) BTW, your program must remain in the same directory as the .Inline/
directory.

NOTES: Some tar utility programs may not work with Inline 0.34 or
earlier, because Inline produces long path names (over the 100 byte
limit). You may have to use zip, or another tar. Alternatively you can
wait for 0.40 to come out. This version produces much shorter path
names.

B) If you are writing an Inline module which you wish to install, please
wait for version 0.40. (0.40 is currently being tested by the Inline
community and will be available on CPAN soon.) 

With 0.40, follow the new instructions for installing a module locally.
But before typing 'make install', zip up the whole directory, move it to
your server, unzip it, and do the make install there. 

NOTE: In this case, Perl *MUST* be installed in the same directory (ie
'/usr/local/bin') on both the build and server machines.

C) In the future (say release 0.45 - 0.50) you'll be able to say:

    perl -MInline=makepkg Foo.pm

on your build machine. This will create a tar/zip file that you can move
to another machine and say:

    perl -MInline=installpkg Foo-0.34.zip

It will be *that* simple. And you won't have to worry about any of the
caveats above.



Best wishes, Brian

PS In the future you may wish to post Inline questions to the Inline
mailing list. Send an email to [EMAIL PROTECTED] to subscribe.
I'm CCing this message to the mailing list. It's a very important
question that hasn't really come up in the past.


-- 
perl -le 'use Inline C=>q{SV*JAxH(char*x){return newSVpvf
("Just Another %s Hacker",x);}};print JAxH+Perl'

Reply via email to