> I've got a program that uses the Net::LDAP libraries. When I > run the .pl script, it works fine. When I run the > PAR-compiled version, I get the following errors: > > > "LDAP_SUCCESS" is not exported by the Net::LDAP::Constant module at > > Net/LDAP/Message.pm line 7 "LDAP_COMPARE_TRUE" is not > exported by the > > Net::LDAP::Constant module at Net/LDAP/Message.pm line 7 > > "LDAP_COMPARE_FALSE" is not exported by the > Net::LDAP::Constant module > > at Net/LDAP/Message.pm line 7 Can't continue after import errors at > > Net/LDAP/Message.pm line 7 BEGIN failed--compilation aborted at > > Net/LDAP/Message.pm line 7, <DATA> line 20.
The following simple test works for me (perl 5.8.7, PAR 0.89, Net::LDAP 0.33 on Linux): use Net::LDAP qw/LDAP_SUCCESS/; print "success=", LDAP_SUCCESS, "\n"; But I had a similar problem with packaging Net::LDAP once. The problem is that Net::LDAP::Constant loads its exported constants "on demand" in a tricky way - it parses its own POD which is located after __DATA__ in the module file. Some older combination of PAR+Net:LDAP had stripped all POD from the packaged copy of Net/LDAP/Constant.pm. Can you check whether your packaged Net/LDAP/Constant.pm is identical to the installed version? Cheers, Roderich
