http://qs1969.pair.com?node_id=1154925


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!