Re: [PEPr] Comment on PEAR::NameScheme
| From: | Andrey Demenev | Date: | Sun, 06 Jun 2004 17:43:32 +0000 |
| Subject: | Re: [PEPr] Comment on PEAR::NameScheme | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-30050@lists.php.net to get a copy of this message | ||
Dmitry Koteroff wrote:
I do not offer that.AD> I can always do include_once "./system.php". This was just an example, AD> there may be more complex cases. Interesting behavour. How do you offer to handle it automatically?Andrey, if you call include_once "system.php" in your program, you also load ./system.php, not /usr/local/php/System.php. And even more — your code is not windows-compatible at all (because Windows loads files in case-insensitive mode) and bad because of that.
For example, in Perl we write something like: use My::Module; and do not care about filename of this module (Perl translates it automatically to My/Module.pm). PHP does not have this ability - and it is very pity.Pointless discussion. PHP is not Perl.
If you want ro include manual-crafted files, use include_once directly. If you want to nail, PHP would not help you, it's better to use hammer. (-;I believe it is always a good idea to explicitely control what files you include.AD> I am talking not about _coding_ standards (although they are important AD> too), but about _naming_ standards you rely on (like class OLE must AD> reside in OLE.php), which are not respected by all packages (actally it AD> is in OLE/OLE.php) OK, let it be "naming standards". AD> As I already said, I personally don't see any use in this package. What about __autoload()? What about moduled CMS which loads its modules by its name?About coding standarts — first let's vote, and in the case of positive mark I'll convert the package.
AD> I get this AD> Warning: Unknown modifier '^' in AD> c:\php4\pear\PEAR\NameScheme.php on line 55 AD> c:_php4_pear_system Fixed 2 hours ago.-- Andrey Demenev aka Blindman demenev@on-line.jar.ru