in reply to Spanning Modules Across Multiple Files

Slap me if im worng, but wouldn't it be a little cleaner for you to maintain 1 file, but use @EXPORT_OK and just call your module with the functions you need to use. If you don't explicitly push functions on @EXPORT you will keep the calling program form sucking up your whole module.
use my_module qw( func1 funk2 ) ;
This is how i understand @EXPORT and @EXPORT_OK

Replies are listed 'Best First'.
Re: Re: Spanning Modules Across Multiple Files
by caedes (Pilgrim) on Jul 05, 2002 at 12:47 UTC
    Well, right now I'm not using Exporter at all. I'm just calling the functions like so: Zephir::function('param');

    -caedes

      hrmm.. usually a good idea to at least setup @EXPORT so you don't poision your main app with all your functions.
      package my_module ; use strict ; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); $VERSION = 1.00; @ISA = qw(Exporter); @EXPORT = qw(&db_open &db_close) ; @EXPORT_OK = qw(&db_open &db_close &db_store &db_fetch &db_keys); #your subs go here 1;
      Least this is what i do.. look at the Module Tutorials

        Yes, that's exactly the point. I'm not exporting anything and so not poisoning the caller's namespace with anything that it doesn't specifically use.

        -caedes