Index: /trunk/PS-IPP-Config/lib/PS/IPP/Config.pm
===================================================================
--- /trunk/PS-IPP-Config/lib/PS/IPP/Config.pm	(revision 11834)
+++ /trunk/PS-IPP-Config/lib/PS/IPP/Config.pm	(revision 11835)
@@ -1,5 +1,5 @@
 # Copyright (c) 2006  Paul Price, Joshua Hoblitt
 #
-# $Id: Config.pm,v 1.29 2007-02-09 03:55:22 price Exp $
+# $Id: Config.pm,v 1.30 2007-02-15 22:35:38 price Exp $
 
 package PS::IPP::Config;
@@ -60,5 +60,6 @@
     $name = $ENV{HOME} . '/.ipprc' unless defined $name;
 
-    open my $file, $name;
+    my $file;			# File handle
+    open $file, $name;
     unless ($file) {
 	carp "Unable to open ipprc file $name: $!";
@@ -140,5 +141,6 @@
 
     # Read the file
-    open my $file, $realfile;
+    my $file;			# File handle
+    open $file, $realfile;
     unless ($file) {
 	carp "Unable to open camera configuration file $realfile: $!";
@@ -388,5 +390,8 @@
 	my $name = $1;		# Environment variable name
 	my $value = $ENV{$name}; # Environment variable value
-#	print "Replacing $name with $value.\n";
+	unless (defined $value) {
+	    carp "Unable to find environment variable $name";
+	    exit($PS_EXIT_SYS_ERROR);
+	}
 	$dir =~ s/\$\{?$name\}?/$value\//;
     }
