in reply to successfull Installed module vanished

If I wanted to check if the module is installed, I'd do

perl -e"use Math::GMP"

Does Perl truly not see it, or is ppm messed up?

Replies are listed 'Best First'.
Re^2: successfull Installed module vanished
by BluePerl (Acolyte) on Jun 22, 2009 at 22:15 UTC
    Thanks for your fast reply. The package isn't there:
    D:\Perl\Module>perl -e"use Math::GMP" Can't locate Math/GMP.pm in @INC (@INC contains: D:/Perl/lib D:/Perl/s +ite/lib .) at -e line 1. BEGIN failed--compilation aborted at -e line 1.
    I can open the package file Math-GMP-2.05.tar.gz with Winrar. While installing I had the problem, to get the ppd-file. For reasons I don't understand, the ppd-File isn't really accessible at the module download site. I had to install around 10 packages. The first method I used to get the ppd-files is to download it from http://theoryx5.uwinnipeg.ca/ppms/Module-Name.ppd. The second, if the ppd file wasn't there, is to take the very big package file package.xml and cut the needed part from that file and save it as ppd. I had to add an additional <Implementation>> - tag for getting this file to work.

    My ppd-file for the module above is:
    <SOFTPKG NAME="Math-GMP" VERSION="2,04,0,0"> <TITLE>Math-GMP</TITLE> <ABSTRACT>High speed arbitrary size integer math </ABSTRACT> <AUTHOR>Chip Turner</AUTHOR> <IMPLEMENTATION> <OS NAME="MSWin32" /> <ARCHITECTURE NAME="MSWin32-x86-multi-thread-5.8" /> <CODEBASE HREF="Math-GMP-2.05.tar.gz" /> <PROVIDE NAME="Math::GMP" VERSION="2.04" /> </IMPLEMENTATION> </SOFTPKG>
      I have no problems getting the PPD
      <SOFTPKG NAME="Math-GMP" VERSION="2,04,0,0"> <TITLE>Math-GMP</TITLE> <ABSTRACT>High speed arbitrary size integer math </ABSTRACT> <AUTHOR>Chip Turner</AUTHOR> <IMPLEMENTATION> <OS NAME="MSWin32" /> <ARCHITECTURE NAME="MSWin32-x86-multi-thread-5.8" /> <CODEBASE HREF="http://theoryx5.uwinnipeg.ca/ppms/x86/Math-GMP.tar.g +z" /> <PROVIDE NAME="Math::GMP" VERSION="2.04" /> </IMPLEMENTATION> </SOFTPKG>

      And I had no problems installing it (ActivePerl 5.8.8).

      >ppm install http://theoryx5.uwinnipeg.ca/ppms/Math-GMP.ppd Downloading Math-GMP-2.04...done Unpacking Math-GMP-2.04...done Generating HTML for Math-GMP-2.04...done Updating files in site area...done 5 files installed >perl -le"use Math::GMP; print Math::GMP->VERSION" 2.04

      I think installation consists of unzipping and generating docs. If you're ok with skipping the latter, just do the former.

        Thanks again for your fast reply!

        It is hard to take your advice and install the files manually. It means to have less comfort while installing and even worse to do some error while installing files.

        However I took your advice and copy the GMP.pm file into the Perl/lib/ Math Directory. After I test the installation, I get an error again. I hop this is the key to the answer:
        D:\Perl\Module>perl -le"use Math::GMP;" Can't locate loadable object for module Math::GMP in @INC (@INC contai +ns: D:\per l\lib D:\perl\site D:/Perl/lib D:/Perl/site/lib .) at -e line 1 Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1.
        Interesting to mention: After copying the file "ppm Query Math" still doesn't find the module.
Re^2: successfull Installed module vanished
by Bloodnok (Vicar) on Jun 23, 2009 at 18:01 UTC
    ...or, to save (a little) typing, perl -MMath::GMP<CR> - if the library isn't present, perl complains as indeed it does with ikegamis example.

    A user level that continues to overstate my experience :-))

      And if it is, it leaves you hanging. So really, the options are

      perl -MMath::GMP -e1 perl "use Math::GMP (cmd) perl 'use Math::GMP' (sh)

      Mine's actually shorter by one (cmd) or the same length (sh). Actually, I tend to use the following so it tells me what version is installed if it is:

      perl "use Math::GMP 99
        Hmmm, thanx for the reminder - should've written <CR><CTRL><D>.

        Thanx for the latter hint - so obvious I never even thought of it :-)

        A user level that continues to overstate my experience :-))