You can export symbols from modules by using Exporter(). For example, in the automatically executed BEGIN subroutine, the Exporter will export the subroutine,
print_hidden_param_fields and the six vars associated with it. The subroutine can then be called without qualification reference to the used module, and the vars are globaly available without qualification.
BEGIN {
use Exporter();
@ISA=qw(Exporter);
@EXPORT=qw(&print_hidden_param_fields
$host_name $db_name $userid $passwd $table $pkey);
}
use vars qw($host_name $db_name $userid $passwd $table $pkey);
Take a look at Steven Holzner, "Exporting Symbols from Modules by Default", Perl Black Book, Coriolis Open Press, 1999, p. 846-847.