> -----Original Message-----
> From: Walter Grace [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 29, 2001 4:41 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Exported variables
> 
> 
> As a note...
> 
> If I specify the variables in the 'use' statement (ie. use SI::env 
> qw($mysqlhost $mysqluser $mysqluser $mysqlpass $db_prefix 
> die_error);), the 
> problem goes away.
> 
> I thought the idea behind @EXPORT was to not have to do that.

The problem is that if you supply any args to the "use" statement, those
args override the defaults in @EXPORT. So saying

   use SI::env qw(die_error);

will import *only* the die_error symbol. That's why you can say

   use SI::env ();

To suppress importing anything.

Fortunately, there is an easy workaround. To get the contents of @EXPORT
plus additional symbols, just use the :DEFAULT tag:

   use SI::env qw(:DEFAULT die_error);

That should do the trick. See Exporter docs for the gory details.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to