DBIx::MyMod
DBIx::MyMod::db
DBIx::MyMod::st
####
use DBIx::MyMod qw(MYMOD_CONSTANT);
# connect in the root
my $h = DBIx::MyMod->connect(x,y, {XXX => MYMOD_CONSTANT});
####
fred.pl
use MyMod; # assuming all constants in EXPORT
MyMod::db->fred();
####
use strict;
use warnings;
package MyMod;
use MyMod::db;
use constant MYMOD_DEFAULT => 1;
use base qw (Exporter);
our @EXPORT = qw(MYMOD_DEFAULT);
1;
####
use strict;
use warnings;
package MyMod::db;
use MyMod;
sub fred {
print "hello" if (MYMOD_DEFAULT);
}
1;