ovedpo15 has asked for the wisdom of the Perl Monks concerning the following question:
Hello monks,
I have a module XYZ.
I would like to use it in my code $USE_XYZ is enabled. I tried to add:
How can I acheive this behaviour?
I have a module XYZ.
I would like to use it in my code $USE_XYZ is enabled. I tried to add:
but it looks like it still being used, even though $USE_XYZ is undefined.begin { if($ENV{USE_XYZ} == 1) { use XYZ; } }
How can I acheive this behaviour?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Using perl module if env is enabled
by tobyink (Canon) on Dec 09, 2019 at 15:20 UTC | |
Re: Using perl module if env is enabled
by davido (Cardinal) on Dec 09, 2019 at 16:42 UTC | |
Re: Using perl module if env is enabled
by Corion (Patriarch) on Dec 09, 2019 at 15:19 UTC | |
Re: Using perl module if env is enabled
by haukex (Archbishop) on Dec 09, 2019 at 15:24 UTC | |
by tobyink (Canon) on Dec 09, 2019 at 16:07 UTC | |
Re: Using perl module if env is enabled (-MXYZ PERL5OPT=-MXYZ perlcritic -brutal)
by Anonymous Monk on Dec 10, 2019 at 04:25 UTC | |
Re: Using perl module if env is enabled
by Anonymous Monk on Dec 10, 2019 at 16:40 UTC |
Back to
Seekers of Perl Wisdom