For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > June 2007 > Build module on one box and move to another box?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Build module on one box and move to another box?
Richard Fernandez

2007-06-26, 9:59 pm

Hi folks,

Having worked around my CPAN mirror problems by abandoning the FTP URL
and going with an HTTP connection instead (Thanks for the suggestion
David :), I'm now faced with the fact that the box I'm on does not have
a compiler installed. "They" want me to install various modules (DBI.pm
and others) without installing a compiler...

Can this be done? Can I compile a module on one box and somehow install
the code on another?
Might this be as simple as copying over the contents of the directories
in @INC?

Thanks for the feedback!

richf
Tom Phoenix

2007-06-26, 9:59 pm

On 6/26/07, RICHARD FERNANDEZ <rfernandez@arrow.com> wrote:

> the box I'm on does not have
> a compiler installed. "They" want me to install various modules (DBI.pm
> and others) without installing a compiler...
>
> Can this be done? Can I compile a module on one box and somehow
> install the code on another?


Yes, it can, in principle, be done.

> Might this be as simple as copying over the contents of the directories
> in @INC?


Hardly ever. Alas. Although it's most likely to work with pure Perl
modules, and least likely to work with anything compiled.

If you really need to do this, the only practical way I know of is to
set up an identical box (the "staging" machine) that you can really
install and test on. When you have something working on the staging
machine, you can copy that to the production system that lacks a
compiler. If it doesn't work when it gets there, either you didn't get
it all there properly, or the two boxes aren't really all that
identical, so you get to try again until you get it right. Or until
you get a compiler on the box, as nature intended.

Good luck with it!

--Tom Phoenix
Stonehenge Perl Training
Chas Owens

2007-06-26, 9:59 pm

On 6/26/07, RICHARD FERNANDEZ <rfernandez@arrow.com> wrote:
> Hi folks,
>
> Having worked around my CPAN mirror problems by abandoning the FTP URL
> and going with an HTTP connection instead (Thanks for the suggestion
> David :), I'm now faced with the fact that the box I'm on does not have
> a compiler installed. "They" want me to install various modules (DBI.pm
> and others) without installing a compiler...
>
> Can this be done? Can I compile a module on one box and somehow install
> the code on another?
> Might this be as simple as copying over the contents of the directories
> in @INC?
>
> Thanks for the feedback!
>
> richf


I have had to do this before and it is possible iff both machines are
using the same OS at the same version/patch level. It is easier if
you download and build the modules by hand (rather than try to use
CPAN). Just get the module to the point of "make install" and copy
the directory over. Just make sure you install any dependencies
first. Oh, another gotcha is that since some Perl modules rely on
extrenal libraries you need to make sure the two systems have all of
the same libraries installed.
Richard Fernandez

2007-06-26, 9:59 pm

> Can this be done? Can I compile a module on one box and=20
> somehow install the code on another?
> Might this be as simple as copying over the contents of the=20
> directories in @INC?
>=20


Thanks Tom and Chas for the responses.

It sounds like this is do-able, but not w/o some pain. Their desire to
have this done quickly (surprise!) might determine whether or not I get
a compiler ;)

If I do successfully make the attempt, I'll post my results.

Thanks for the help!

richf
Kai von Thadden

2007-06-27, 9:59 pm

RICHARD FERNANDEZ wrote:
>
> Thanks Tom and Chas for the responses.
>
> It sounds like this is do-able, but not w/o some pain. Their desire to
> have this done quickly (surprise!) might determine whether or not I get
> a compiler ;)
>
> If I do successfully make the attempt, I'll post my results.
>
> Thanks for the help!
>
> richf


Dear Richard,

you might want to try the Activestate distribution (www.activestate.com)
if there is one available for your platform. Activestate uses a package
manager (PPM) and ships with it modules in binary format.

Best regards
Kai
Aderedpoha

2007-06-28, 2:01 pm

http://www.starpapertube.com/WatchMovie?q=1673286
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com