Re: question about @PHP-BIN@, file placement in packages, more
| From: | bertrand Gugger | Date: | Tue, 05 Jul 2005 14:24:02 +0000 |
| Subject: | Re: question about @PHP-BIN@, file placement in packages, more | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-38448@lists.php.net to get a copy of this message | ||
Hello Matthew
Matthew Weier O'Phinney wrote:
I'm preparing to do a call for votes on File_Fortune, http://pear.php.net/pepr/pepr-proposal-show.php?id=263 but I want to get a few items straightened out before doing so. (1) I have an example in my package, and it's supposed to be an executable. I have the shebang line as: #!@PHP-BIN@ However, when I install the package with the PEAR installer (I'm on the latest alpha of the 1.4 series), I find that this line is not re-written with the path to my PHP executable. Should it be? Do I have the syntax wrong? you need to associate a task with the <file>, something like:
<tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" />or
<replace from="@bin_dir@" to="bin_dir" type="pear-config" />see http://pear.php.net/manual/en/guide.developers.package2.tasks.php#guide.developers.package2.tasks.windowseol
(2) Speaking of examples... I have a number of subdirectories that are used for
non-PHP files -- things like docs, examples, and tests. Currently, my
directory hierarchy looks like:
File/
Fortune.php
Fortune/
Exception.php
Writer.php
doc/
(phpDoc generated docs)
examples/
phpFortune
tests/
(Fortune.php related tests and test data files)
Fortune/
(Fortune/Writer.php related tests and test data files)
My question is: what is the proper hierarchy for these subdirectories?
Should they be under File/ or under File/Fortune/ ?
if role is doc or data that will go under pear_dir/doc/File_Fortune/ or pear_dir/data/File_Fortune/ with your subdirectories
(3) In my phpt test files, when I require() or include() one of the class files, should I use dirname(__FILE__) to grab them, or simply 'File/Fortune.php', etc.? Simply File/Fortune.php as any script: that must be executable from anywhereBon courage ! à+ -- bertrand "toggg" Gugger