in reply to Re: Behaviour on recursive use
in thread Behaviour on recursive use

Fair enough. Thank you for leading me in the way.

So, according to the imports order, the compiler will or won't load the different variables/subs in the right order, so that in my example, we have :

========= OK test : load A1 -> load A2 -> load C (but constant TYPE is not loaded already) -> not load A2 (already 'used') -> load constant TYPE ========= KO test : load A1 -> load C (but constant TYPE is not loaded already) -> load A2 -> not load C (already 'used') -> fail because constant TYPE is not loaded

Is that right?

Ok. What about the "C->TYPE" vs "C::TYPE", the first being the one that always works whatever the 'use' order. Is that a "runtime" vs "compile time", as you pointed out?

Cheers.

Replies are listed 'Best First'.
Re^3: Behaviour on recursive use
by Anonymous Monk on Mar 10, 2014 at 10:57 UTC

      Well, thanks for those explanations! it makes it all clearer about Perl's interpretation.

      Yeah, I know for the circular dependencies, I have to work on it.

      Thanks !