On 31 Jul 2007, at 12:24, Andy Armstrong wrote:
On 31 Jul 2007, at 12:16, Michael G Schwern wrote:
I was about to say that. I declare LWP as a prereq, but loading
LWP loads
tons more modules. I don't have to declare all those as prereqs,
in fact I
should not as its violating LWP's encapsulation.
I don't know an easy way to give it the necessary smarts.
Presumably there's a non-easy way that involves adding some runops
instrumentation to Perl and using that to find out where modules
are included from? Anything not included directly from the code
under test is uninteresting to us.
Hmmm... you could probably hack a 90% solution to that with the old
codref on @INC trick...
Slightly tangential but related: is there currently a module that
simplifies simulating the non-availability of selected modules?
use unavailable qw/LWP::UserAgent/;
use Module::That::Needs::LWP::UserAgent;
<bang>
Test::Without::Module ?
Adrian