Hi list,

Maybe one of you has a clue why I get a false error message when using
Env::Sourced. My (test-)script is as follows:

#!/usr/bin/perl -w
use strict;
use warnings;
require Env::Sourced; # "require" necessary in main programme, just not
changed for testing

my $w_conf = $ENV{'W_UMG_CONFIG_PFAD'};
my $oraenv;
my $orapat = '9208';

print "Environment BEFORE:\n", `env |grep ORA`, "\n"; 

if ( $orapat ne 'D' ) {
        $oraenv = "$w_conf/ora$orapat.env"; # coalesce path + filename
        print "OraEnv: $oraenv\n"; # check absolute file name
        Env::Sourced->import($oraenv) or warn "Fehler beim Setzen des
Oracle-Environments: $!\n"; # set environment
}

print "\nEnvironment AFTER:\n", `env |grep ORA`, "\n"; 


BUT I get the following output:

oracle:/opt/data/magna/wartung/work/nora>./test.pl
Environment BEFORE:
ORACLE_BASE=/opt/app/oracle
ORACLE_SID=
ORA_NLS=/opt/app/oracle/product/9.2/ocommon/nls/admin/data
ORACLE_TERM=vt220
ORA_NLS32=/opt/app/oracle/product/9.2/ocommon/nls/admin/data
ORA_NLS33=/opt/app/oracle/product/9.2/ocommon/nls/admin/data
ORADATA=/opt/app/oracle/oradata1
ORACLE_HOME=/opt/app/oracle/product/9.2

OraEnv: /opt/data/magna/umgebungen/config/ora9208.env
Fehler beim Setzen des Oracle-Environments:

Environment AFTER:
ORACLE_BASE=/opt/app/oracle
ORACLE_SID=
ORA_NLS=/opt/app/oracle/product/9.2.0.8/ocommon/nls/admin/data
ORACLE_TERM=vt220
ORA_NLS32=/opt/app/oracle/product/9.2.0.8/ocommon/nls/admin/data
ORA_NLS33=/opt/app/oracle/product/9.2.0.8/ocommon/nls/admin/data
ORADATA=/opt/app/oracle/oradata1
ORACLE_HOME=/opt/app/oracle/product/9.2.0.8

The absolut path to the environment file is ok, and judging from the
"Environment AFTER" output it is also being read/sourced, nevertheless I
get the warning that there was an error when sourcing the file (and even
an incomplete one, it does not give me the $!). Anybody got an idea?

Thanks in advance, 
Nora 



Reply via email to