Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

How do YOU test/install modules?

by mrbbking (Hermit)
on May 18, 2002 at 00:45 UTC ( [id://167449]=perlmeditation: print w/replies, xml ) Need Help??

I'm putting together an abstract for a Lightning Talk on the subject of Testing Modules for CPAN. I hope to give the talk at YAPC::America::North this year.

Now, I realize that - if accepted - I only have five minutes to talk, but I want to be as useful as I can for as many people as I can in that five minutes. And not everyone uses the same kind of computer that I do. So I'm trying to gather information about installation/testing methods that are unknown to me.

Most of my first-hand experience has been on a Unix variant (HP/UX, Red Hat Linux, MacOS X) at the command line.

When installing by hand, I do the typical...

perl Makefile.PL make make test sudo make install
with the minor twist of running cpantest to report results.

When installing through CPANPLUS, I just use the 't MODULE' option of the default shell.

I know how to install modules on Win32 with ActiveState's ppm, but I don't know how it does what it does, or if it affords any opportunity to test the module before installing it (much less a way to report the test results to CPAN-Testers.)

So - how do you install Perl modules on your operating system for your build of Perl? And when you do - what methods are available to you for testing the modules along the way?

Replies are listed 'Best First'.
(Win32) Re: How do YOU test/install modules?
by osfameron (Hermit) on May 18, 2002 at 06:44 UTC
    On Win32, I usually look for modules on CPAN, and download them from there.

    If the distribution is made up of Perl, documentation and tests, I breathe a sigh of relief and install by hand as normal, in my case:

    perl makefile.pl nmake nmake test nmake install
    (I use the version of nmake downloadable from Microsoft's website.) I have to admit that the fact that I run nmake test is mainly superstitious. Even if errors are reported, I have very little idea of what I'm supposed to do with that (sometimes I look at the test and see that it failed because it was hard-coded with Unix system calls, very portable).

    If the distribution contains any C files (extensions .c, .xs etc.) that need compilation, I curse loudly and profanely. I've mainly given up trying to use ppm to install from repositories - it sometimes works, but it's failed on 2 separate installations of Perl, is slow, the help system is awful, and sometimes the only way to fix it is to hand- edit the XML configuration file... (Apparently ppm3 is better). So I go to ActiveState's site, search around for the downloadable .zip distributions which may or may not be there (see CrazyInsomniac's useful thread). If it's there I download it and install it locally using ppm. If it's not there I tend to give up at this point (though that thread includes details of various other repositories).

    Update: Oh, and testing: that I'm aware, ppm runs no tests, and provides no way of giving feedback.

    Cheerio!
    Osfameron
    http://osfameron.perlmonk.org/chickenman/

      Oh, and testing: that I'm aware, ppm runs no tests, and provides no way of giving feedback.

      PPM (at least version 2.x.x) installs binaries, so it doesn't contain all the stuff from the CPAN distribution. for example, it doesn't contain the scripts used for make test.

      if you want to test something, PPM is a no-go.

      cheers,
      Aldo

      __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-04-24 13:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found