in reply to (tye)Re: How to set a set of our and @EXPORT variables concisely?
in thread How to set a set of our and @EXPORT variables concisely?
The only problem is: supposedly use vars is deprecated so this example must use our to remain viable in years to come. So, to use our, I guess we have to use eval
use base qw( Exporter ); our @EXPORT; BEGIN { @EXPORT= qw( $MC_CONFIG_DBI_DRIVER $MC_CONFIG_DB_NAME $MC_CONFIG_DB_USER $MC_CONFIG_DB_PWD $MC_CONFIG_FILE $MC_CONFIG_FEED_LOGS $MC_CONFIG_ARCHIVE_LOGS ); eval "our $_;" for @EXPORT; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re2: How to set a set of our and @EXPORT variables concisely?
by tye (Sage) on Nov 21, 2000 at 20:34 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |