#!/usr/bin/perl -wT use strict; use lib '/home/4220/straitwa/www.straitway.net/shop_34/lib'; use Shop; my ($conf); #open the config file and parse it unless ($conf = do ('/home/4220/straitwa/www.straitway.net/shop_34/conf.pl')) { die ("Could not open config file"); } Shop::db_connect; #### package Shop; use strict; use Exporter; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); $VERSION = 1.00; @ISA = qw(Exporter); @EXPORT = (); @EXPORT_OK = qw(db_connect); sub db_connect { print $conf->{'db_database'}; } 1; #### { db_database => 'straitway_1', } #### Global symbol "$conf" requires explicit package name at /home/4220/straitwa/www.straitway.net/shop_34/lib/Shop.pm line 13. Compilation failed in require at ./test.pl line 4. BEGIN failed--compilation aborted at ./test.pl line 4.