Slash Boxes
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 ]

rjbs (4671)

  (email not shown publicly)
AOL IM: RicardoJBSignes (Add Buddy, Send Message)
Yahoo! ID: RicardoSignes (Add User, Send Message)

I'm a Perl coder living in Bethlehem, PA and working Philadelphia. I'm a philosopher and theologan by training, but I was shocked to learn upon my graduation that these skills don't have many associated careers. Now I write code.

Journal of rjbs (4671)

Monday March 14, 2005
08:07 AM

minicpan, minicpan2, and module naming

[ #23640 ]

minicpan  162.52s user 17.89s system 70% cpu 4:17.36  total
minicpan2  29.35s user  1.74s system 62% cpu   50.064 total

Above is my very unscientific speed comparison of minicpan (as released to CPAN) and minicpan2 (as sits in my Subversion). I know minicpan2 will get slower as time goes on and I add the same features (and more) that minicpan already has. Those features, though, are not going to slow it down more than a few more seconds, I think.

Right now I still have minicpan2 existing as a script that does its own thing. I'm about a third, or maybe half, done with the modules that will do the same work more generically. CPAN::Mini::Archive represents an archive of modules (it's the SPA mentioned earlier). By default, it assumes you're going to point it at a URI to the root of an archive with the normal 01mailrc and 02packages files. I am pretty close to just declaring I won't handle 03modlist; I don't feel like writing a parser, and I don't intend to just eval code received from the network.

Anyway, CPAN:Mini::Archive works. CPAN::Mini::Archive::WriteIndex (the name of which is not set in stone) also works, writing out index files from a C:M:Archive object. Now I get to write the merger and mirrorer. Their trivial forms exist, of course, in the minicpan2 script. I just need to go ahead and write their less trivial forms.

I'm not sure that CPAN::Mini v2 will be CPAN::Mini. It might be CPAN::Mini2, or something else. I don't want to put myself in the position of releasing a same-named module that isn't compatible with previous extensions, especially after being among those who ranted about Apache:: in mod_perl 2. Of course, if I can provide a similar enough interface, it's not an issue.

This kind of situation makes me feel that I'd like a more standard option for formal interfaces. Of course, even if I had the ability to write both an interface and implementation, the problem would remain: I wouldn't have realized that I'd want to change things in this specific way. Maybe the lesson in the future is to start with more leading underscores, and to remove them less readily.

We'll see what happens. I guess CPAN::Mini might have a simple enough interface that I can make it a wrapper for CPAN:Mini::2.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • (1) Does CPAN::Mini have a nice set of tests? If you pass the same tests, faster, that is good enough for me. Then naming should be much easier.

    If you don't pass certain tests, note those.

    If it does not have a nice set of tests, it would be nice to add to its test suite, and then GOTO (1).
    • It doesn't, but I might add them retroactively. I've built a fake CPAN archive with a nice small set of files and indices that could be used to test. I'm using these to test CPAN::Mini2, and I had originally planned to test CPAN::Mini with this kind of thing.
  • Of course, the big difference here is that CPAN::Mini is quite young and all the people that have built things on top of it (including me) are both more skillful and don't use it in a heavily commercial setting (for the most part | yet). And can I add "PLEASE make CPAN::Mini easier to subclass and add hooks all over the place this time?"
  • I'm having trouble getting minicpan to work, and am thus interested in minicpan2. Does the SVN repo where it lives have a public address?

    If you are interested, here is the unintuitive output I get when trying minicpan:

    # minicpan -l /usr/share/mirrors/cpan -r
    ftp://ftp.uwsg.iu .edu/pub/perl/CPAN/authors/01mailrc.txt.gz: 500
    modules/02packages.details.txt.gz les/02packages.details.txt.gz: 500