Justtechjobs.com Find a programming school near you






Online Campus Both


php4-beta | 199912

RE: [PHP4BETA] 'use' keyword From: Stig Bakken (ssb <email protected>)
Date: 12/02/99

On Thu, 2 Dec 1999, Samuel Liddicott wrote:

| > From: Stanislav Malyshev [mailto:stas <email protected>]
| >
| > On Thu, 2 Dec 1999 rasmus <email protected> 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?

Proooo, let us all not get excited about following symlinks here. The
point with making the path available is that the developer can check which
file actually got included for a package. If it points to a symlink, so
what? The developer will still know what code was loaded: mission
complete.

 - Stig

-- 
PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
To unsubscribe, e-mail: php4beta-unsubscribe <email protected>
For additional commands, e-mail: php4beta-help <email protected>
To contact the list administrators, e-mail: php4beta-admin <email protected>