|Problems? Is your data what you think it is?|
use vs. requireby reneeb (Chaplain)
|on Nov 27, 2007 at 15:05 UTC||Need Help??|
reneeb has asked for the
wisdom of the Perl Monks concerning the following question:
I've got one question:
result:A::B::new called with args: <A::B test 1>
I've search several docs, but haven't found anything that would explain why "use" and a "require" in a BEGIN block have a different behaviour than "require" or a "use"(in a string eval). Why is in one case the subroutine B called (when A is loaded in compile time) and in the other case the subroutine "new" of package A::B is called (when A is loaded in run time)?