Skip Menu |

This queue is for tickets about the Test-Harness CPAN distribution.

Report information
The Basics
Id: 4537
Status: resolved
Priority: 0/
Queue: Test-Harness

People
Owner: Nobody in particular
Requestors: david [...] kineticode.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Date: Mon, 1 Dec 2003 08:47:01 -0800
Subject: Add Support for lib
From: David Wheeler <david [...] kineticode.com>
To: bug-test-harness [...] rt.cpan.org
I like prove, but as it currently works, it does little for me that C<./Build|make test> does not. This is because I would mostly find it useful while doing development, rather than after running C<./Build|make>. Of course, it doesn't currently work unless you've run C<./Build|make>, because it's looking for 'blib'. I realize that I can add 'lib' by running C<prove -Ilib>, but it seems silly to do that, when Perl can easily be maid to C<-d blib> and use lib when it returns true. Can you add something like that? Then, prove will finally replace my old alias: alias harness="PERL_DL_NONLAZY=1 perl \"-MExtUtils::Command::MM\" \"-e\" \"test_harness(1, 'lib', 'blib/lib', 'blib/arch')\"" Thanks, David -- David Wheeler AIM: dwTheory david@kineticode.com ICQ: 15726394 http://www.kineticode.com/ Yahoo!: dew7e Jabber: Theory@jabber.org Kineticode. Setting knowledge in motion.[sm]
Date: Tue, 2 Dec 2003 23:18:59 -0800
From: Michael G Schwern <schwern [...] pobox.com>
To: David Wheeler via RT <bug-Test-Harness [...] rt.cpan.org>
CC: "AdminCc of cpan Ticket #4537": ;
Subject: Re: [cpan #4537] Add Support for lib
RT-Send-Cc:
On Mon, Dec 01, 2003 at 11:47:22AM -0500, David Wheeler via RT wrote: Show quoted text
> I like prove, but as it currently works, it does little for me that > C<./Build|make test> does not. This is because I would mostly find it > useful while doing development, rather than after running > C<./Build|make>. Of course, it doesn't currently work unless you've run > C<./Build|make>, because it's looking for 'blib'. I realize that I can > add 'lib' by running C<prove -Ilib>, but it seems silly to do that, > when Perl can easily be maid to C<-d blib> and use lib when it returns > true. Can you add something like that? Then, prove will finally replace > my old alias: > > alias harness="PERL_DL_NONLAZY=1 perl \"-MExtUtils::Command::MM\" > \"-e\" \"test_harness(1, 'lib', 'blib/lib', 'blib/arch')\""
Its not entirely safe to assume that the code in lib/ will execute or be the same as the code in blib/lib. With XS modules, that's right out. Even pure Perl modules might do some translation of the code as part of the build process. Also, many modules don't use lib/. I'd recommend against doing this, as its easily solved in other ways that don't involve adding possible junk to @INC (see below). If you do do this, be sure to put it *after* blib/. A simple alternative is this: perl Makefile.PL make && prove Another is this: alias prove="/path/to/prove -Ilib" -- Michael G Schwern schwern@pobox.com http://www.pobox.com/~schwern/ It's Yellowing Laudanum time!
Done. See 2.39_02. The uploaded file Test-Harness-2.39_02.tar.gz has entered CPAN as file: $CPAN/authors/id/P/PE/PETDANCE/Test-Harness-2.39_02.tar.gz size: 58613 bytes md5: 25540546e455b2b3e9df32a9af529c29 No action is required on your part Request entered by: PETDANCE (Andy Lester) Request entered on: Mon, 22 Dec 2003 04:53:21 GMT Request completed: Mon, 22 Dec 2003 04:53:58 GMT