Re: XML files in PEAR packages
| From: | Tomas V.V.Cox | Date: | Tue, 29 Jun 2004 08:00:54 +0000 |
| Subject: | Re: XML files in PEAR packages | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-31318@lists.php.net to get a copy of this message | ||
Pierre-Alain Joye wrote:
On Tue, 29 Jun 2004 09:44:15 +0200 cox@idecnet.com (Tomas V.V.Cox) wrote:3) Use a replacement tag (best option): In package.xml: <file name="myscript.php"> <replace from="@pear_data@" to="data_dir" type="pear-config" /> </file>
This one is not that nice.I agree is not the most flexible option, my meant with "best option" was more from the performance perspective.
You force the usage of _one_ data_dir and do not allow to share the codes for multiple installations (ie, PEAR is host shared but the data is in user home).It's supposed that XMLs shipped within a package are read-only (well I did suppose that), so it is good to have the same XMLs for all your users.
I have to say that using this option is evil :)If one needs write access to the xml files and/or access from the web doc root, I'd install them so: pear -d data_dir=/home/foo/htdocs/xmls install MyPackage.tgz I do that for example with HTML_TreeMenu and its .js. Anyway custom package data handling is not our best point in installer ;) Tomas V.V.Cox