in reply to Re^4: Do modules know the callers full path?
in thread Do modules know the callers full path?

> Of all the things I was trying only abs_path($0) and abs_path((caller)[1]) DWIM.

Really? Careful!

They are different if your module is used by another intermediate module and not the root script.

> It's fun watching you guys hash it out though,

This is also hard, because you leave room for interpretation.

Only you can tell us what you exactly want.

Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^6: Do modules know the callers full path?
by Anonymous Monk on Feb 15, 2023 at 22:29 UTC
      > Of all the things I was trying only abs_path($0) and abs_path((caller)[1]) DWIM.

      Really? Careful! They are different if your module is used by another intermediate module and not the root script.

    As I'm testing it now, the module is used by a script. But it will also be used by an intermediate module! Without testing it I'm not sure which will work in both cases, or if each case requires its own solution...