Hi I have directory structure that contains some modules and I want (first timer) to use the test modules to test those
module. But it keeps saying tht it can't find my modules. I do not want to change the include path permantly
or supply throught he command line (I need to package this to an exe) and with other tools that have different
@INC requirements. So I am thinking to let the script to add the directory do
the tests then restore to what it was.
Here is my dir structure (all windows):
tools\DBQuery\Config
tools\DBQuery\Connection
tools\DBQuery\Data
tools\ToolLog
test folders:
tools\DBQuery\test\TstBackEndMap
tools\DBQuery\test\TstConection
tools\DBQuery\test\TstReporterSQLMap
But there is a problem in use lib line... e,g, for a file in TstBackEndMap , i try to tell to also use
the path from DBQuery to look for BackendMap but it can't so I am trying to arrange the associated packages into folders for neatness.
but because this app will be plug into other framework, I do not want o disturb the environment variables or the @INC in global scale.
so for example:
Here is my dir structure (all windows):
tools\DBQuery\Data\BackendMap.pm
tools\ToolLog\Logging.pm
test folders:
tools\DBQuery\test\TstBackEndMap\testbackendmap.t
so testbackendmap.t need to use Data::BackendMap but it cannot find it event I tried to use use lib qw(Data::BackendMap);
how can I resolve this? thanks
A side note: In the future the tests may add BenchMark, Test coverage etc
use strict; use Test::More tests=>3; use lib qw(../../); use Data::BackendMap;

In reply to finding the library from test by edwardt_tril

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.