Re: @foo@ / templates / sub packages

From: Date: Sat, 03 May 2008 00:27:33 +0000
Subject: Re: @foo@ / templates / sub packages
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-49974@lists.php.net to get a copy of this message
To answer question2: The way I do it is: during develpment I hard code the path where my data is, for example: $myDataPath = '/usr/local/data/'; Then when creating a package add this: $pfm->addReplacement('myphpfile.php', 'pear-config', '/usr/local/data', 'data_dir'); $pfm is object of PEAR_PackageFileManager2 class This will add this like to package.xml: <tasks:replace from="/usr/local/data" to="data_dir" type="pear-config" /> So instead of the usual <tasks:replace from="@data_dir@" to="data_dir" type="pear-config" /> you can have a hard-coded path there. This way my I can keep testing and developing script with a hard-coded paths and they will be replaced with data_dir paths during installation of the package. Joe Stump wrote:
1.) Does anyone have a definitive list of variable names the PEAR installer will replace via the @foo@ stuff? 2.) Where do people put template files? If you use @data_dir@ and expect your code to have that expanded how do you easily test without packaging and installing? 3.) Anyone know where sub packages are documented? 4.) If you know the PEAR installer inside and out and are looking for work contact me offlist (or if you're a Python/PHP coder and just think working at Digg would be fun). Thanks! --Joe
-- Open Source ALL content management with streaming video http://wiki.sharedlog.com

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