Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Is it possible load optional modules from PERL5OPT?

by jo37 (Curate)
on Aug 17, 2025 at 10:59 UTC ( [id://11166036]=note: print w/replies, xml ) Need Help??


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,
🐻

$gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$

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
    Thank you, this is exactly what I was looking for!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11166036]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2026-03-11 01:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.