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

Hello!

Perl 5, Version 12, subversion 3 running on Windows Vista.

I am not able to use CPAN to install perl modules because there seems to be a firewall. So, I decided to try out PPM. I found an online reference on how to install the Date::Calc module using PPM but I am getting an error.

Here are the steps that I took.
Step 1: I went to CPAN.org and downloaded the latest version of Date-Calc-6.3.tar.gz file.

Step 2: Unzip the file and save it to the directory C:/perl/sysfiles

Step 3: Open a cmd window and type in ppm.

Step 4: In ppm, I perform the following actions:
PPM> set repository Local C:\sysfiles\perlmod
PPM> set repository --remove ActiveState Package Repository
PPM> install Date-Calc

However, I get the error shown below:

PPM> install Date-Calc
Install package 'Date-Calc?' (y/N): y
Installing package 'Date-Calc'...
Error installing package 'Date-Calc': Could not locate a PPD file for package Date-Calc
PPM> install Date-Calc-6.3
Install package 'Date-Calc-6.3?' (y/N): y
Installing package 'Date-Calc-6.3'...
Error installing package 'Date-Calc-6.3': Could not locate a PPD file for package Date-Calc-6.3
I also tried doing the steps above with a directory that I saved on my desktop and I get the same error.

Any Suggestions?

Thanks,
TazEngr

Replies are listed 'Best First'.
Re: Could Not Locate a PPD File
by moritz (Cardinal) on Feb 25, 2012 at 12:04 UTC

    The ppm package manager does not work with source tarballs (.tar.gz), but rather with pre-package binary packages (.ppd)

    So either find a PPD file for the package you want to install, or don't use PPM, but rather a CPAN client (like cpan, cpanm or cpanp.

    If you but search for it, you'll find many tutorials on how to install CPAN modules.

Re: Could Not Locate a PPD File
by tommyxd (Acolyte) on Feb 25, 2012 at 12:53 UTC

    From your post it seems that you're using ActiveState Perl, which comes with its own package manager. To install new packages just start the built-in Perl Package Manager and type in the name of the package you want to install. Mark it for installation and it should do all the job for you.

    Here's how that should look.

    Hope that helps!

Re: Could Not Locate a PPD File
by ww (Archbishop) on Feb 25, 2012 at 15:07 UTC

    ... or, use PPM from the command line:

    C:\ppm search Date::Calc Downloading ActiveState Package Repository packlist...done Updating ActiveState Package Repository database...done Downloading trouchelle packlist...not modified Downloading 1400.perl packlist...failed 500 Can't connect to ppm1400.p +erl.info.pl:80 (timeout) # s +**t happens Downloading log4perl packlist...redirect Downloading log4perl packlist...done Downloading log4perl Log-Dispatch-FileRotate PPD...not modified Downloading log4perl Log-Dispatch PPD...not modified Downloading log4perl Log-Log4perl PPD...done Downloading log4perl Params-Validate PPD...not modified Downloading sisyphusion packlist...not modified Downloading wxperl packlist...not modified Downloading bribes packlist...done Updating bribes database...done 1: Date-Calc Gregorian calendar date calculations Version: 6.3 Released: 2009-10-31 Repo: ActiveState Package Repository 2: Date-Calc Gregorian calendar date calculations Version: 6.3 Repo: trouchelle C:\ppm install 1 # install "1" (from AS) rat +her than "2 Downloading Date-Calc-6.3...done # makes no difference here, + but sometimes Unpacking Date-Calc-6.3...done # repositories will have di +fferent vers. Generating HTML for Date-Calc-6.3...

    and, BTW, if you goof, PPM will generally save you and say  Run 'ppm help' to learn more.. HTH

Re: Could Not Locate a PPD File
by Anonymous Monk on Feb 25, 2012 at 22:48 UTC

    I am not able to use CPAN to install perl modules because there seems to be a firewall.

    If there was a firewall, PPM would have the same exact issue as cpan

      In that case, download the .ppd file and use "sneaker net" to get it to the target machine. Then use ppm command line to install the module.
        Thanks for all of the comments!
        I was not able to find a ppd file to download for the Date::Calc module. I ended up just going to the cpan website and copying and pasting the cacl.pm code. I then saved it in a directory that I created, C:\strawberry\perl\lib\Date.
        After that I ran a perl scrip that called the date calc module with the line of code:
        use Date::Calc;
        After that I just resolved the dependencies one by one.
        This solution is probably not feasible nor advisable for larger modules that have many dependent modules but it seems to be working for the Date::Calc module.
        Once Again Thanks!