in reply to Re: Re: Re: Re: Makefile.PL even weirder on Windows
in thread Makefile.PL even weirder on Windows
Sometimes I wish the @INC paths had "same directory as the main script" option!
I think I've done something like this before. The following is untested:
If your module has functions, you can just use the whole package/function name to refer to them in your test, e.g. MyModule::function(@args), or explicitly call MyModule->import after the require. This way, I can run the tests from any directory, even from outside of the whole build directory.BEGIN { use File::Basename; my $dir = dirname(__FILE__); unshift @INC, $dir; require MyModule; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Re: Makefile.PL even weirder on Windows
by John M. Dlugosz (Monsignor) on Jan 14, 2003 at 04:51 UTC |