The 'make test' target in ExtUtils::MakeMaker calls the test suite via
test_harness(0, 'blib/lib', 'blib/arch')
making sure that @INC is set correctly in */*.t scripts called subsequently.
But what if one of these scripts in t/*.t calls another script (e.g. a bin script that's part of the module distro and needs to be tested), how do I make sure that it gets called with the correct -I setting, in order to find my yet-to-be-installed modules? I was thinking
system( $^X, "-Iblib/lib", "path/scriptname" );
but setting -I manually to "blib/lib" breaks encapsulation, Test::Harness should provide a setting for that, but I can't find it. Any pointers?
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|