Re: Problem with exported Variables
        
        
        [prev]
        [thread]
        [next]
        
        [Date index for 2004/05/19]
        
        
        
        
        On Tue, May 18, 2004 at 09:52:12PM +0100, cegner@xxxxxxx.xx wrote:
> This class is for sharing default values and configuration parameters between a couple of classes:
> 
> use CMDB::Config;
> use Config::Vars qw(exportall);
> var %CONFIG = (
>     # MySQL Database
>     db_host => 'localhost',
>     db_name => 'bla',
>     db_user => 'root',
>     db_pass => '',
>     db_port => 3306,
> );
> 
> 
> The following class is for setup of Class::DBI with database connection information:
> 
> package CMDB::Backend::Tables;
> use base 'Class::DBI';
> use CMDB::Config;
> 
> CMDB::Backend::Tables->connection("DBI:mysql:$CONFIG{db_name}:$CONFIG{db_host}:$CONFIG{db_port}", $CONFIG{db_user}, $CONFIG{db_pass}); 
> 
> My problem is, that "use CMDB::Config;" seems to be ignored; the variable %CONFIG which is exported from there seems not to be imported.
> I didn't have any problems yet importing it from other classes.
> 
> Is this problem related to Class::DBI?
Works for me.  Can you produce a test script that illustrates the
problem?
Colm
        
     
    
    
        
    
  | 
    
        
              | 
            
        
    
 
	
	   
	
		
		
		Re: Problem with exported Variables
		
		 
		
		colm-cdbi 21:25 on 19 May 2004
		
		
	
 
 |