What is the preferred way to write a program (cgi,console - doesn't really matter) and group related functionality into separate files? I have searched PM, and Google; read Learning Perl and Programming Perl and have not yet found an answer. If it is obvious and I have missed it, please forgive me. Let's assume the following:
- I do not care if I do or do not pollute my namespace.
- I am not currently doing OO, but I will on another project
- I was hoping to avoid having to use a package name qualifier and exporting/importing (obviously this does not apply when I am using OO)
- I want the files to reside in the same directory the main program file resides. Or possibly in a nested directory under that same directory. I cannot install this as a module on the system, I only have limited access to where I can put my files.
I do alot of C# and VB.NET programming, and when I want to include functionality from another file, I simply include the namespace the object resides in. When doing classic ASP, I would simply #include the file containing the functions I want. So what is the preferred method of including functions from other files within the same application?