Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: Modules return value

by kcott (Archbishop)
on Jan 17, 2023 at 17:18 UTC ( [id://11149648]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Modules return value
in thread Modules return value

G'day cavac,

While I don't necessarily disagree with anything you wrote there, I'm wondering if we're talking at cross-purposes.

In the past, I've certainly written modules which, as part of loading, attempt to include some other module whose name is determined dynamically (perhaps based on environment, config, or similar). I would expect failure to be handled a little more elegantly:

Some/Module.pm failed to load because ...

Rather than what you refer to as "crash-and-burn":

Some/Module.pm did not return a true value ...

Could you provide some skeleton code that clarifies the scenario you're describing? Thankyou.

— Ken

Log In?
Username:
Password:

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

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

    No recent polls found