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

dear monks

I am new to perl and sometimes work on windows and sometimes on linux. I wanted to install xml::xpath for activestate perl.

In general, how do you know if a module is suitable for windows? For example, here is the page for the xpath module. How do i know its suitable for windows? http://search.cpan.org/~msergeant/XML-XPath-1.13/XPath.pm

I tried to install the package though the package manager ppm but the module wasn't in the list of available modules. How should i have updated the ppm repositories to make this module visible?

I installed the module from something i saw on the internet: C:\Documents and Settings\Administrator>ppm install xml-xpath I believe this is going to the active state repository. Is that correct? How do you know what modules are in the active state repositiry and what they are called?

I believe i could also have just downloaded and unzipped the code and copied it to the appropriate location (providing it is a pure perl module and suitable for window?)Is this correct? I don't install things very often and end up getting confused every time!

thanks a lot

Replies are listed 'Best First'.
Re: problem installing modules for activestate perl
by marto (Cardinal) on Dec 03, 2010 at 16:07 UTC

    Use PPM::Repositories to add repositories to PPM. ActiveState Perl ships with CPAN, so you can use it to install modules also. You will have to install MinGW (along with some other build tools) for building modules which aren't Pure Perl, via:

    ppm> install MinGW

    Then you could install using the CPAN client.

    See also Installing Modules from the tutorials section of this site.

Re: problem installing modules for activestate perl
by MishaMoose (Scribe) on Dec 03, 2010 at 16:17 UTC

    It has been my expereince that if the module has been ported successfully to a given release of Active State it will show up in the PPM repository. I have also found in the past that for some modules I really cared about that AS lagged significantly behind on updating their pacakges in the repository. I discovered that trying to build packages that were lacking was often a major pain or impossible with their set up 8^(. Buried in their webpges they do have a list of what modules have been ported to which OS's but that does not always match with what they make available. This lag on their part led me to switch to Strawberry Perl as it seemed to have no problem building packages AS would not. I really like AS perl but have found Strawberry to be a very adequate replacement thus far.

    I also imagine that the senior brothers and sisters here will have more specific and enlightening info than i have provided.

    I hope this has helped a bit. Good Luck

    Misha/Michael - Russian student, grognard, bemused observer of humanity and self professed programmer with delusions of relevance
Re: problem installing modules for activestate perl
by dasgar (Priest) on Dec 03, 2010 at 17:08 UTC

    Which version of ActiveState Perl are you using?

    From two different systems with different versions of ActiveState Perl (version 5.8.9, version 5.12.1 x86), I was able to find and install XML::XPath version 1.13 from ActiveState's repository using the the PPM in GUI mode.

    To use the PPM in GUI mode, you can type ppm in a command prompt and hit enter. When the PPM starts, it will automatically try to connect to the configured repositories to sync up its local database listing of the modules available in those repositories. (If you're behind a proxy server, you'll need to update PPM's configuration with the proxy server details so that it can connect to the repositories.) By default, the only repository configured is the ActiveState repository.

Re: problem installing modules for activestate perl
by elef (Friar) on Dec 03, 2010 at 21:01 UTC
    I tried to install the package though the package manager ppm but the module wasn't in the list of available modules

    You'll have to try and find a repository that does have the modules you need. Start the ppm gui (ppm in the console as suggested earlier), and click Edit/Preferences. The Trouchelle and Bribes repos, plus a few others may be preconfigured; if they are, you just need to enable them and gain access to many modules the AS repository doesn't have.
    This could be of interest: Unable to enable - trying to add repositories to PPM (ActivePerl 5.12)