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

Your emphasis the script using the module demonstrates the ambiguity of the OP's question. Is this about the script (which we usually identify as whatever is in $0) or is this the file from which a particular subroutine was called, as returned by caller? "Using a module" and "calling a subroutine in a module" are different things and can happen in different files.

  • Comment on Re^6: Do modules know the callers full path?

Replies are listed 'Best First'.
Re^7: Do modules know the callers full path?
by haukex (Archbishop) on Feb 15, 2023 at 22:07 UTC
    Your emphasis the script using the module demonstrates the ambiguity of the OP's question.

    You're absolutely right of course, which is why in my other reply I asked for even more clarification.

Re^7: Do modules know the callers full path?
by LanX (Saint) on Feb 15, 2023 at 22:28 UTC
    > is this the file from which a particular subroutine was called,

    NB: caller is not only useful inside a subroutine, at the beginning of a module (i.e. outside any sub) it will report the point of use or require

    That's the basic mechanism for (original) modulinos.

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