Can't install Carp-1.25 - perl

I have installed Strawberry Perl for Windows, "DWIM Perl" from: http://dwimperl.com/.
I would like to use Carp. So I have downloaded Carp-1.25 from CPAN, un-TAR-ed it, and ran nmake.
I get:
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
to undefined at F:/Dwimperl/perl/lib/ExtUtils/Install.pm line 1208
NMAKE : fatal error U1077: 'F:\Dwimperl\perl\bin\perl.exe' : return code '0x2'
Stop.
Note that it's not a Windows nmake problem, I get a similar error when running make in cygwin.
My system: MS Windows 7.
(By the way, I have been running ActiveState Perl fine, and there, PPM downloads and installs Carp with no problem.
The reason I've switched to Strawberry/DWIM Perl, is that I'd like to run a debugger, and Padre's latest version on ActiveState is 0.86, which is buggy. So I've installed DWIM Perl since I'd like to use Padre 0.92).

Carp is a core module so it be included with your Perl installation. Just try use Carp in your code.

and ran nmake.
why use nmake? DWIMPerl( StrawberryPerl) is not known to come with nmake, generally they come with dmake, and AFAIK, their documentation reflects this

Carp comes with your Perl distribution, it is a core module. corelist (offline version) shows you the standard modules that come with various Perl versions. You'll see that Carp comes with all Perl versions as far back as 5. There's nothing to download. Just use Carp. One of the hard things to understand about Perl for many people is that certain functionality doesn't exist except in modules, but these modules come with Perl anyway. I've seen a lot of people use system cp or system find because they didn't realize that Perl comes with a module to copy files or to search a file in a directory tree. It's in a module that you have to use.
Try using the cpan command to download your modules. The cpan command will search for, download, compile, test, and install any module you need. One of the reasons people use Strawberry Perl over ActivePerl is that, historically, the cpan command worked better on Strawberry Perl than on Active Perl.

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.

How can I install Perl on Windows 8?

I want to use Perl for web development. I have tried to find out how to install it but when I tried to get ActivePerl it wouldn't install on Windows 8. Can anyone tell me how to install Perl on Windows 8? I can go for ActivePerl, Strawberry Perl, or any other Perl release as long as it will work on Windows 8.
As you already know, there are two generally used Perls in the Windows World:
ActivePerl from ActiveState.
Strawberry Perl which is an open source project started by Adam Kennedy -- a big honcho in the Perl community.
What's the big difference between them:
ActiveState Perl was designed to be a Perl solution specifically for Windows (and later both Macs and Linux). ActiveState offers a very nice Perl IDE called Komodo and has excellent Perl support. All you need is some cash. After all, that's how ActiveState makes its money. Of course, you can use EPIC instead of Komodo and get a lot of help from StackOverflow too.
ActiveState comes with the default Win32 modules already installed and also supplies a Perl Package Manager (PPM) instead of using CPAN for installing other CPAN modules. PPM has a nice GUI interface, and its modules have already been precompiled and tested. It also is a bit better than CPAN with dependency tracking. Of course, there might be some CPAN modules not in PPM, and that can be an issue.
Strawberry Perl was started to be more Open Source oriented than ActiveState. By default, Strawberry Perl comes with a Make program and a complete development environment, so that almost all CPAN modules are available and can be installed. This is because Strawberry Perl comes with the complete MinGW package which includes Make and a gcc compiler. The idea was to give Perl people who mainly use Linux and Unix machines a similar feeling solution for Windows.
In reality, both are pretty similar. ActiveState comes with the Win32 modules, but you can install them as needed on Strawberry Perl via CPAN. Strawberry Perl works with CPAN, but ActiveState gives you complete directions for installing the same MinGW environment that Strawberry Perl uses (via their PPM) which allows you to install all CPAN modules that Strawberry Perl can install. ActiveState comes with a GUI Perl Documentation that includes all installed Perl modules, but the perldoc command gives you the same information anyway.
So, if you're more Linux/Unix oriented and want something that feels very similar on Windows, go with Strawberry Perl. If you are using Perl as a Win32 solution, go with ActiveState. And, don't worry about choosing the wrong one. In the end, Strawberry Perl can include all those nice Win32 modules, and ActivePerl can use CPAN.
There is another SO posting that you might find what you're looking for here. A similar posting. In sum, I get the impression that Strawberry Perl would work alright, and so would ActivePerl. I rather liked Strawberry Perl, and it was so long ago that I installed it on my wife's Windows Vista machine that I can't remember why I chose it over ActivePerl, ymmv. CHEERS!

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.

Isn't List::Util part of Standard Perl Distribution?

On a certain system, I am running a perl script and it's failing by saying
Can't locate List/Util.pm in #INC (#INC contains: <Some-Path>/ActiveState/perl/lib <Some-Path>/ActiveState/perl/site/lib .) at <Some-Other-Path>\searchCobolPgms.ps line 7.
Now the strange part is that before deploying the code into the failing system, I ran it on my laptop and it just ran fine. The difference in both the system is, in my laptop I am using Cygwin and perl is bundled with it and the said failing system has ActiveState perl.
<Some-Path>perl -v
This is perl, v5.6.1 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2001, Larry Wall
Binary build 635 provided by ActiveState Corp. http://www.ActiveState.com
Built 15:34:21 Feb 4 2003
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.
I then searched for Util under the lib of cygwin and it was present under i686-cygwin
c:\cygwin\lib\perl5\5.10>find . -name Util.pm
./CGI/Util.pm
./i686-cygwin/Hash/Util.pm
./i686-cygwin/List/Util.pm
./i686-cygwin/Scalar/Util.pm
So now I am confused. Isn;t List::Util part of the standard perl distribution?
The Reason for my confusion
List/Util.pm is present under i686-cygwin
ActiveSync Installation was not having List/Util.pm
List::Util was only added to core in 5.7 (a development version) and the first stable release of perl containing List::Util was 5.8.0. So, while it is in the perl 5.10 distro you have installed under cygwin, the perl 5.6.1 ActiveState executable you called does not have it. You should update the ActiveState perl to at least 5.8.0, and then it will have the module you need.
Here is a link to find all versions of perl that contain a core module: http://perlpunks.de/corelist/version?module=List%3A%3AUtil
When I check corelist I get:
corelist List::Util
List::Util was first released with perl v5.7.3
Your perl version seems to be 5.6.1, in which case List::Util would not be part of the core installation.
Judging by the path c:\cygwin\lib\perl5\5.10, it seems your cygwin version is at least 5.10, but as you will note, the cygwin path is not in the #INC of your other perl version. They are most likely separate installations, and therefore they do not share libraries.
Update your ActiveState perl, and all should be well.

Windows equivalent of perl modules required (not available in activestate ppm) such as file::finder

I'm attempting to import code written in linux into eclipse's perl plugin 'epic', and have installed activestate perl in windows. Most of the modules have an activestate equivalent, but some of them I can't find in ppm. Does anyone know how I can get the following modules so that the code can compile?
File::Finder
Spreadsheet::WriteExcel::Utility
Sybase::CTlib
Sybase::DBlib
Sybase::Xfer
Template
Template::Constants
DBD::Sybase
File::Rsync
PerlIO/gzip
The best option is probably to remove Active Perl and replace it with Strawberry Perl. Because the Strawberry Perl installation includes a compiler, you are able to install most CPAN modules using the standard CPAN shell.
Trouchelle to the rescue!
http://trouchelle.com/perl/ppmrepview.pl?l=Template-Toolkit&v=10
The other modules cannot be built because of test failures or missing libraries.
i downloaded the File:finder module from cpan and was able to install successfully in the windows.
Only difference is we need to use nmake instead of make.
You can download perl modules from https://metacpan.org/ and then compile the same in windows.