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

perl -MCPAN on windows: Should I even try?

by tphyahoo (Vicar)
on Aug 15, 2005 at 15:46 UTC ( [id://483890]=perlquestion: print w/replies, xml ) Need Help??

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

O monks, I'm an activestate perl on windows user. The usual way to install stuff in this confi is ppm install Path-To-Package.

Sometimes though, this doesn't work, because the ppd hasn't been created for the package you want, or you don't know the url for adding the ppd.

In these cases you can do nmake/nmake test/nmake install... but that's a pain, especially if you have recursive dependencies.

I'm currently trying to install the hops demo for catalyst on windows, and the missing ppm packages for the stuff I need are turning this exercise into a bit of a PITA.

I am considering trying out perl -MCPAN as an alternative to ppm, but from previous experience I know this isn't plug and go. (Need to configure zip, gzip, for starters... and then what???)

Should I make the effort of getting perl -MCPAN to work for me, as Corion suggested MIGHT be a good idea earlier today... or will this lead me down the path of Madness, and I should just stick with good old ppm and nmake spells as a fallback.

Thanks for your wisdom!

By the way, the packages I am trying to install are

not ok 1 - use Bundle::Catalyst; not ok 8 - use Class::DBI::mysql; not ok 11 - use Class::DBI::Plugin::AbstractCount; not ok 12 - use Class::DBI::Plugin::Pager;
If anyone knows ppd urls for these guys, let me know.

Replies are listed 'Best First'.
Re: perl -MCPAN on windows: Should I even try?
by xdg (Monsignor) on Aug 15, 2005 at 16:03 UTC

    You can use CPAN on Windows with ActiveState. But unless you have a compiler installed, you won't be able to compile any .xs files (I don't know off the top of my head if those packages have or depend on xs). You will need nmake. As for those other standard tools, I found unixutils to work great on my Windows laptop.

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Re: perl -MCPAN on windows: Should I even try?
by jZed (Prior) on Aug 15, 2005 at 16:04 UTC
    CPAN.pm worked great for me when I was on windows and contiues to work great for me on linux. For pure Perl modules, it will work flawlessly. For modules that have XS/C components it will work with ActiveStae if you have the M$ compiler. If you don't have the M$ compiler or another compiler, nothing will work, so CPAN isn't any worse off than any other method. Sometimes I ended up installing most of a dependency list via CPAN and then filled in one or two things that didn't work with ppm. I don't know about the Catalyst Bundle, but I think the other modules on your list are pure Perl. If you don't already have DBD::mysql, that needs compiling, but ppms are available.
      Thanks jZed. I have some questions.

      What does having the "M$ compiler" involve? EG, does it involve buying visual studio? What is the most economical way to get hold of the M$ Compiler? Is there a free way?

      Secondly, I wanted Class::DBI::mysql, not DBD::mysql. Did you misread my question, or did I misunderstand your answer?? (I'm a complete DBI newbie.)

      And again, thanks.

        As far as I know, Microsoft's C/C++ compiler only comes with Visual C++ and Visual Studio. I don't know if it makes a difference which version you get (6 -vs- .NET), but I think both will work.

        Class::DBI::mysql uses DBD::mysql, so if you want Class::DBI::mysql, you need to install both.

Re: perl -MCPAN on windows: Should I even try?
by planetscape (Chancellor) on Aug 15, 2005 at 17:28 UTC
Re: perl -MCPAN on windows: Should I even try?
by diotalevi (Canon) on Aug 15, 2005 at 16:06 UTC

    Of course you should try. Most CPAN modules don't require a separate compiler and they can be installed from your CPAN shell. If you're missing tools, you may want to check out Native Win32 ports of some GNU utilities. I consider that a standard package for any Windows computer I'm on and I've never noticed CPAN.pm having an issue with it.

Re: perl -MCPAN on windows: Should I even try?
by jdhedden (Deacon) on Aug 15, 2005 at 16:27 UTC
    You could give up on ActiveState and switch to using the Cygwin environment. It contains all the tools you need to download and install CPAN modules.

    Remember: There's always one more bug.
Re: perl -MCPAN on windows: Should I even try?
by CountZero (Bishop) on Aug 15, 2005 at 16:29 UTC
    CPAN worked straight "out the box" for me on Windows XP. I only had to install nmake.exe and then confirmed all defaults (except for make.exe that had to be pointed to nmake.exe) and I could install all modules unless they involve compilation.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Re: perl -MCPAN on windows: Should I even try?
by CountZero (Bishop) on Aug 15, 2005 at 18:16 UTC
    If you search CPAN through CPAN search with PPM indications on the bottom of each page you will see if and where exists a PPM package for the module. Very handy, saved me a lot of time and effort.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Re: perl -MCPAN on windows: Should I even try?
by JSchmitz (Canon) on Aug 15, 2005 at 21:19 UTC
    Why would you bother? I already have DBD-mysql installed but ppm is such a snap. What is the point in trying to compile something on windows? Use linux or another *nix if you want to use CPAN -
    ppm> install DBD-mysql Note: Package 'DBD-mysql' is already installed. ppm> install DBD-ODBC ==================== Install 'DBD-ODBC' version 1.13 in ActivePerl 5.8.4.810. ==================== Downloaded 78812 bytes. Extracting 11/11: blib/arch/auto/DBD/ODBC/ODBC.lib Installing C:\Perl\site\lib\auto\DBD\ODBC\ODBC.bs Installing C:\Perl\site\lib\auto\DBD\ODBC\ODBC.dll Installing C:\Perl\site\lib\auto\DBD\ODBC\ODBC.exp Installing C:\Perl\site\lib\auto\DBD\ODBC\ODBC.lib Installing C:\Perl\html\site\lib\DBD\ODBC.html Installing C:\Perl\html\site\lib\DBD\ODBC\Changes.html Files found in blib\arch: installing files in blib\lib into architectu +re depende nt library tree Installing C:\Perl\site\lib\DBD\ODBC.pm Installing C:\Perl\site\lib\DBD\ODBC\Changes.pm Successfully installed DBD-ODBC version 1.13 in ActivePerl 5.8.4.810.
      Why would you bother? ... What is the point in trying to compile something on windows?

      When I first started to use ActiveState's Perl they didn't have the nice large repository of modules they do now. Monks like crazyinsomniac made life much easyer by providing PPM installable modules that ActiveState didn't. At some point he had to have set up compiling under Windows him self.

      At work I don't have access to Perl on my work station and company policy prevents me from installing it my self. So I end up SFTPing files to a development *nix box to run them through short Perl scripts. Even though I'm not getting payed to write Perl scripts to do minor file parsing on Windows I still want Perl on my workstation for when I find the cause to use it for that. I know very few programmers that would not want their tools of choice on any box the sit down at or log into. It's a matter of control over the computer your working on, do you control it or does it control you. By the same token I want a compiler on the boxes I sit at. I'm less likely to get it than Perl since I'm not doing any work in C at the moment, but if I need it I want it there. It's about the ability to do what I need to do, not just now, but eventualy. He may be able to get every module he wants now through PPM, but maybe next time the module won't be in a repository. But if he learns to use CPAN now, and then learns to make a .ppm, maybe you can benifit from the time he takes to compile his own modules, as I have benifited from other monks work.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://483890]
Approved by kvale
Front-paged by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-24 10:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found