From 2bed12654d7755a2bd5934dd18b2d211790c740d Mon Sep 17 00:00:00 2001 From: Adam Kennedy Date: Sat, 4 Apr 2009 22:01:41 +0000 Subject: [PATCH] Wrap the initial database code in a scope --- t/28_schemachange.t | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/t/28_schemachange.t b/t/28_schemachange.t index 09b2ba2..4c6da52 100644 --- a/t/28_schemachange.t +++ b/t/28_schemachange.t @@ -18,10 +18,12 @@ my $drop1 = 'DROP TABLE table1'; my $drop2 = 'DROP TABLE table2'; # diag("Parent connecting... ($$)\n"); -my $dbh = connect_ok(); -ok( $dbh->do($create1), $create1 ); -ok( $dbh->do($create2), $create2 ); -ok( $dbh->disconnect, '->disconnect ok' ); +SCOPE: { + my $dbh = connect_ok(); + ok( $dbh->do($create1), $create1 ); + ok( $dbh->do($create2), $create2 ); + ok( $dbh->disconnect, '->disconnect ok' ); +} my $pid; # diag("Forking... ($$)");