Installing Class::Inspector Perl module - perl

I am a windows 7 (64 bit) user. I was trying to install Class::Inspector module in Perl. However it requred Nmake15.exe. I have tried to download the exe and when I run it, there is an pop up message stating that
The program or feature Nmake15.exe cannot start or run due to incompatibility with 64-bit versions of Windows
Could anyone advice on this? Thanks. This is a pre-requisite module required by SOAP::Lite.

nmake 1.5 is very old, and getting a modern version involves installing the massive Visual Studio suite. As an alternative, you can use dmake which works just as well.
In addition, your version of ActivePerl is quite out of date. I believe more recent versions now ship with a make program and will run much better on Windows.
Finally, Strawberry Perl is in many ways a better distribution of Perl on Windows. It comes with a complete Perl module build toolchain including dmake and a C compiler. You should be able to install most modules on CPAN using its preconfigured CPAN shell.

Class::Inspector is a pure-Perl module. Therefore, you could easily install it by copying the contents of the lib/ directory into one of your #INC paths.
This does not solve your problem with installing modules in general, though. That's why you should install a 64 bit version of nmake. By installing the Windows SDK, the nmake utility will be available at "C:\Program Files (x86)\Microsoft Visual Studio...\VC\bin\amd64\nmake.exe" (microsoft.com).

Related

Perl Module install error CPAN Spreadsheet::ParseExcel

hi am trying to install perl module from cpan in my windows machine am getting below error after hitting two times yes .
Checking if your kit is complete...
Warning: the following files are missing in your kit:
README
Please inform the author.
Writing Makefile for Digest::Perl::MD5
'nmake' is not recognized as an internal or external command,
operable program or batch file.
nmake -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
Running make for D/DO/DOUGW/Spreadsheet-ParseExcel-0.65.tar.gz
Is already unwrapped into directory C:\Perl\cpan\build\Spreadsheet-ParseExcel
0.65
CPAN.pm: Going to build D/DO/DOUGW/Spreadsheet-ParseExcel-0.65.tar.gz
'nmake' is not recognized as an internal or external command,
operable program or batch file.
nmake -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
>perl exceltoxml.pl
Can't locate Spreadsheet/ParseExcel.pm in #INC (#INC contains: C:/Perl/site/lib
C:/Perl/lib .) at exceltoxml.pl line 4.
BEGIN failed--compilation aborted at exceltoxml.pl line 4.
I have tried 5 times.
nmake' is not recognized as an internal or external command
Sinan Ünür is right. The error message is that you don't have nmake installed. This means you are attempting to compile code (probably C code) and there's no C compiler or Make program.
A while ago, I would tell people that ActiveState doesn't fully support cpan because it can't compile code. ActiveState uses it's own pre-compiled packages available via the Perl Package Manager (PPM) which can be used from the command line or from a GUI interface. If a package isn't available via the PPM and it requires compilation, you were just out of luck. I would usually recommend Strawberry Perl instead of ActivePerl for this very reason. Strawberry Perl comes with the complete MinGW environment needed for those compilable CPAN modules.
However, about a half a dozen years ago, ActiveState put together an installable PPM package for the MinGW environment. Once this is installed, ActivePerl can use CPAN.
So you have two solutions:
Install this PPM package as Sinan Ünür mentioned in his answer. Then, try Spreadsheet::ParseExcel again.
Install Strawberry Perl instead of ActiveState's Perl. Strawberry Perl seems to be more compatible with the version of Perl found on Unix/Mac/Linux systems. Then try installing the Spreadsheet::ParseExcel package.
Okay, three solutions: Install Cygwin which will give you the complete Linux Environment on your Windows machine. It can take about two hours to install, but it comes with all of the GNU utilities you've known and love, most other Unix/Linux utilities, and the BASH shell.
It's what a lot of Linux/Unix homeboys use when they get sick of that ol' C:\> prompt. Cygwin comes with the latest version of Perl and works with every single CPAN package I've tried. There are a few minor issues (Like Termcaps) where things don't quite work the way they're suppose to, but I'm generally happy with it. It even comes with X11 and allows you to run XWindow apps, and even use XWindow apps across systems -- just like a REAL operating system does!
There maybe a few instances where CPAN modules may still have issues on Windows. One has to do with archiving and unarchiving modules and the missing libz library. However, installing this MinGW package (or using Strawberry Perl or Cygwin) will solve about 95% of the cpan installation issues.
I have tried 5 times.
Computers are deterministic things. That means, unless you change the conditions under which a program runs, it will always do the same thing (except, maybe, if there is a solar flare or an EMP).
So, there is no difference between issuing the same command once versus five times. If it failed the first time, ceteris paribus, it fill fail all five times.
That said, it looks like you installed ActiveState Perl, but did not install the MinGW package which provides the gcc & dmake based build tools.
So,
C:\>ppm install MinGW
and then try to install packages.
You also have the option of building your own perl using the Community Edition of Microsoft Visual Studio 2013 tools, or any other supported compiler.

Changing installation directory of CPAN perl module using MinGW

I installed MinGW for installing perl modules from CPAN. after successful installation in C:/MinGW, I started msys.bat typed
cpan
cpan> install File::List
The module installed successfully. But it is not found in lib or site directory of c:/perl.
It is installed in C:\MinGW\msys\1.0\lib\perl5\site_perl\5.8\File instead.
How could I change the installation directory of CPAN modules to c:/perl/site or c:/perl/lib?
I used all default setting of MinGW. OS is Windows 7. Perl version 5.12.2.
"How could I change the installation directory of CPAN modules to c:/perl/site or c:/perl/lib?"
It's not clear to me why you would want to do that. If you used MinGW to install modules from CPAN, it is presumably because you want the advantages of the MinGW toolset (as described at
http://mingw.org/). And MinGW presumably knows what it is doing when it installs in the directory you cited.
If you really want to install to c:/perl/site or c:/perl/lib, you should probably use the cpan client that comes with Perl itself.
I figured out the problem. I don't have Microsoft Visual C++ redistributable 2008, 2010. I installed it and my problem is solved. May be Perl module builds which requires C compiler required this components.
Anyone ever have similar experience?

Failed to install Tk module of Perl in Windows7

At first,I tried to use ppm and cpanm to install Tk module.But failed to download whth the reason which i don't konw(yet i can install image module) .So I tried another way.I downloaded the Tk-804.030 from the cpan website.And unpacked it.Then I type "perl makefile.pl" in the cmd, howerver, shit happens.There were so many errors.And i remenbered to read the README.txt, so i found the following which make me frustrated.
When you install ActivePerl, it provides patched C runtime as PerlCRT.dll
which it installs in the "system32" directory.
This needs "administrator" rights on NT.
It also provides the import library PerlCRT.lib, but this is installed
in an odd location e.g. C:\ActivePerl\lib\CORE\PerlCRT.lib
where it is not found by MakeMaker or VC++.I copied it to C:\VisualStudio\VC98\lib\PerlCRT.lib
(Your paths may vary dependinh where you installed ActivePerl and VC++.)
I could not find the PerlCRT.dll and PerlCRT.lib in my computer, i googled and found PerlCRT.dll which could be downloaded, but i counld find PerlCRT.lib to download.i don't kown how to do it, i really need some help.It couldn't be better if you can tell me the whole installing procedure. ( I'm new to Perl, and I use Win7, visual studio 2012 and MinGW as well)
See PPM Tk info page, the distro fails to build on the current versions of ActiveState Perl for Windows. You can add the 3rd party Bribes repository, Tk is available there.

installing wxPerl on strawberry

I am trying to install wxperl on strawberry. I can't install Alien::wxWidgets. I tried everything I can think of. Usually I get an error like this one:
Creating library file: ..\..\src\stc\..\..\..\lib\gcc_dll\libwxmsw28u_stc.a
compilet.exp:fake:(.edata+0x3c): undefined reference to `boot_compilet'
compilet.exp:fake:(.edata+0x40): undefined reference to `boot_compilet'
I don't know what that means. I tried with wxWidgets v 2.8.12 and 2.9.3 and various options. I started with cpanm and later evoking perl Build.PL manually with all kinds of options.
I am on Windows 7 64 bit. I tried with 5.14.2 32bit and 64bit. I am pretty sure that my path has no other perl installation than the one I currently using.
Any ideas? Thanks!
Using strawberry-perl-5.16.3.1-32bit on Windows 7.
It seems that even though the build process crashes with the error message above, Alien::wxWidgets has, in fact, been successfully made, and is ready to install.
Got the same error message building Alien::wxWidgets from SVN trunk. I ran 'build test' and the tests passed so I ran 'build install'. Wx compiled successfully, all tests passed. Padre editor compiled successfully, all tests passed, and it works well.
It is also possible to install via PPM in Strawberry perl:
ppm set repository wxPerl http://www.wxperl.co.uk/repo29 (for WxWidgets-2.9.4)
ppm install Alien::wxWidgets (version 0.61)
Unfortunately, the latest version of Padre editor requires Alien::wxWidgets 0.62, so building Alien::wxWidgets from source is necessary to make Padre from CPAN.
Alternately, you can use the Citrus Perl distribution created by Mark Dootson. One caveat, the version of Perl, 5.16.1, is not the latest, but it is more recent than DWIM Perl build of Strawberry Perl 5.14.2.1 RC.
I would recommend using the latest Strawberry Perl 5.16.3, or 5.14.4.1 for security reasons because it has a a fix for the rehashing flaw which could be used for denial of service attacks. Described here:
http://www.vuxml.org/freebsd/CVE-2013-1667.html
One idea is to install DWIM Perl, which is a Perl distribution which contains Strawberry preloaded with a whole lot of commonly used CPAN modules, and includes Alien::wxWidgets.

Cygwin hangs on Perl script: Nothing seems to fix

I'm running Windows 7 64 bit, which seems to be part of the problem. At first my cpan would hang when I would try to install CPAN from the shell prompt.
I tried restarting my computer, and a variety of attempts to use rebaseall and peflagsall from ash- even starting a new base for the dll's (the command was something suggested on a cygwin mailing list- something like rebaseall -vb 0x730000).
Should I just uninstall Cygwin and try to do a total reinstall? I have all the dependencies that cpan should need (i.e. gcc-4).
I'm getting pretty desperate here- I'm getting error messages that talk about failed dlls if I try to use modules installed from CPAN (specifically, JSON::XS).
Any help you could offer would be fantastic.
Thanks!
The complaining about missing dlls when installing is a known bug I believe, and appears for a lot of modules. Most modules are still installed and still work however. In my experience, you need to force install most modules as well, as there is almost always some test that fails.
While I personally prefer perl from the cygwin environment, there is one good reason for installing Strawberryperl; the need for 64 bit support which cygwin does not support. If you are going to work with large XML data structures using XML::Simple for instance, the 1.5-2GB that 32-bit Windows support will not take you far, and Strawberryperl will come to your rescue. And thanks to perl portability, and apart from keeping two sets of perl's installed on the same computer, the is no problem doing development using cygwin, and then running it "in production" using 64-bit Strawberryperl.
Are you installing cygwin and then building Perl on top of that? You will be far more successful if you use Strawberry Perl which comes with its own cygwin environment that will allow you to build and install most CPAN modules if you need them
I suspect the problem you're hitting is the difference between the regular shell (which will normally be bash and give you a $ prompt on Cygwin) and the cpan shell (which will give you a prompt like cpan[1]>).
In the cpan shell, install CPAN will refresh a bunch of Perl scripts from the CPAN repository. From a bash shell, install CPAN just doesn't make sense: install is a program for installing packages you've just built; it has nothing in particular to do with Perl or with how you install packages on Cygwin.
You can enter the CPAN shell by running cpan at bash shell prompt. But I don't think that's what you need. What you actually want to do is just run the following:
cpan JSON::XS