Re: cvs: php4 /pear/scripts pear.in
| From: | Stig S. Bakken | Date: | Wed, 18 Jul 2001 00:22:32 +0000 |
| Subject: | Re: cvs: php4 /pear/scripts pear.in | ||
| References: | 1 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-289@lists.php.net to get a copy of this message | ||
"Thomas V.V.Cox" wrote:
>
> cox Tue Jul 17 15:11:49 2001 EDT
>
> Modified files:
> /php4/pear/scripts pear.in
> Log:
>
> include only the needed files
>
>
> Index: php4/pear/scripts/pear.in
> diff -u php4/pear/scripts/pear.in:1.6 php4/pear/scripts/pear.in:1.7
> --- php4/pear/scripts/pear.in:1.6 Wed May 23 10:38:09 2001
> +++ php4/pear/scripts/pear.in Tue Jul 17 15:11:48 2001
> @@ -19,8 +19,6 @@
> // +----------------------------------------------------------------------+
> //
> require_once 'PEAR.php';
> -require_once 'PEAR/Installer.php';
> -require_once 'PEAR/Packager.php';
> require_once 'Console/Getopt.php';
>
> error_reporting(E_ALL ^ E_NOTICE);
> @@ -67,6 +65,7 @@
> $command = $options[1][1];
> switch ($command) {
> case 'install':
> + require_once 'PEAR/Installer.php';
> $package = $options[1][2];
> $installer =& new PEAR_Installer($script_dir, $ext_dir, $doc_dir);
> $installer->debug = $verbose;
> @@ -77,6 +76,7 @@
> }
> break;
> case 'package':
> + require_once 'PEAR/Packager.php';
> $pkginfofile = $options[1][2];
> $packager =& new PEAR_Packager($script_dir, $ext_dir, $doc_dir);
> $packager->debug = $verbose;
Use include_once for conditional includes like this one (if you think of
require as #include in C, you will understand when it's right to use).
- Stig