Re: pear2 allfiles
| From: | Greg Beaver | Date: | Fri, 10 Aug 2007 19:52:24 +0000 |
| Subject: | Re: pear2 allfiles | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-47771@lists.php.net to get a copy of this message | ||
Evert | Rooftop wrote:
> I noticed the following in the wiki:
>
> <?php
> // note the lack of dependency on include_path - essential for beginners
> if (!class_exists(PEAR2_Exception)) {
> class PEAR2_Exception extends Exception {}
> }
> require dirname(__FILE__) . '/Base.php';
> require dirname(__FILE__) . '/Exception.php';
> require dirname(__FILE__) . '/Drivers/Common.php';
> require dirname(__FILE__) . '/Drivers/Simple.php';
> require dirname(__FILE__) . '/Drivers/Fancy.php';
> ?>
>
>
>
> The main reason you would want allfiles.php it allows the opcode cache
> to be kicked in, in the PHP parsing phase.
> Making use of dirname(__FILE__) makes this a conditional include (just
> like autoload), which this won't be evaluated during the parsing phase.
>
> I'd suggest to remove the part that says "opcode caches friendliness". I
> didn't want to change this myself without prior consent.
I agree. This appears to be a recent revision, and is incorrect. The
purpose of allfiles.php is to make it easy for beginners to use a
package without any trouble. Beginners generally don't care about
performance in terms of load time, but rather would like to see how the
thing works.
I am almost back from the most insanely crazy summer of my entire life,
and will be hacking away on this proposal. Thanks for everyone's patience.
Greg