On Mon, Sep 26, 2011 at 1:49 PM, Hintz, David <-> wrote:
> Hi Clay,
>
> That looks like exactly what I need. So, I changed the ACL to:
>
> if(!defined($main::ENV['XPS3_HOME'])) {
> source $XPS_HOME\XPSDocs\entities\commonStartup.acl
> } else {
> source $XPS3_HOME\XPSDocs\entities\commonStartup.acl
> };
>
> It still drops into the second "source" and reports the undefined variable.
>
> Doesn't seem like this should be that hard! Any other suggestions?
DRY...
local xps_home = $main::ENV['XPS_HOME']; # or global..., if not in a function
if (defined($main::ENV['XPS3_HOME'])) { xps_home = $main::ENV['XPS3_HOME']; }
source $xps_home\XPSDocs\entities\commonStartup.acl;
-Brandon
![Smiley Happy Smiley Happy](https://sejnu66972.i.lithium.com/i/smilies/16x16_smiley-happy.png)
> Dave
> -----Original Message-----
> From: Clay Helberg [
>
> --Clay
>
> Clay Helberg
> Senior Consultant
> TerraXML
>
>
> -----Original Message-----
> From: Hintz, David [
> startup indicating that at line 2 it's trying to use an undefined
> variable. Anyone know the correct way of doing this test?
>
> Thanks
> Dave
> Siemens
>
> -----End Original Message-----
>
>
> -----End Original Message-----
>
> -----End Original Message-----
>
>