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 ]

glasser (6052)

  (email not shown publicly)

Journal of glasser (6052)

Thursday July 14, 2005
10:06 AM

blib hatred

[ #25707 ]
You know what I hate? blib.

You see, I almost exclusively write pure-Perl modules. Thus, the "make" step always consists of making a structure under "blib" that consists mostly of empty directories, copying all my .pms into "blib/lib", and manifying pods into blib/man3.

This is useless for me while developing. I don't actually care about manifying PODs until I'm ready to "make install" anyway. And copying the modules just means that sometimes blib/lib is out of date when I'm running "prove" (or even "make test", if I just made a new module and haven't reran Makefile.PL yet), and more annoyingly they show up in every grep, and have to be ignored by version control, etc.

I suppose part of my annoyance would be fixed by making a shell script that uses "prove -l" to simulate the effect of "make test" using modules from "lib" instead of "blib/lib", and just never run "make" or "make test" while developing. But still. Ugh.
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.
  • prove is very similar (in my opinion not as good, but I don't mean that as anything against the prove developers) to the "tv" command from Test::Verbose. This might fit your needs better as it's an interface to "make test" rather than something that runs the tests directly. Try it and see if you like it.
  • I usually just run prove from within the t directory and put a
    use lib "../lib";
    in each test file.
    • prove respects the -I command-line option (and you can stack them the same way you can with perl itself):

      prove -I/some/project/lib -I../lib

      It also looks for a PROVE_SWITCHES environment variable, which I usually load up with something like this:

      -I/some/shared/lib -I/my/project/lib

      This way, I don't have to modify the test scripts at all, and if I use absolute paths, I can run the tests from whatever directory I happen to be in at the time.