RE: [PEAR-DEV] dirname(__FILE__)

From: Date: Thu, 17 Oct 2002 15:15:50 +0000
Subject: RE: [PEAR-DEV] dirname(__FILE__)
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-10109@lists.php.net to get a copy of this message
If people structure their package directories right, this won't be a problem. - Stig On Thu, 2002-10-17 at 13:43, Lukas Smith wrote: > Hi, > > I just noticed one disadvantage of the dirname(__FILE__) approach: > Things will be a bit harder to test in CVS this way. > I guess that is the disadvantage of the CVS structure of PEAR. > > Regards, > Lukas > > > From: Lukas Smith [mailto:smith@dybnet.de] > > Sent: Thursday, October 17, 2002 11:50 AM > > To: 'Markus Wolff'; 'Wolfram Kriesing' > > Cc: 'Alan Knowles'; 'PHP PEAR Developer' > > Subject: RE: [PEAR-DEV] dirname(__FILE__) > > > > > From: Markus Wolff [mailto:wolff@21st.de] > > > Sent: Thursday, October 17, 2002 11:08 AM > > > To: Wolfram Kriesing > > > Cc: smith@dybnet.de; 'Alan Knowles'; 'PHP PEAR Developer' > > > Subject: Re: [PEAR-DEV] dirname(__FILE__) > > > > > > Am Thu, 17 Oct 2002 10:55:13 +0200 schrieb Wolfram Kriesing > > > <lists@kriesing.de>: > > > > > > > Lukas Smith wrote: > > > > > Well the reason I suggested dirname(__FILE__) is that I need to > > > > > distribute any installation with the pear packages it requires. > > This > > > is > > > > > for QA reasons. There may of course be different installations > on > > the > > > > > same server where different versions of a single pear package > are > > used. > > > > +1 > > > > exactly that's also a reason why i think dirname(__FILE__) is a > very > > > > good solution!!! > > > > > > Also, I don´t think it´s that much of a performance hit when > compared > > to > > > including via include_path. Normally, PHP will search for a file in > > the > > > same directory first. If it´s not there (likely), it will try to > > access > > > it in the next directory as specified in the include_path - and so > on. > > > > > > I really don´t think this procedure is much faster than using > > dirname(), > > > especially when PEAR is not the second entry in the include_path for > > > whatever reason. > > > > > > > Actually you are quite right there appearently. > > I asked a few developers and they also say that dirname(__FILE__) > should > > be a lot faster than searching in the include path. > > > > So not only will it allow people to better bundle pear packages with > > their app it will even improve speed :-) > > > > Regards, > > Lukas > > > > > > -- > > PEAR Development Mailing List (http://pear.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PEAR Development Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- Stig Sæther Bakken, Fast Search & Transfer ASA, Trondheim, Norway http://pear.php.net/wishlist.php/ssb

« previous php.pear.dev (#10109) next »