configuration package
by Cristina Bulfon other posts by this author
Oct 10 2000 4:17PM messages near this date
Mailing list archives
|
Re: configuration package
Hello,
I'd like to have a sort of configuration file, where I can insert all my
global variables, for doing this I created a filename
called "Configuration.pm" :
........
package Configuration;
use strict;
use vars qw (@ISA @EXPORT @EXPORT_OK $VERSION);
use Exporter;
$VERSION= 1.0;
@ISA = qw (Exporter);
#Definition of global variables
@EXPORT = qw (@Site
@Semaphore
);
@Configuration::Site = ("caltech","ccin2p3","caspur", "cu-boulder","ral");
@Configuration::Semaphore = ("transferInProgress",
"transferDone","objyImportInProgress","objyImportDone");
and in my main program I called the perl module using "require
Configuration.pm"
my problem is: I'd really like to naming the global array in main program
like @Site or @Configuration rather than "@Configuration::Site" ..
I read in Perl CookBook that I have to use @EXPORT but doesn't work
Any idea ...
thanks
cristina
_____________________________________________________________________________
Cristina Bulfon E-mail Cristina.Bulfon@[...].edu
Stanford Linear Accelerator Center Phone +1-650-926-5028
PO Box 4349, M/S 88 Fax +1-650-926-3329
Stanford, CA 94309, USA
_____________________________________________________________________________
Thread:
Gilles Fedak
Cristina Bulfon
Kip Kohn
|