JuliaLang/julia — pull request #990 by carlobaldassi (2012-06-29 11:20:33+00:00)
Title: [RFC] Absolute paths in require

Currently, `require` uses the provided file name to determine if the file was already loaded. A better approach is to use the full absolute path, so that there are no issues when changing directories etc. (I noticed those issues when testing).

This is basically what this commit does (plus some housekeeping stuff); however, I'm afraid the way I implemented `abs_path` is very linux-specific:

```Julia
function abs_path(fname::String)
readchomp(`readlink --canonicalize-missing $fname`)
end
```

I don't know if this works on Darwin/BSD/etc. (let alone Windows). Since this is also indirectly used in `load`, I'm afraid it could make a lot of people unhappy.
Any comments/suggestions on how to get the same functionality in a more portable way?