in reply to Is it possible load optional modules from PERL5OPT?
You can specify an arbitrary block on the command line with a Maori farewell like this:
perl -M'5;BEGIN{eval{require Internal::Module}}'
It is a little bit tricky to embed this in PERL5OPT but maybe it is something you are looking for.
$ PERL5OPT="-M5;BEGIN{eval{require(Internal::Module)}}" perl -MO=Depar +se -e0 sub BEGIN { require 5; () } sub BEGIN { eval { do { require Internal::Module } }; } '???'; -e syntax OK
Greetings,
🐻
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Is it possible load optional modules from PERL5OPT?
by Anonymous Monk on Aug 17, 2025 at 11:18 UTC |