why doesn't this work?
by John Deighan other posts by this author
Sep 27 2004 6:03PM messages near this date
view in the new Beta List Site
Re: why doesn't this work?
|
RE: why doesn't this work?
I'm trying to develop a Perl module that will work a bit differently
depending on which kind of database is installed. The idea is to define an
environment variable named 'Oracle' that, if set to 1, installs a different
version of a function. In the following test code, I'm trying to define one
or the other version of a function named 'callme', but it's not working.
The environment variable named 'Oracle' is set to 1 (the main script prints
out its value), but the test library still installs the second version of
callme when it should be installing the first.
================
test script:
================
use strict;
use testlib;
print("Env Var 'Oracle' is set to '$ENV{Oracle}'\n");
callme();
================
test library (testlib.pm):
================
use strict;
if ($ENV{Oracle}) {
sub callme {print("Version 1\n");}
}
else {
sub callme {print("Version 2\n");}
}
1;
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
|