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;