Re: @foo@ / templates / sub packages
| From: | Brett Bieber | Date: | Fri, 02 May 2008 16:31:55 +0000 |
| Subject: | Re: @foo@ / templates / sub packages | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-49964@lists.php.net to get a copy of this message | ||
hey Joe
On Fri, May 2, 2008 at 11:08 AM, Joe Stump <joe@joestump.net> wrote:
> 1.) Does anyone have a definitive list of variable names the PEAR installer
> will replace via the @foo@ stuff?
I believe I updated the manual with the latest list of all of these --
but, for the most part they are just the pear config values.
http://pear.php.net/manual/en/guide.developers.package2.tasks.php#guide.developers.package2.tasks.replace
> 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?
For the most part I use the data_dir for temp storage, and copy files
over to the user's preferred location with a post-install script, and
make my own replacements at that point in time (allows multiple
installs using the templates if you're using a system-wide pear
install).
I usually just script my installs with a file that has all my
responses to the post install script questions pre-determined. But I
always test it by installing the package. I don't think it's too
difficult to install... I have an icon in my dock which just runs a
script that installs the package and executes my post-install script
with my test machine's defaults. But I can see some advantages to run
it out of CVS without installing first. In those instances I use
something like:
$data_dir = '@@DATA_DIR@@';
if ($data_dir == '@@'.'DATA_DIR@@') {
//use my cvs location
}
Which is harder to do in those files that aren't PHP.. like templates
I realize. :-/ This is a sticky issue, maybe someone else has some
good ideas.
But, installing the package and using the post-install script is the
best way I've found to handle this.
> 3.) Anyone know where sub packages are documented?
Not me..
> 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).
hehe... sounds like fun. Keep up the good work you guys are doing! I
saw the microformats & rdfa announcement... great work.
--
Brett Bieber
http://saltybeagle.com/