Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: Base script behavior on presence (or non-) of a module

by Eliya (Vicar)
on Dec 21, 2011 at 18:31 UTC ( [id://944674]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Base script behavior on presence (or non-) of a module
in thread Base script behavior on presence (or non-) of a module

It's perhaps worth pointing out that those weren't core modules in 5.8.x.

To me, it sounds like the OP is targetting a wide range of installations, trying to settle on the "lowest common denominator". So there might be 5.8 installations among them.

In other words, in order to not have the program die with "Can't locate Module/Load.pm in @INC ..." on 5.8 installations, the OP would have to first check the classic "built-in" way, i.e. BEGIN { eval {require Module::Load; 1} or ...}, if the module itself is available — and depending on the outcome, possibly do the loading of the other non-core modules the same classic way...

Just a thought.

Replies are listed 'Best First'.
Re^4: Base script behavior on presence (or non-) of a module
by Anonymous Monk on Dec 21, 2011 at 18:54 UTC

    Yeah

    Module::Pluggable was first released with perl v5.8.9

    Module::Load was first released with perl v5.9.4

    Both are available from CPAN :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-25 06:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found