A use within a BEGIN is effectively a BEGIN within a BEGIN.
This should work:
perl -wE'BEGIN { $vars{k} = "v1"; require Acme::PERLANCAR::DumpImportA +rgs; import Acme::PERLANCAR::DumpImportArgs %vars }'
In reply to Re: Assignment and use statement in the same BEGIN block
by tobyink
in thread Assignment and use statement in the same BEGIN block
by perlancar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |