in reply to Accessing config files under 'make test'

When test scripts are run from make test current directory is top directory of distribution. So it is actually possible to use relative paths:
use Test::More qw( no_plan ); use MyPackage; # relative path my $p1 = MyPackage->new( -config => 't/test.conf' ); # more portable variation use File::Spec; my $p1 = MyPackage->new( -config => File::Spec->catfile('t', 'test.con +f') );

--
Ilya Martynov (http://martynov.org/)

Replies are listed 'Best First'.
Re: Re: Accessing config files under 'make test'
by johanvdb (Beadle) on Feb 26, 2002 at 21:11 UTC
    Hi,

    Thanks for the answer!

    I was not aware of this, but then again, I could have tried to find it out myself ... oohh boy what a bad attidude I have lately!

    Thanks!

    J.