Update of /cvsroot/monetdb/clients/src/perl/Tests
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20153/perl/Tests
Modified Files:
Tag: Clients_1-20
malsample.pl.in milsample.pl.in
Log Message:
pass argument port and database to the mal/mil sample perl dbi programs
Index: milsample.pl.in
===================================================================
RCS file: /cvsroot/monetdb/clients/src/perl/Tests/Attic/milsample.pl.in,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- milsample.pl.in 20 Oct 2007 19:13:43 -0000 1.1.2.1
+++ milsample.pl.in 20 Oct 2007 20:29:03 -0000 1.1.2.2
@@ -27,7 +27,7 @@
print "data sources: @ds\n";
# connect to the database:
-my $dsn = 'dbi:monetdb:database=test;host=localhost;port=50000;language=mil';
+my $dsn =
"dbi:monetdb:database=$ARGV[1];host=localhost;port=$ARGV[0];language=mil";
my $dbh = DBI->connect( $dsn,
undef, undef, # no authentication in MIL
{ PrintError => 0, RaiseError => 1 } # turn on exception handling
Index: malsample.pl.in
===================================================================
RCS file: /cvsroot/monetdb/clients/src/perl/Tests/Attic/malsample.pl.in,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- malsample.pl.in 20 Oct 2007 19:13:42 -0000 1.1.2.1
+++ malsample.pl.in 20 Oct 2007 20:29:02 -0000 1.1.2.2
@@ -27,7 +27,7 @@
print "data sources: @ds\n";
# connect to the database:
-my $dsn = 'dbi:monetdb:database=demo;host=localhost;port=50000;language=mal';
+my $dsn =
"dbi:monetdb:database=$ARGV[1];host=localhost;port=$ARGV[0];language=mal";
my $dbh = DBI->connect( $dsn,
undef, undef, # no authentication in MAL
{ PrintError => 0, RaiseError => 1 } # turn on exception handling
@@ -48,7 +48,7 @@
{
# deliberately executing a wrong MAL statement:
my $sth = $dbh->prepare('( xyz 1);');
- eval { $sth->execute }; io.print "ERROR REPORTED: $@" if $@;
+ eval { $sth->execute }; print "ERROR REPORTED: $@" if $@;
}
$dbh->do('b:=bat.new(:int,:str);');
$dbh->do('bat.insert(b,3,"three");');
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins