Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Shlomi Fish (918)

Shlomi Fish
  shlomif@iglu.org.il
http://www.shlomifish.org/
AOL IM: ShlomiFish (Add Buddy, Send Message)
Yahoo! ID: shlomif2 (Add User, Send Message)
Jabber: ShlomiFish@jabber.org

I'm a hacker of Perl, C, Shell, and occasionally other languages. Perl is my favourite language by far. I'm a member of the Israeli Perl Mongers, and contribute to and advocate open-source technologies. Technorati Profile [technorati.com]

Journal of Shlomi Fish (918)

Saturday February 10, 2007
01:50 PM

Automating Setting up a CPAN Smoking Environment

[ #32367 ]

CPAN Smoking involves downloading the recently added versions of CPAN modules, testing them and reporting the results to the CPAN Testers mailing list.

A long time ago, szabgab asked me whether I can work on setting up a sort of "CPAN Smoking in a Box" archive to smoke CPAN. Later on, when I dubbled a bit in CPAN smoking, I wanted a way to easily automate setting up such an environment under an underprivileged account and on a prefix that will not pollute the rest of the system.

I started writing some scripts to do it, but hit some obstacles and neglected it. The past two weeks, I returned to it and was able to bring it into a usable state.

So I present to you: SmokeAuto. It is a Perl module that enables one to automatically setup a Perl smoking environment. To use it:

  1. Under an under-privileged UNIX account, create an empty directory to put the scripts and build Perl inside.
  2. "svn export" or "svn checkout" the URL.
  3. cd to first-rev and Copy sample-SmokeConf.pm to SmokeConf.pm. Edit SmokeConf.pm using your editor and adapt it to your liking. (Especially specify more localised URLs for the primary and secondary CPAN mirrors).
  4. Run perl -MSmokeAuto -e "SmokeAuto::install_all()" to setup the environment.
  5. It is recommended to cp -a the directories to which you installed perl (by default ~/apps/perl-5.8.8) to a backup so you can later cp -a the backup copy to the original location and thus start from a pristine state without having to compile perl again.
  6. Run perl -MSmokeAuto -e "SmokeAuto::smoke()" to start the smoking process.

Please let me know if you encounter any problems. Smoke yourself senseless!

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • 1. Under an under-privileged UNIX account, create an empty directory to put the scripts and build Perl inside.
          2. "svn export" or "svn checkout" the URL.
          3. cd to first-rev and Copy sample-SmokeConf.pm to SmokeConf.pm. Edit SmokeConf.pm using your editor and adapt it to your liking. (Especially specify more localised URLs for the primary and secondary CPAN mirrors).
          4. Run perl -MSmokeAuto -e "SmokeAuto::install_all()" to setup the environmen
    • And now can you automate that part as well?

      Well, part of the reason I created this was that I was tired of answering the same questions again and again. Later on, you can use the same configuration for creating the environment again. I was describing the steps from the beginning, but you can skip more in subsequent times.

  • Any chance of a tarball for those of us who aren't svn users, and does it work on older perls? Test::Reporter, for example, doesn't seem to like 5.6.2 (because it needs Net::SMTP, which needs some utf malarkey) and I think it's important to test stuff for backward combatibility.

    I'm not saying that everything should work on 5.6.2, but authors should at least be made aware when their stuff doesn't so that they can then decide whether it's worth their while to bother supporting older perls.

    • Any chance of a tarball for those of us who aren't svn users,

      I'd rather not release a tarball because I'd have to maintain it separately. If you're still interested you can fetch the files using plain HTTP.

      and does it work on older perls?

      I haven't tested it on perl-5.6.x, so I can't tell. I am smoking using Test::Reporter, but using Mail::Send. And I'm not the Test::Reporter maintainer. I just work here.

    • because it needs Net::SMTP, which needs some utf malarkey

      It sounds to me like somebody needs to backport Net::SMTP back to 5.6.x. I remember needing to do the same thing for a ID3 module for MP3 files. All I needed to change was maybe 3 lines of code less efficient in 5.6.x, but at least, it worked again.

      I'll have a look at what is needed for Net::SMTP.

      What do you people recommend to do with these backported modules, in order to distribute them, preferably on CPAN?

      • I fixed the Net::SMTP thing by just grabbing an older version of libnet from the CPAN. 1.1.17 IIRC, which was the last release before 5.6.2. With that in place, Test::Reporter installs just fine.
        • Yes, but that just ignores any bugfixes that might have been applied to the module in later versions.