Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Can I rebuild/make a module

by 2007fld (Acolyte)
on Dec 15, 2010 at 21:55 UTC ( #877389=perlquestion: print w/replies, xml ) Need Help??
2007fld has asked for the wisdom of the Perl Monks concerning the following question:

I have a cutome-built Perl module, installed on a Solaris server. Now I need to install the module on a Linux server, but I don't have the built-tar-ball. The only thing I have is the module itself on the Solaris server.

Is it possible to build the module again and compile/install it on the Linux server?

Replies are listed 'Best First'.
Re: Can I rebuild/make a module
by Anonyrnous Monk (Hermit) on Dec 15, 2010 at 22:19 UTC

    If the module needs to be compiled, i.e. if it has an XS/C component, you'll need the sources to rebuild. In case it's pure-Perl, though, you can essentially just copy the .pm file(s) over to the Linux box (just mentioning the latter, because from your description I'm not entirely sure if it's in fact an XS module...)

Re: Can I rebuild/make a module
by sundialsvc4 (Abbot) on Dec 15, 2010 at 22:30 UTC

    A very good place to start would be to Google (and SuperSearch) on:   “non-root user.”

    It seems to me that what you’re contemplating is very similar to the situation that is faced when you are, say, installing a Perl-based website on a public server.   You’re not root, and you never will be (or at least, you do not wish for your actions to have system-wide reach), and what you want to do is to insert your own site-specific versions of certain CPAN modules.   You can do this, and you can set things up so that the cpan command does the heavy-lifting for you (including downloading tarballs, running the build and test processes, and so on).   There are many articles out there which are quite detailed.

    Most (but not all!) CPAN modules are aware of the environment in which they are being built, and will build themselves accordingly.   You can look at the “Dependencies” section of the pages at to see exactly which environments have been tested for a particular module, and how those tests turned out.

    If your custom module uses XS (that is, “C”) modules, which you custom-prepared for Solaris, then obviously you might have some code-monkeying ahead of you, to handle the inevitable differences between the two environments.   But most modules don’t use XS, and are actually pretty cross-platform.   (Cross your fingers... knock on wood.)

    It can, occasionally, get ugly ... where what you set out to do, actually is very environment-specific, and you actually have to redesign your application (or cobble together some kind of “glue” hack) to make it work.   (Not a fun thing to do, but you won’t be the first.)   At least you are moving from one “Unix-like” setup to another.   Where things tend to get really hairy is when you are moving to or from Microsoft Windows.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://877389]
Approved by mr_mischief
[Discipulus]: well.. the falling of the tpp is not such a bad thing..

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2017-01-24 11:28 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (204 votes). Check out past polls.