in reply to Re^2: Do Pure Perl CPAN packages really need to use ExtUtils::Command::MM?
in thread Do Pure Perl CPAN packages really need to use ExtUtils::Command::MM?
ExtUtils::Command::MM::test_harness adds $(INST_LIB), i.e. blib/lib, and $(INST_ARCHLIB), i.e. blib/arch to @INC. It has no provision for adding anything more to @INC
Exactly. Your claim that there's something special about the project root is completely false.
I simply don't buy that it is a "good thing" to go around coding "use lib" statements in every single .t file.
It's a necessary thing, not just in .t, but in all scripts that use uninstalled modules. If you don't, Perl won't find them. If the module isn't somewhere where Perl would normally look (e.g. the directory in which the script resides), you need to tell Perl where it is.
No idea why you bring up CPAN and legal protections.
First, it means that I have to go into every file I want to ship and edit it to have that line.
No, just the scripts.
Secondly, these support libraries are used in a lot of different projects
Straw man. If Perl can find your libraries, they don't need to tell Perl where to find your libraries.
Secondly, if you have a module that used by multiple projects, it's silly to copy it into each project and adjusting @INC to find that copy. Install the module.
I have no need of it when I let Module::Build build the project.
So you're proudly claiming that one needs to use a giant harness to get your test script to work properly, ignoring that it fails the rest of the time.
I am not proposing doing away with Makefile.PL.
I didn't even address your proposal. I just corrected the false claim that only 3% of testers try to run Makefile.PL.
To address the proposal: It's a lot of work and you claim introduces problems, while you can get the desired effect by simply adding inc/ to the harness command. And your test script still won't run outside the harness.
Before you reply that you don't expect your test scripts outside of Module::Build, realise there's no problem if that's true.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Do Pure Perl CPAN packages really need to use ExtUtils::Command::MM?
by ELISHEVA (Prior) on Feb 17, 2011 at 22:50 UTC | |
by ikegami (Patriarch) on Feb 17, 2011 at 22:56 UTC | |
by ELISHEVA (Prior) on Feb 17, 2011 at 23:19 UTC | |
by ikegami (Patriarch) on Feb 24, 2011 at 18:06 UTC | |
by ELISHEVA (Prior) on Feb 24, 2011 at 23:52 UTC | |
by ikegami (Patriarch) on Feb 25, 2011 at 01:34 UTC | |
by ELISHEVA (Prior) on Feb 25, 2011 at 10:12 UTC | |
|