Question
I have installed the
LDAPPasswordChanger Plugin. But if I try to insert %LDAPPASSWORDCHANGER% into any page I get
Software error:
Undefined subroutine &TWiki::Plugins::LDAPPasswordChangerPlugin::genDialog called at /srv/tmv114/collab/twiki-leihs/lib/TWiki/Plugins/LDAPPasswordChangerPlugin.pm line 103.
For help, please send mail to the webmaster ...
Environment
--
TorstenSchlabach - 23 Jul 2004
Answer
I had the same message displayed when I included the
LDAPPasswordChanger Plugin. In my case I the solution was to install the perl module Net::LDAP. This module is listed as a dependency for the plugin, this perl module has a couple of other dependencies most of which are optional. I am not a perl expert (actually I no almost nothing about perl) so I cannot tell you authoritatively how to tell if the perl LDAP module is installed for you but you might want to try
perl -V to get the locations of the perl libraries and then look for
Net/LDAP.pm in those locations. If you don't find it then it probably isn't installed.
--
GrahamMacKenzie - 10 Sep 2004
Answer
Yes, you're right. Installing Net::LDAP solves the problem. Actually the error message does not necessarily point you in that direction. The problem arises from the fact that the use Net::LDAP is only in the talkToLdap subroutine. This leads to all parts of the .pm before that to be compiled and all the rest (including genDialog) to be silently ignored. I am not sure if there would be a better way to handle this in Perl. Anything that would immediatelly give a clear error message such as "Net::LDAP missing" would be fine.
Anyway ... finally it's solved. And once you know it it is not a problem.
--
TorstenSchlabach - 19 Sep 2004