Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

How to know if a module is for windows or linux ?

by exilepanda (Pilgrim)
on Feb 04, 2016 at 10:28 UTC ( #1154379=perlquestion: print w/replies, xml ) Need Help??

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

Dear monks,

I am working on Win7 with ActivePerl.Sometimes, I search for a module on CPAN, and found some good stuffs, then I want to install it.

Then I start ppm, and sometimes, the module I want just not on the list. I might guess, maybe I didn't have the repositories from a site that carrying that particular module, for this part, I have added bunch of them now, but still that happen the module not on the list.

Now I will try cpan TheModule... this trick will always have the module I wanted, but after a long long screen scrolled, it just tell me failed to install. In fact, I never have any successful installation of module via CPAN when I am using ActivePerl (but my gcc compiler, nmake etc are just all fine).

So, according to your experience, could you tell is this because the module is not for Windows ? or that module is not for ActivePerl ? or I missed something else ? And.. is that anyway I can know if a module only for particular OS on the CPAN site ( or view source of that module ) ?

Replies are listed 'Best First'.
Re: How to know if a module is for windows or linux ?
by davies (Prior) on Feb 04, 2016 at 10:46 UTC

    Since I wrote Installing Template::Toolkit on Windows, I've installed nothing but Strawberry (which coexists with AS very happily). A simple test is to install a copy of Strawberry, which contains its own C compiler & libraries, and see if the module you want will install on that. If it does, you know that the problem is with AS and that the module is available for Windows. But I've usually found it pretty obvious from the name or docs (Starman has a clear statement that it's Unix only) whether a module is for one OS (or group) only. As Corion says, it would be easier for us if you named the module. You might also have a look at BrowserUK's reply (Re: Installing Template::Toolkit on Windows) in my thread, in which he demonstrates another installation method using neither ppm nor CPAN.

    Regards,

    John Davies

Re: How to know if a module is for windows or linux ?
by Discipulus (Abbot) on Feb 04, 2016 at 10:50 UTC
    well, look at the error in the cpan output to see more closely which error reports, as wisely suggested.

    Anyway some module is not for every platform: when you are browsing CPAN, let's say for Win32::Daemon if you click in the distribution name you can access the Perl/Platform Version Matrix for that module. this can give you an idea before trying the install.

    I use StrawberryPerl portable since years and had very few problems with the cpan client: you can try if a particular module gives same problem on both Perls just to be sure that "gcc compiler, nmake etc are just all fine"

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Re: How to know if a module is for windows or linux ?
by Corion (Pope) on Feb 04, 2016 at 10:31 UTC

    During the CPAN installation process, there usually are error messages if it fails. Very often, reading these error messages helps in understanding where an error occurs.

    Most likely, the error is that you don't have the appropriate C library for the module installed. But as you don't tell us what module(s) you're talking about, it's hard to be more specific about the possible causes of failures.

Re: How to know if a module is for windows or linux ?
by VinsWorldcom (Prior) on Feb 04, 2016 at 12:06 UTC

    As Corion said above, you need to read the errors and let that help determine what the issue may be. It could be a permission thing (yes, even on Windows). I have a Win7 machine that works just fine - I'm an admin. But my work Win7 machine (where I'm not admin) will not let me install modules from CPAN - all failing with "... permission ..." errors - usually about CPAN client not being able to write a lockfile.

    I've created a custom MyConfig.pm and use PREFIX=%USERPROFILE%/perl for installs and that seems to work most times.

      perlbrew would make this easier for you.
Re: How to know if a module is for windows or linux ?
by ExReg (Priest) on Feb 04, 2016 at 14:45 UTC

    Just to add to what has been said above, I have noticed a significant difference in what ppm lists between a Win 7 32 bit machine and a Win 7 64 bit machine. As Corion mentions, it is what libraries your machine has on it.

Re: How to know if a module is for windows or linux ?
by james28909 (Deacon) on Feb 04, 2016 at 17:36 UTC
    Adding to the list .. another thing that affects what modules show in ppm is the perl version. the latest perl wont support some modules from 5.16 or 5.18. I am stuck on 5.16 because ppm doesnt list the gui kit i use for gui programming on newer versions.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1154379]
Approved by davies
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2020-02-25 07:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (108 votes). Check out past polls.

    Notices?