[PHP4BETA]: require strategies
| From: | Daniel Landau | Date: | Thu, 18 Nov 1999 02:23:32 +0000 |
| Subject: | [PHP4BETA]: require strategies | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-6416@lists.php.net to get a copy of this message | ||
How do you folks deal with the following problem (if you ever do):
FOO requires BAZ, and BAR requires BAZ, and FOO requires BAR. If both FOO
and BAR include BAZ, then a function redefinition error occurs. If FOO is
left responsible for including BAZ, and BAR is used independently of FOO
(without being included by FOO) then FOO has not included BAZ, and an
undefined function error occurs.
It seems to me that require() should be responsible for tracking this kind
of stuff, but it doesn't seem to be. Also, I though about writing a function
to track repeated includes and not repeat, but including that function would
subject to the same conundrum as above.
Any ideas?
-Daniel