perlancar has asked for the wisdom of the Perl Monks concerning the following question:
I'm wondering if other monks have been bitten by this. FYI, Acme::PERLANCAR::DumpImportArgs is just a supersimple module to dump its import() arguments.
% perl -wE'BEGIN { $vars{k} = "v1"; use Acme::PERLANCAR::DumpImportArgs %vars }' Import arguments: "Acme::PERLANCAR::DumpImportArgs" % perl -wE'BEGIN { $vars{k} = "v1" } use Acme::PERLANCAR::DumpImportArgs %vars;' Import arguments: ("Acme::PERLANCAR::DumpImportArgs", "k", "v1")
No warnings.
Also, I wanted %vars to be lexical.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Assignment and use statement in the same BEGIN block
by choroba (Cardinal) on Jan 31, 2019 at 07:39 UTC | |
Re: Assignment and use statement in the same BEGIN block
by Discipulus (Canon) on Jan 31, 2019 at 08:03 UTC | |
Re: Assignment and use statement in the same BEGIN block
by tobyink (Canon) on Jan 31, 2019 at 09:06 UTC | |
by perlancar (Hermit) on Jan 31, 2019 at 12:22 UTC | |
by Discipulus (Canon) on Jan 31, 2019 at 20:31 UTC |