in reply to Logging module sometimes writes its file in the wrong directory
If you want to always use the directory the script is in, in theory you should be using FindBin, but it is rubbish. Instead, look at tye's mechanism to derive the directory from $0, in FindBin is broken (RE: How do I get the full path to the script executing?). rel2abs can be found in File::Spec as a class method, or in File::Spec::Functions as a function. (Both come with Perl.)
Using File::Basename, you can then extract the directory the script is in.
|
|---|