RE: [PHP4BETA] 'use' keyword

From: Date: Thu, 02 Dec 1999 10:40:41 +0000
Subject: RE: [PHP4BETA] 'use' keyword
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-7233@lists.php.net to get a copy of this message
> -----Original Message----- > From: Stanislav Malyshev [mailto:stas@zend.com] > Sent: Thursday, December 02, 1999 07:24 AM > To: rasmus@php.net > Cc: php4beta@lists.php.net > Subject: Re: [PHP4BETA] 'use' keyword > > > On Thu, 2 Dec 1999 rasmus@php.net wrote: > > >> > If someone does use "../foo.php" and .. is /www/php what > would you expect > >> > in the array? > >> > $USED_PACKAGES["foo.php"] -> /www/php/foo.php? > >> > >> Yeah, I think that is what I would expect. Symbolic links might be > >> another issue. We might want to follow any symbolic links and > use the end > >> point. > > This isn't going to cure the problem. Not outright, but it gives people a chance to cure the problem more easily. > You have hardlinks, symlinks, and > whatever abomination you can imagine with new filesystem on NT5, and > whatever you could have on other FSes. The problem is that you are trying > to use filename as an ID, while it isn't - you can have two different > filenames with one file (as for a file on Unix it's inode what is ID, not > a name), and different files with one package, and it would be still the > same package. Unless you explicitly mark is as a package (like Perl's > package keyword), you can't identify it, and no games with symlinks are > going to help. It would be just a kludge, which cures the symptoms, > keeping the disease intact. Despite what you say (which is true) it is still more useful than not having it. I'm sure with a health warning about symlinks and other ghastly abominations it will be well received and usefull to most people who will always access the package the same way, whichever way that is. Failing that we could use MS-style GUIDS in the file to identify if the exact same file has been loaded? Sam

« previous php.version4 (#7233) next »