in reply to Re^2: Do modules know the callers full path?
in thread Do modules know the callers full path?
in my tests it's relative to the CWD at start
Right, which is why abs_path((caller)[1]) should work in a lot of cases, but certainly not all, which is why I asked OP if perhaps they have one of those cases.
Of course, since FindBin tries to give a correct answer, it should be possible to simply steal its code, change it so it doesn't just work on $0, and then apply it to caller in a module's import - if someone hasn't done this already.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Do modules know the callers full path?
by LanX (Saint) on Feb 15, 2023 at 21:11 UTC | |
by haukex (Archbishop) on Feb 15, 2023 at 21:20 UTC | |
by haj (Vicar) on Feb 15, 2023 at 22:00 UTC | |
by haukex (Archbishop) on Feb 15, 2023 at 22:07 UTC | |
by LanX (Saint) on Feb 15, 2023 at 22:28 UTC | |
by LanX (Saint) on Feb 15, 2023 at 21:28 UTC |