in reply to Best practices - absolute paths?

There is a conflict between the paths the programmer deals with, which should be relatives, and the paths given to the system calls, which for thread safety should be absolute (unless they're coming straight from the user, in which case the user probably knows best).

This issue is resolved by keeping a prefix directory:

File::Spec->catfile($prefix, $relative);
Which looks annoying at first, but actually works very well (and you never ever ever have to worry about portability again).

The rule of thumb I follow is - construct prefix paths as early as possible, construct relative paths as convenient, and construct absolute paths as late as possible, optimizing for the most data reuse, and using very verbose variable names.

This remains pretty clean, very readable, and flexible enough for it not to stink like hard coded paths.

-nuffin
zz zZ Z Z #!perl