Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: What are the advantages or disadvantages of "require" over "use"

by Your Mother (Chancellor)
on Apr 18, 2014 at 17:54 UTC ( #1082794=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use AllUserStuff;
    sub admin_stuff {
    ...
        require ManyMoreOtheSame;
        ...
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1082794]
help
Chatterbox?
[choroba]: No, if there are no threads, then the user wants to use MCE. If there are threads, the user can choose.
[1nickt]: choroba Understood. I'm wondering about the logic in a cpanfile. If the perl doesn't support threads, it's easy: require MCE. If the perl does support threads, as you say the user has a choice, so require both? Or, assume that irrespective of the choide
[1nickt]: ... choice, the threaded-perl user *probably* wants to use threads, therefore only require threads and leave MCE out, allowing the user to manually install if desired?
[choroba]: just require any of MCE and threads. Not sure if that's possible in the cpanfile, but should be possible early in the Makefile
[1nickt]: The app expects threads as default anyway, right?
[choroba]: that's true

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (12)
As of 2017-10-18 13:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (244 votes). Check out past polls.

    Notices?