Bug 7766 - C4/Auth.pm: emit DEBUG output to STDERR
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 21 Mar 2012 08:26:22 +0000 (09:26 +0100)
committerPaul Poulain <paul.poulain@biblibre.com>
Wed, 4 Apr 2012 16:09:24 +0000 (18:09 +0200)
writing to STDOUT breaks plack when running with DEBUG=1

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

C4/Auth.pm

index 0b737e7..0d5ddba 100644 (file)
@@ -1424,7 +1424,7 @@ sub checkpw {
 
     my ( $dbh, $userid, $password, $query ) = @_;
     if ($ldap) {
-        $debug and print "## checkpw - checking LDAP\n";
+        $debug and print STDERR "## checkpw - checking LDAP\n";
         my ($retval,$retcard,$retuserid) = checkpw_ldap(@_);    # EXTERNAL AUTH
         ($retval) and return ($retval,$retcard,$retuserid);
     }