G'day beech,
"As you can see import is only called twice when the empty parens aren't present"
I may be missing the point your trying to make here. I would only expect import() to be called twice (once for each 'use G;'). The empty list is intended to stop import() from being called.
From use:
If you do not want to call the package's import method (for instance, to stop your namespace from being altered), explicitly supply the empty list:
use Module ();
Although the arguments to use if are (CONDITION, MODULE, ()) — see the 'perl -MO=Deparse ...' line from my OP — I'm resonably sure the third argument (the empty list) is lost due to @_ being flattened; the version of @_, used by goto &work in if::import(), no longer has that empty list.
Anyway, as I said, I think I may be missing some point you're making. If you'd care to clarify, I'd be happy to discuss further.
— Ken
In reply to Re^2: 'if' pragma and modules with an empty import list
by kcott
in thread 'if' pragma and modules with an empty import list
by kcott
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |