Author: turnstep
Date: Thu Jan 17 19:33:05 2008
New Revision: 10598
Modified:
DBD-Pg/trunk/t/01connect.t
Log:
Define vars use in END block very early, in case we hit a undefined symbol
error.
Modified: DBD-Pg/trunk/t/01connect.t
==============================================================================
--- DBD-Pg/trunk/t/01connect.t (original)
+++ DBD-Pg/trunk/t/01connect.t Thu Jan 17 19:33:05 2008
@@ -13,9 +13,10 @@
select(($|=1,select(STDERR),$|=1)[1]);
## Define this here in case we get to the END block before a connection is
made.
-my ($pgversion,$pglibversion,$pgvstring,$pgdefport) = ('?','?','?','?');
-
-my ($dbh,$connerror,$helpconnect);
+BEGIN {
+ use vars qw/$pgversion $pglibversion $pgvstring $pgdefport $helpconnect
$dbh $connerror/;
+ ($pgversion,$pglibversion,$pgvstring,$pgdefport) = ('?','?','?','?');
+}
($helpconnect,$connerror,$dbh) = connect_database();