Re: Basic FAQ: how to setup local 'environment' to build CPAN modules under strawberry
[email protected] (kmx)
| Newsgroups | perl.win32.vanilla |
|---|---|
| Message-ID | <[email protected]> |
Hi Linda, > I'm new the the strawberry distro, and need to install a bunch of > CPAN modules. It doesn't seem that it comes with the necessary > build utils to do so. > > Is there a single-install that would install all the needed utils > to build the CPAN modules? All the required tools (compiler, linker & co.) comes with strawberry perl, they are installed always (you cannot choose not to install them) - so providing you have installed 64bit strawberry perl (5.12.x) you have installed all you need for building CPAN modules. Depending on what installation procedure you have chosen - ZIP, MSI - there might be a trouble with properly set PATH env variable. Open a command prompt window (cmd.exe - neither powershell nor anything else) type "set" and check whether you have the following dirs in your PATH (in given order): c:\strawberry\perl\site\bin c:\strawberry\perl\bin c:\strawberry\c\bin (replace "c:\strawberry\" with a dir into which you have installed strawberry perl) From the same command promp you can check: 1. command "gcc --version" should return "gcc (GCC) 4.4.3" 2. command "perl -V:myuname" should return "Win32 strawberryperl 5.12.... x64" 3. command "dmake -V" should say "dmake - Version 4.12 (Windows / MinGW)" To install any module from CPAN run from the same command prompt: c:\> cpan -i Module::Name (CPAN client in strawberry perl comes pre-configured, no need to setup anything) If you want do download and install a module manually it works similarly as in cygwin just use "dmake" instead of "make" - so from command prompt: c:\module-src> perl Makefile.PL c:\module-src> dmake c:\module-src> dmake test c:\module-src> dmake install > All that said -- my real preference would be that all of strawberry and > the modules work on Win64, since I don't want to be limited to the 32-bit > sections of the registry and 32-bit redirections in the file system. Just keep in mind that some modules that work fine on 32bit MS Windows do not work well on 64bit MS Windows (check bug reports for particular module). > My biggest itch is in path separators. While many Win utils handle "/" > as well as "\", some don't. But even some (many?) system calls or api > calls handle either (registry accesses); apparently MS-internal > programmers found using '\\' all over the place as noxious as anyone > else. Given most of their code was in 'C'-syntax compat languages. The advice is simple - consistently use File::Spec functions/methods and your scripts will work (more or less) across platforms. > A 64-bit BASH replacement would be REALLY appreciated, since there's > already a 64-bit 'Console2' version that could be using it -- with that, > anything I call can run in 64 (or 32-bit) mode, though by default, any > progs I call from the 32-bit bash get invoked in a 32-bit form (if they > work at all). Many times, I am tracking down problems in scripts > and the problem is that they stem from the 32-bit shell having > invoked a 32-bit version of some program or worse -- some registry or > file subtree that is redirected for 32-bit progs -- making me waste time > trying to figure out why it isn't giving me the 'right' answer as I > look at the tree with other 64-bit tool....*face-slap*. If I can recommend - start using strawberry perl together with standard command prompt (cmd.exe), this way it is known to work - this way it is well tested. -- kmx