Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Proper way to create packages and re-usable code?

by goldenblue (Acolyte)
on Feb 11, 2016 at 08:37 UTC ( #1154925=note: print w/replies, xml ) Need Help??


in reply to Proper way to create packages and re-usable code?

Hi bt101,

maybe it's me who is missing something... but isn't one of the main reasons for having modules in the first place the re-useability in other code?

So in your example, unless you import that log4perl into every module you write, you create a dependency to your main file. I would not want to do that. If I use a module, I expect it to come with everything it needs, no matter which Programming language I am writing in.

So my answer would be: be clear in your code and 'use' every package you package needs.

Don't mix up code snippets with modules. Because to me it sounds like you are just creating code snippets that can't take care of themselves!

  • Comment on Re: Proper way to create packages and re-usable code?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2022-05-25 23:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (91 votes). Check out past polls.

    Notices?