[TriLUG] cross compile perl modules from Linux to Solaris?

Michael Peters mpeters at plusthree.com
Thu Mar 19 11:49:14 EDT 2009


Barry Gaskins wrote:
>    I thought that perl was an interpreted language and that the perl
> scripts and modules are just text files.
> 
>    Maybe I am just showing my ignorance...

Yep :) Pure-Perl modules are just text, but like most interpreted languages 
(Python and Ruby) you can write extensions in C for more speedup. When you use a 
module from CPAN most of the time it's invisible as to whether it uses C or not. 
If it does contain C it's compiled as part of the normal installation process 
and it means you can't simply copy the resulting files across OS/architecture 
boundaries.

But to be honest I wouldn't recommend going the cross compile route. Why not 
just compile them on Solaris? Trying to manage and cross-compile all of the 
module's dependencies seems like a nightmare. Not only do you have to worry 
about OS/arch compatibility but also Perl version compatibility since not all 
versions of Perl are binary compatible.

-- 
Michael Peters
Plus Three, LP




More information about the TriLUG mailing list