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 ]

Thursday April 03, 2008
03:07 AM

Oslo QA Hackathon, the plane trip

[ #36039 ]

So far the Oslo QA Hackathon is going well, and it hasn't even stated yet.

On the plane ride over, I played with PPI to see how I could use it to extract the package statements from Perl modules. Ten minutes later that was done. All I had to do was take a snippet from PPI and a another one from PPI::Document and everything was in place. I ran it through everything I had installed and it only had problems with two modules.

package statements are pretty simple. From that I created Module::Extract::Namespaces to make the whole thing a bit more flexible and subclassable in case I need to modify things for some special cases.

After that I took the version parsing stuff I ripped out of PAUSE's mldistwatch and put that into Module::Extract::Version.

None of that took much time, so I looked at the problem I have indexing distributions that use Module::Install. I want to run the Makefile.PL to see what it actually puts in blib, but I don't want auto_install. I don't really care about installing code or running it. I was thinking about all sorts of complicated ways to get around that, such as subclassing or monkeypatching it to have a null method for it, but I think that I can just rewrite the Makefile.PL to comment out the auto_install. I only thought of that once my laptop had run out of battery and couldn't start typing out the complicated solutions.

I also started thinking about a third module that could figure out the build system a distribution wants to use. I also want it to be able to recognize the special cases I'm likely to run into when going through all of the distributions. Part of the trick of my indexing project is going to be handling all of the exceptions.

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.
  • I don't think you should even try to run Makefile.PL or Build.PL for any sort of automated indexing.

    It's not just auto-install you have to avoid -- it's also every single custom prompt for attention that module authors stick in there.

    Run a smoker like CPAN::Reporter::Smoker for a while and you'll see what I mean.

    -- Dagolden
    • I know about those special cases, and I'll find what those are and decide later how to handle them. I'm not looking for one method that works for everything. I'll develop several then figure out which one to use in each case. For most of BackPAN, running Makefile.PL isn't going to be a problem.

      The prompts aren't so bad. The thing to watch out for is build scripts that do something besides move files around for installation.

      And, none of this has stopped CPAN Testers from getting their work done :)