On 23 March 2010 16:39, Robert P. J. Day <rpjday@xxxxxxxxxxxxxx> wrote: > On Tue, 23 Mar 2010, Richard Quadling wrote: > >> However you want to identify the location, the autoloading techniques >> will allow you to only need to identify the location once. As compared >> to every file meticulously maintaining relative links to files. >> >> So, for testing, would this not work? >> >> RunTests C:\Dev\Checkouts\PROJ\trunk\tests >> RunTests C:\Installed\PROJ\V1.1\Tests >> RunTests C:\Installed\PROJ\V2.2\Tests >> RunTests C:\Installed\PROJ\V3.3\Tests >> >> sort of thing? >> >> And in RunTests, you set the location based upon the $argv[1] (using >> the autoloader technique). >> >> No env_var. No include_path. > > sure, but deep down, you're still doing what i'm claiming has to be > done at some point -- *explicitly* identifying the target location. > you're just doing it in a different way, which is fine and might be > what i'm after. > > rday > -- > > > ======================================================================== > Robert P. J. Day Waterloo, Ontario, CANADA > > Linux Consulting, Training and Kernel Pedantry. > > Web page: http://crashcourse.ca > Twitter: http://twitter.com/rpjday > ======================================================================== > You could of course simply look in the entire file system for a key file, but ... well ... maybe not! The thing about an env_var is that it is pretty much no different to an INI setting in this regard. By having the setting "closer" to the code using it (i.e. I see the location in the batch file used to run the testing, I see the location in the require_once() line in the main script), it is easier to see the location. An env_var or an ini setting is quite some distance away from the code and may seem "magical". What I'm not sure is how you can ever get away without explicitly declaring the location unless you always put the files in the include path. -- ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php