nsheth has asked for the wisdom of the Perl Monks concerning the following question:

Hi

I've installed the module Date::Simple, but when i use this module i get the below error message
Can't locate Scalar/Util.pm in @INC (@INC contains: C:/Program Files/P +erl/lib C: /Program Files/Perl/site/lib .) at C:/Program Files/Perl/lib/Date/Simp +le.pm line 46. BEGIN failed--compilation aborted at C:/Program Files/Perl/lib/Date/Si +mple.pm li ne 46. Compilation failed in require at C:\Data\Nirmal\perl\clearcase\oldv.pl + line 3. BEGIN failed--compilation aborted at C:\Data\Nirmal\perl\clearcase\old +v.pl line 3.
I've also tried with
sub BEGIN { unshift(@INC,"C:\Program Files\Perl\lib\CGI"); }
as util.pm lies under the CGI directory.

Please advise. Also is there any other way to install CPAN modules on windows

Regards
Sheth.

Code tags and formatting added by holli

Replies are listed 'Best First'.
Re: Install perl module on Windows
by marto (Cardinal) on May 30, 2006 at 09:40 UTC
Re: Install perl module on Windows
by displeaser (Hermit) on May 30, 2006 at 10:11 UTC
    Hi,

    If you are using the activestate distribution of Perl then you can use the PPM command from the command prompt.

    "ppm help" on the command line will show you how to use the ppm command.

    Hope this helps.
    Displeaser
Re: Install perl module on Windows
by Herkum (Parson) on May 30, 2006 at 14:12 UTC

    Looking at your installation error messages, I do have to wonder what version of Perl that you have installed, if you are using an older version you may not have Scalar::Util installed.

    Scalar::Util is also a module that really needs a c compiler to implement all the functions because they of the xs code. If you have an Activestate version of Perl installed on your system, be sure to upgrade to the most current version because Activestate will compile modules for you that use the XS code.

Re: Install perl module on Windows
by rjsaulakh (Beadle) on May 30, 2006 at 14:21 UTC
    you can use ppm to install the module in perl but for that

    u need to have a working internet connection . check to see if are using any http proxy server for internet access . if so you need to set http proxy while using ppm

    C:\> set HTTP_proxy=http://proxy:8080

    If your proxy or firewall requires a username and password, you will also need to set the environment variables 'HTTP_proxy_user' and 'HTTP_proxy_pass'. hope this helps