in reply to Assignment and use statement in the same BEGIN block
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 }'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Assignment and use statement in the same BEGIN block
by perlancar (Hermit) on Jan 31, 2019 at 12:22 UTC | |
by Discipulus (Canon) on Jan 31, 2019 at 20:31 UTC |