projects
/
virtual-ldap
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
flush STDOUT
[virtual-ldap]
/
bin
/
ldap-koha.pl
diff --git
a/bin/ldap-koha.pl
b/bin/ldap-koha.pl
index
e9ed1f9
..
640f062
100755
(executable)
--- a/
bin/ldap-koha.pl
+++ b/
bin/ldap-koha.pl
@@
-8,6
+8,17
@@
use IO::Socket;
use lib 'lib';
use LDAP::Koha;
use lib 'lib';
use LDAP::Koha;
+my $debug = $ENV{DEBUG} || 0;
+$|=1;
+
+BEGIN {
+ $SIG{'__WARN__'} = sub {
+ my $level = $1 if $_[0] =~ m/^(#+)/;
+ return if defined($level) && length($level) > $debug;
+
+ warn join("\n", @_);
+ };
+}
my $listen = shift @ARGV || 'localhost:2389';
my $sock = IO::Socket::INET->new(
my $listen = shift @ARGV || 'localhost:2389';
my $sock = IO::Socket::INET->new(