Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

fix some regressions in v0.50_01 #14

Merged
merged 4 commits into from

1 participant

@marschap
Owner

No description provided.

@marschap marschap merged commit 470530e into perl-ldap:next
marschap added some commits
@marschap marschap LDAP.pm: avoid warning in new()
Perform substitutions on $h only if it is defined.
e80162e
@marschap marschap Message.pm: fix Net::LDAP::Message::Dummy->new()
Add the 'mesgid' property to new Net::LDAP::Message::Dummy objects
to avoid a warning in unbind().
bece0e3
@marschap marschap t/07filtermatch.t: use core module Text::Soundex
Instead of String::Approx, use the core module Text::Soundex;
adapt tests accordingly.

Note: String::Approx and Text::Soundex are not compatible in the way
that they produce the same matches.
d0698fa
@marschap marschap Makefile.PL: new features, require newer Convert::ASN1
* add new feature "IPv6 support" requiring IO::Socket::INET6
* add new feature "LWP support for the LDAP protocol family"
* tighten dependency on Convert::ASN1: require UTF8-safe version
* remove unnecessary comments
* make feature "Read/Write DSML files" explicitly depend on XML::SAX::Base
8d0abd4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 24, 2012
  1. @marschap

    LDAP.pm: avoid warning in new()

    marschap authored
    Perform substitutions on $h only if it is defined.
  2. @marschap

    Message.pm: fix Net::LDAP::Message::Dummy->new()

    marschap authored
    Add the 'mesgid' property to new Net::LDAP::Message::Dummy objects
    to avoid a warning in unbind().
  3. @marschap

    t/07filtermatch.t: use core module Text::Soundex

    marschap authored
    Instead of String::Approx, use the core module Text::Soundex;
    adapt tests accordingly.
    
    Note: String::Approx and Text::Soundex are not compatible in the way
    that they produce the same matches.
  4. @marschap

    Makefile.PL: new features, require newer Convert::ASN1

    marschap authored
    * add new feature "IPv6 support" requiring IO::Socket::INET6
    * add new feature "LWP support for the LDAP protocol family"
    * tighten dependency on Convert::ASN1: require UTF8-safe version
    * remove unnecessary comments
    * make feature "Read/Write DSML files" explicitly depend on XML::SAX::Base
This page is out of date. Refresh to see the latest.
View
35 Makefile.PL
@@ -20,11 +20,23 @@ resources
check_nmake; # check and download nmake.exe for Win32
-requires 'Convert::ASN1' => 0.07;
+requires 'Convert::ASN1' => 0.20;
test_requires 'Test::More';
features
+ 'IPv6 support' => [
+ -default => 0,
+ 'IO::Socket::INET6' => 0,
+ ],
+ 'LDAPS support' => [
+ -default => 0,
+ 'IO::Socket::SSL' => 1.26,
+ ],
+ 'Read/Write LDIF files' => [
+ -default => 0,
+ 'MIME::Base64' => 0,
+ ],
'SASL authentication' => [
-default => 0,
'Authen::SASL' => '2.00',
@@ -37,24 +49,19 @@ features
'URI::ldap' => 1.10,
recommends 'JSON',
],
- 'LDAPS' => [
- -default => 0,
- 'IO::Socket::SSL' => 1.26,
- ],
'Read/Write DSML files' => [
-default => 0,
- 'MIME::Base64' => 0,
+ 'MIME::Base64' => 0,
'XML::SAX::Writer' => 0,
- # dependencies of XML::SAX::Writer:
- #'Text::Iconv' => 0,
- #'XML::Filter::BufferText' => 0,
- #'XML::SAX' => 0,
- #'XML::NamespaceSupport' => 0,
- #'File::Temp' => 0
+ 'XML::SAX::Base' => 0,
],
- 'Read/Write LDIF files' => [
+ 'LWP support for the LDAP protocol family' => [
-default => 0,
- 'MIME::Base64' => 0,
+ 'LWP::Protocol' => 0,
+ 'LWP::MediaTypes' => 0,
+ 'HTTP::Negotiate' => 0,
+ 'HTTP::Response' => 0,
+ 'HTTP::Status' => 0,
];
auto_install_now;
View
9 lib/Net/LDAP.pm
@@ -106,10 +106,13 @@ sub new {
foreach my $uri (ref($host) ? @$host : ($host)) {
my $scheme = $arg->{scheme} || 'ldap';
- (my $h = $uri) =~ s,^(\w+)://,, and $scheme = $1;
+ my $h = $uri;
+ if (defined($h)) {
+ $h =~ s,^(\w+)://,, and $scheme = $1;
+ $h =~ s,/.*,,; # remove path part
+ $h =~ s/%([A-Fa-f0-9]{2})/chr(hex($1))/eg; # unescape
+ }
my $meth = $obj->can("connect_$scheme") or next;
- $h =~ s,/.*,,; # remove path part
- $h =~ s/%([A-Fa-f0-9]{2})/chr(hex($1))/eg; # unescape
if (&$meth($obj, $h, $arg)) {
$obj->{net_ldap_uri} = $uri;
$obj->{net_ldap_scheme} = $scheme;
View
4 lib/Net/LDAP/Message.pm
@@ -255,7 +255,9 @@ sub Net::LDAP::Compare::is_error {
my $self = shift;
my $type = ref($self) || $self;
- $self = bless {}, $type;
+ $self = bless {
+ mesgid => Net::LDAP::Message::NewMesgID(),
+ }, $type;
$self;
}
View
8 t/07filtermatch.t
@@ -4,7 +4,7 @@ use Test::More;
use Net::LDAP::Entry;
use Net::LDAP::Filter;
-use Net::LDAP::FilterMatch qw(String::Approx);
+use Net::LDAP::FilterMatch qw(Text::Soundex);
# Each line consists of an OPCODE-LIST and a DN,
# where
@@ -160,9 +160,9 @@ yes (cn~=jonothan doe)
yes (cn~=jonathan do)
yes (cn~=john doe)
yes (cn~=jon doe)
-no (cn~=jomatan doe)
-no (cn~=jonatan oe)
-no (cn~=jon dee)
+yes (cn~=jomatan doe)
+yes (cn~=jonatan oe)
+yes (cn~=jon dee)
## extensible match
yes (cn:dn:=John Doe)
Something went wrong with that request. Please try again.