Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- using CPAN to install pm to Strawberry Perl
June 18, 2013, 6:16 pm
rate this thread
This is perl 5, version 14, subversion 2 (v5.14.2) built for MSWin32-x86-mu
I'm using 'cpan' to do the install.
The OS is Microsoft Windows Server 2003 up to date
Server is a file server, part of a Windows domain, not a domain controller.
This is a clean install of DWIM Perl though I have installed and uninstalle
d the language file several times attempting to get this install happy.
The reason I'm trying to install this pm is that I have a script, originall
y developed for Perl 5.8.822, which uses the components of this pm to my gr
eat advantage to query and return data related to file storage for users we
want to archive files for so we can remove the user accounts from our doma
From the 'cpan' prompt I'm issuing the command 'install Win32::DirSize
The output of the run from this command indicates that the name is being ch
anged to 'Win32DirSize'.
I have read the output from the perllocal.pod. According to it the file wa
s installed into C:\Dwimperl\perl\site\lib>, however when checking there I
find there is no folder with this name, no pm installed in the lib folder a
nd no folder installed in the Win32 folder. Checking in the folder 'auto'
in the lib directory I do find a folder for Win32DirSize with a single file
named .packlist of zero file size.
I checked in the C:\Dwimperl\cpan\build directory and do find a folder for
Win32-DirSize-1.13-JNinsi and an associated .yml file. The folder contains
a Win32 folder, which contains a DirSize folder which contains several fil
es including the DirSize.pm file.
The file Win32-DirSize-1.13-JNinsi.yml contains several lines of output sim
ilar to this:
The first word in the line is different as in 'make', 'maketest', 'test'.
It appears that the normal process to install the program module failed for
If possible I would really like to use this program module. I have attempt
ed several different ways to manually move the pm file to the same folder i
t existed in, in the install I had of Perl 5.8.822 but all attempts have fa
iled. My Perl script will not compile failing to load and use a constant f
rom the .pm.
If this module will not work with Strawberry Perl I just need to know so I
can stop bashing my head into this wall and try a new one. If it will work
, then some help with the 'cpan' documentation to learn how to correctly in
stall the program module would be welcome.
I noticed that one of the lines in the file, on closer reading, indicated t
hat to install it depended on MakeMaker so I have recently installed that.
I reran install Win32::DirSize. The output from the install command in cp
an indicated that the install had already occurred and there was nothing to
Hope someone will help.
Re: using CPAN to install pm to Strawberry Perl
I'm not surprised the automatic installer is having trouble: that
distribution is malformed. The Makefile.PL and other files which should
be at the top level are instead under a Win32/DirSize directory. I would
recommend manually deleting that Win32DirSize directory under lib\auto
and then installing the module by hand; that is:
- Find a copy of the tarball (either find the one cpan downloaded or
download it again from search.cpan.org) and untar it somewhere.
You could also use 'look Win32::DirSize' from the CPAN shell.
- Change directory to the Win32\DirSize directory inside the
unpacked tarball (there should be a Makefile.PL in that
- Make sure the Strawberry stuff is in your PATH and run the usual
As a general recommendation, not connected with this issue, I would
suggest that anyone maintaining a Perl installation using CPAN directly
should take a look at App::cpanminus. IME it works better than CPAN.pm.