Reputation: 380
This is more an open discussion and a conclusion than a real question, hoping it can help someone sometime.
I was looking on how to make Perl module on an Internet disconnected server (otherwise the answer is quite simple: use cpan
), so the only option I have is to manually compile the modules downloaded from the Internet (CPAN or others) directly on the server.
The problem was that, on a standard Windows server, there is no compiler. So how do I make the modules?
Upvotes: 3
Views: 8247
Reputation: 126772
If you look in your Strawberry Perl installation folder you will see a number of useful utilities, including the compilers cpp.exe
, c++.exe
, gcc.exe
and make utilities gmake.exe
and dmake.exe
.
dmake
and gcc
together support the use of cpan
on your installation, and cpanm
is available as well.
For information on the general process of installing a module, take a look at perlmodinstall
Upvotes: 5
Reputation: 380
Guys behind Strawberry were smart by packaging among with Perl binaries all you'll need under the <Strawberry install dir>\c\bin
directory.
Then, to compile a Perl module offline directly on a Windows server, the process is quite simple :
.tar.gz
filecmd
in the module directoryperl Makefile.PL
dmake
, look if there is no errordmake test
, look if there is no errordmake install
, look if there is no errorAnd you should be ok !
Don't hesitate to complete this article or to ask your questions in order to improve it.
Upvotes: 2
Reputation:
Strawberry Perl includes the necessary compiler environment in the default installation, so compiling modules is no problem.
As for installing modules in an offline environment, I am highly partial to using cpanmini
. Basically, you create a minimal mirror of all of CPAN using a machine with internet access, then throw that onto your offline machine. Change the cpan
program's settings to point to this local mirror. Now you can install nearly any module just like normal with cpan
.
It may seem like overkill, but it is really very simple. The CPAN mirror takes up only about 2GB of space, which is nothing these days. You can put it on a USB stick, DVD, or whatever. And it is a once-for-all solution--the next time you want to install a module, it is already there.
Upvotes: 3