http://www.perlmonks.org?node_id=11127429


in reply to Re^3: Installing (lotsa) modules
in thread Installing (lotsa) modules

Would modules that are not pure Perl still need a working compiler on the target machine?

Sure. All that a bundle does is to depend on a lot of other packages (those listed in the bundle), and so CPAN.pm just installs the dependencies as usual.

Or could they be complied on the donor machine and bundled onto the target machine fully formed?

Yes and no. Usually no, except when you build an entire distribution or when "donor" and target machine run exactly identical software. "Binary" modules (those using XS) usually not only depend on the exact perl version and its configuration, but usually also on the exact library versions they were linked against, and on their configurations. So if you can make perl and all libraries on the target the same as on the "donor" machine, copying will very likely work.

If you look at any binary Linux distribution (e.g. Debian, Redhat, Ubuntu, Slackware), you can see why they can distribute compiled perl modules: The distribution development team controls compiler, libraries, perl, and perl modules, both versions and configurations. The packaging system has its own way of dependency tracking, and takes care of either updating a perl package after a library was updated, or keeping an old version of the library around for a perl package.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)