begin { if($ENV{USE_XYZ} == 1) { use XYZ; } } [download]
In reply to Using perl module if env is enabled by ovedpo15