pQmars/qcw-dev/standalone/bin admin.pl,1.2,1.3

0 views
Skip to first unread message

alexander sasha wait

unread,
Oct 11, 2005, 4:21:51 PM10/11/05
to alexan...@users.sourceforge.net
Update of /cvsroot/corewar/pQmars/qcw-dev/standalone/bin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4183/qcw-dev/standalone/bin

Modified Files:
admin.pl
Log Message:
testing run of perl scripts in the background


Index: admin.pl
===================================================================
RCS file: /cvsroot/corewar/pQmars/qcw-dev/standalone/bin/admin.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** admin.pl 11 Oct 2005 00:20:53 -0000 1.2
--- admin.pl 11 Oct 2005 20:21:49 -0000 1.3
***************
*** 14,20 ****
my $mysql_uid = $ENV{"COREWORLD_MYSQL_USER"};
my $mysql_pw = $ENV{"COREWORLD_MYSQL_PASSWORD"};

my $dbh = DBI->connect ("DBI:mysql:$mysql_db:$mysql_srv",
! $mysql_uid, $mysql_pw, { RaiseError => 1 });

if ($args{m}) {
--- 14,24 ----
my $mysql_uid = $ENV{"COREWORLD_MYSQL_USER"};
my $mysql_pw = $ENV{"COREWORLD_MYSQL_PASSWORD"};
+ my $qcw_bin = $ENV{"COREWORLD_BIN"};

my $dbh = DBI->connect ("DBI:mysql:$mysql_db:$mysql_srv",
! $mysql_uid,
! $mysql_pw,
! { RaiseError => 1, AutoCommit =>0 }) ||
! die "Database connection not made: $DBI::errstr";

if ($args{m}) {
***************
*** 27,31 ****
stop();
}
! else {
my $var = "+";

--- 31,42 ----
stop();
}
! else {
! default();
! }
!
! $dbh->disconnect;
!
! sub default {
!
my $var = "+";

***************
*** 35,42 ****
print "$j\n";
}
- print "that's OK too I guess.\n";
- }

! $dbh->disconnect;


--- 46,65 ----
print "$j\n";
}

! my $sql = qq{ CREATE TABLE admin ( id INT NOT NULL AUTO_INCREMENT,
! pid INT NOT NULL,
! text LONGTEXT NOT NULL,
! PRIMARY KEY (id)) };
! eval {
! $dbh->do ($sql);
! $dbh->commit();
! };
!
! if ($@) {
! print "$@\n";
! $dbh->rollback();
! }
! print "$$ is running.\n";
! }



Reply all
Reply to author
Forward
0 new messages