Author: coar
Date: Tue Mar  9 17:45:25 2010
New Revision: 921005

URL: http://svn.apache.org/viewvc?rev=921005&view=rev
Log:
Get mail queries working

Modified:
    labs/pulse/email-query/listex-report.pl
    labs/pulse/email-query/remail.sh

Modified: labs/pulse/email-query/listex-report.pl
URL: 
http://svn.apache.org/viewvc/labs/pulse/email-query/listex-report.pl?rev=921005&r1=921004&r2=921005&view=diff
==============================================================================
--- labs/pulse/email-query/listex-report.pl (original)
+++ labs/pulse/email-query/listex-report.pl Tue Mar  9 17:45:25 2010
@@ -4,6 +4,7 @@
 # regex for matching mailing lists on which to report.
 #
 use strict;
+use Data::Dumper;
 use DBD::mysql;
 use DBI;
 use Getopt::Long;
@@ -201,10 +202,15 @@ sub fetchdata {
     # Now connect to the database.
     #
     debug(4, 'Connecting to the database');
-    my $dsn = 'DBI:' . $ENV{PULSE_DBMS}
-        . ':database=' . $ENV{PULSE_DB_NAME}
-        . ':host=' . $ENV{PULSE_DB_HOST};
-    my $dbx = DBI->connect($dsn, $ENV{PULSE_DB_USER}, $ENV{PULSE_DB_PASSWORD},
+    my $dsn = sprintf('DBI:%s:database=%s:host=%s',
+                      $ENV{'PULSE_DBMS'},
+                      $ENV{'PULSE_DB_NAME'},
+                      $ENV{'PULSE_DB_HOST'});
+    debug(4, "DSN=$dsn");
+#    print STDERR Dumper(\%ENV);
+    my $dbx = DBI->connect($dsn,
+                           $ENV{'PULSE_DB_USER'},
+                           $ENV{'PULSE_DB_PASSWORD'},
                            {
                             RaiseError => 0,
                             PrintError => 0

Modified: labs/pulse/email-query/remail.sh
URL: 
http://svn.apache.org/viewvc/labs/pulse/email-query/remail.sh?rev=921005&r1=921004&r2=921005&view=diff
==============================================================================
--- labs/pulse/email-query/remail.sh (original)
+++ labs/pulse/email-query/remail.sh Tue Mar  9 17:45:25 2010
@@ -7,7 +7,7 @@
 # access the setup information!
 #
 RCFILE=/usr/local/labs/pulse/.pulserc
-if [ -x $RCFILE ] ; then
+if [ -e $RCFILE ] ; then
     . $RCFILE
 else
     export PULSE_DIR=/usr/local/labs/pulse



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to