#perl - Thu 29 Mar 2007 between 07:40 and 07:48



f00li5hailton: at all?
ailtonif("$var1 $var2" =~ /^good$/, /^really nice$/) { dothis...
f00li5h: yes, thanks, just wanna see what anno mean
f00li5hMADNESS
annoquit concatenating the variables
you won't get that watertight
ailtonjust with f00li5h one I think
f00li5hailton: that's a great idea.
annocheck each one for the possible value(s). straight-forward and safe
f00li5hand you can even use the grep thing i listed before then
ailtonif( $foo =~ /^good$/ and $bar =~ /^really\snice$/ ) will match: $foo good and $bar really nice not if foo is set to good really nice
but back to thequestion
[miles]good afternoon #perl ... I'm just trying to debug a SpamAssassin problem I am having, ... I'm using the LDAP scores, and I notice in my mail.log that it says "invalid credentials" ... and the line number.. I set the perl line manually with the username and password required for LDAP and it worked.. Now I notice that SA loads the ldap.cf file and the var "user_scores_ldap_password" is loaded. My password contains a # ... but when I
put$ldap->bind("uid=sysadm,dc=localhost,ou=domains,dc=ldap,dc=com", password=>"secret#pass") it works fine...
f00li5hailton: now the contents in each variable is checked
ailtoninstead of having 10 lines with checks for different combinations
[miles]I assume I need some method of escaping or something...
could anyone help me on this please?
ailtoncan I have a little list of regexps o chack against?
f00li5h[miles]: it shouldn't need escaping
ailton: i told you how to do that already
ailton: remember the thing with grep?
[miles]f00li5h: well, it's weird, it always fails when loading from the file
f00li5h[miles]: "it"?
ailtonf00li5h: it looked to complex
too
f00li5hailton: how did it look complex?
[miles]f00li5h: spamd[3978]: Invalid credentials at /usr/share/perl5/Mail/SpamAssassin/Conf/LDAP.pm line 161
ailton<f00li5h> eval: $foo = moose; [ grep $foo =~ $_ , qr/o/,qr/baz/, qr/./ ]
<buubot> f00li5h: [qr/(?-xism:o)/,qr/(?-xism:.)/]
buubot<f00li5h>: [qr/(?-xism:o)/,qr/(?-xism:.)/]
[miles]f00li5h: if I set the password directly in on that line, it auths
f00li5h[miles]: paste bin (/topic) the contents
of the config file
ailton: you don't need to look at that one, read the one before it, the one that said 2
[miles]f00li5h: not the perl script no?
f00li5h[miles]: did you write the perl script?
[miles]f00li5h: no
f00li5hi won't help with that, you can get support for that from #your_application_here
but if it's perl syntax or something like that, sure thing.

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 93 100 107 

IrcArchive