"Andrei Alexandrescu (See Website For Email)"
<> wrote:
> I'd like to put a Perl script using Inline::C on a shared filesystem.
> Users might invoke the script from Linux or Solaris systems.
>
> Now the problem is, the Inline module will use an MD5 digest and caching
> to ensure that the C part is recompiled if changed. However, that also
> means that the the mechanism won't detect that the script is being
> invoked under different operating systems, so it will erroneously
> attempt to use the Linux shared lib on Solaris or vice versa.
>
> How can I avoid that in an elegant manner?
I wouldn't exactly call it elegant, but....
my $arch_version;
BEGIN {
use Config;
$arch_version = "./_Inline_" .
$Config{'archname'}.'-'.$Config{'version'};
mkdir $arch_version or die $! unless -d $arch_version;
};
use Inline C=> 'DATA', DIRECTORY => $arch_version;
Xho
--
--------------------
http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB