Subject: | Net::LDAP::Server bug revealed in 5.9.x |
Hi.
I just uploaded Net::LDAP::Server::Test to cpan which uses
Net::LDAP::Server for testing against a mock ldap server.
However, I see failed tests for all the newer bleed perls in the 5.9.x
branch. This is due to the changed behaviour of the 'use fields' pragma
in 5.9.
The patch below fixes the issue. It now passes tests for me on both
5.8.8 and 5.9.5.
Cheers.
pek
--- /home/msi/pek/perl/lib/perl5/site_perl/5.8.8/Net/LDAP/Server.pm.5.8
2007-10-16 11:25:28.715929000 -0500
+++ /home/msi/pek/perl/lib/perl5/site_perl/5.8.8/Net/LDAP/Server.pm
2007-10-16 11:26:15.640054000 -0500
@@ -46,11 +46,11 @@
our @reqTypes = keys %respTypes;
sub new {
- my ($class, $sock) = @_;
- my $self = fields::new($class);
- $self->{socket} = $sock;
- bless $self, ref $class || $class;
- return $self;
+ my ($proto, $sock) = @_;
+ my $class = ref($proto) || $proto;
+ my $self = fields::new($class);
+ $self->{socket} = $sock;
+ return $self;
}