in reply to Use of Handle to use subroutines in a module

The short answer is that TeamSite::Config is an object-oriented module whereas File::Copy is a functional module.

With your proprietory module, $handle becomes an object of class TeamSite::Config; you then call methods like this: $handle->method_name().

Here's some documentation that may be of help: search for Perl OO on the perl manpage. Update: also perlobj - Perl objects.

The details regarding the File::Copy side of things can be found in the documentation for the use function and the Exporter module. Here's a few notes regarding your specific case - this is an oversimplification so do read the doco for full details.

Some modules export functions automatically. If your code is written as:

use File::Copy;

Taking a quick peek at File::Copy's source code:

@EXPORT = qw(copy move); @EXPORT_OK = qw(cp mv);

You'll find move and copy are exported automatically (@EXPORT); while cp and mv are optional (@EXPORT_OK). You could choose to use the abbreviated names with: use File::Copy qw{cp mv}; or decide to disallow any exports with: use File::Copy ();.

Documentation for @EXPORT, @EXPORT_OK and %EXPORT_TAGS is often lacking; I typically check the source rather than rely on what the documentation is telling me.

Finally, just because TeamSite::Config is an object-oriented module does not mean it cannot also export functions or data. Check your in-house doco.

-- Ken