Re: what is the meaning of the following construct

From: Date: Sat, 17 Apr 2004 11:08:50 +0000
Subject: Re: what is the meaning of the following construct
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-27837@lists.php.net to get a copy of this message
Hi, I could not see pear.in anymore in the CVS Tree.(I persume it has been renamed as pearcmd.php) "don't set include path if running 'pear.in' without substitutions made by the installer" -is the comment given to the corresponding commit. if ('@include_path@' != '@'.'include_path'.'@') { ini_set('include_path', '@include_path@'); } I am not knowledgable about which program replaces these @include_path@ with '/usr/local/lib/php'. Any way finally the installed code looks like the following if ('/usr/local/lib/php' != '@'.'include_path'.'@') { ini_set('include_path', '/usr/local/lib/php'); } So the if condition is absolutely not necessary. Please correct me if I am wrong With regards Kamesh Jayachandran On Fri, 2004-04-16 at 21:35, Jan Schneider wrote: > Zitat von Jon Parise <jon@php.net>: > > > On Fri, Apr 16, 2004 at 11:59:34AM +0200, Cipriano Groenendal wrote: > > > >> > in scripts/pearcmd.php > >> > I could see the following piece of code at the begining(at the second > >> > line) > >> > > >> > if ('@include_path@' != > >> > '@'.'include_path'.'@') { > >> > ini_set('include_path', '@include_path@'); > >> > } > >> > > >> > I wrote a small php page test.php and invoked the same as pearcmd.php is > >> > invoked from pear shell script. > >> > > >> > It never gets in to the if block. > >> > > >> > what is the use of putting @ before and after some constant(may or > >> > maynot be set)? > >> > > >> > Putting @ at the beginning suppresses error messages. What is the use of > >> > putting at the end. > >> IIRC, tags like these are replaced by the installer in source files when > >> they're installed. it seems to test if those tags have been replaced or not. > >> In my INSTALLED pearcmd.php it says this: > >> if ('/usr/share/pear' != > >> '@'.'include_path'.'@') { > >> ini_set('include_path', '/usr/share/pear'); > >> } > > > > It sounds like the person who wrote that code should have left a > > comment explaining the purpose of that construct. > > > http://cvs.php.net/diff.php/php-src/pear/scripts/Attic/pear.in?sa=1&r1=1.61&r2=1.62&ty=h > > Jan. > > -- > http://www.horde.org - The Horde Project > http://www.ammma.de - Neue Wege des Lernens > http://www.tip4all.de - Deine private Tippgemeinschaft

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