Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35466 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76805 invoked by uid 1010); 13 Feb 2008 23:57:02 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 76779 invoked from network); 13 Feb 2008 23:57:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Feb 2008 23:57:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=jochem@iamjochem.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=jochem@iamjochem.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain iamjochem.com from 194.109.193.121 cause and error) X-PHP-List-Original-Sender: jochem@iamjochem.com X-Host-Fingerprint: 194.109.193.121 mx1.moulin.nl Linux 2.6 Received: from [194.109.193.121] ([194.109.193.121:56427] helo=mx1.moulin.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 30/47-24174-9C383B74 for ; Wed, 13 Feb 2008 18:57:00 -0500 Received: from localhost (localhost [127.0.0.1]) by mx1.moulin.nl (Postfix) with ESMTP id 2684A27DCBF; Thu, 14 Feb 2008 00:56:54 +0100 (CET) X-Virus-Scanned: amavisd-new at moulin.nl Received: from mx1.moulin.nl ([127.0.0.1]) by localhost (mx1.moulin.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CR2TC672-4n5; Thu, 14 Feb 2008 00:56:49 +0100 (CET) Received: from [10.0.13.105] (ip129-15-211-87.adsl2.versatel.nl [87.211.15.129]) by mx1.moulin.nl (Postfix) with ESMTP id 945C627DB1D; Thu, 14 Feb 2008 00:56:49 +0100 (CET) Message-ID: <47B383C1.3030303@iamjochem.com> Date: Thu, 14 Feb 2008 00:56:49 +0100 User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Lars Strojny CC: Pierre Joye , PHP Internals List References: <1202917630.25345.6.camel@localhost> <1202943887.7717.7.camel@localhost> In-Reply-To: <1202943887.7717.7.camel@localhost> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] prepend_include_path()/append_include_path() From: jochem@iamjochem.com (Jochem Maas) I think Lars has a point ... maybe set_include_path() could be given a second parameter instead to mitigate the need for seperate funcs?: set_include_path('foo', INCPATH_OVERRIDE); // default set_include_path('foo', INCPATH_APPEND); set_include_path('foo', INCPATH_PREPEND); Strojny schreef: > Hi Pierre, > > Am Mittwoch, den 13.02.2008, 23:01 +0100 schrieb Pierre Joye: > [...] >>> the following patch[1] adds the functions append_include_path() and >>> prepend_include_path(). These function are there to make include path >>> adjustments easier than it is. Especially append_include_path() is what >>> is done most of the time. > [...] >> I don't think we need two new functions for: > > Sure? > >> set_include_path('/some/path' . DIRECTORY_SEPARATOR . get_include_path()); > > See: prepend_include_path('/some/path'); > >> set_include_path(. get_include_path() . DIRECTORY_SEPARATOR . '/some/path' ); > > See: append_include_path('/some/path'); > > Think about reading the code. What's easier to grasp for you? > Introducing this functions is meant to make a) code better readable, b) > easier to write the code, as most of the time, include path adjustments > are include path appends, so the roundtrip > set_include_path(get_include_path() ...) is not suboptimal. > On the other hand, introducing this functions will not very likely > introduce a lot of new bugs, so the maintenance overhead is lower than > the value this functions bring (of course this is my POV, as I wrote > that patch :-)). And, for the record, I promise to provide fixes for > each the related bug (everyone heard that?). > > cu, Lars >