|
Posted by Michael Carman on June 11, 2008, 10:50 am
Please log in for more thread options Uri Guttman wrote:
>
> >> 7.26: How can I find out my current package?
> MC> The answer doesn't mention caller() but probably should.
>
> the question is current package, not the called from
> package. __PACKAGE__ is all that is needed.
Mentioning caller() here seems just as appropriate as the mention of
ref(). I can understand the subtleties of why you'd consider ref() to be
the current package but the people who need this FAQ answer won't.
I don't think a strict interpretation of this question (or FAQ questions
in general) is warranted. It's likely that people wanting the called
from package will search for "perldoc -q package" and they'll find...
nothing, because there's a seemingly innocuous qualifier in front of it.
From a searching point of view I read this question as "How can I find
[some words to make a proper sentence] package?" The word "current" is
incidental -- placed there at the whim of whomever first wrote this
entry -- not a crucial part of the question.
From a practical point of view there doesn't appear to be an FAQ entry
for the called from package. (Neither "perldoc -q package" nor "perldoc
-q call" find anything.) It would fit nicely here.
-mjc
|