[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: commit: ldap/doc/man/man5 slapd-perl.5



Howard Chu writes:
> Since 2.4 slapd dies on unknown config directives, they won't get very far 
> before it becomes obvious what needs to be fixed.

Ah, OK.  Sounds worthy of an ITS though.
And it makes the rest of my last message a different issue:

>> If we are going to redesign the interface, it might be better do
>> do it more thorougly.  E.g. might to let
>> 	backend perl
>> 	perl-load foo
>> load foo.pm which defines backend foo, usable with 'database foo'.
>
> Huh?

Something like this - except I've likely forgotten enough Perl to
get it quite right:

back-perl creates a Perl module back_perl.  Possibly foo.pm inherits
from it.  foo.pm calls back_perl::new() which creates an ordinary new
slapd backend.  It looks up foo::<search, add...> and creates
bi_op_<search, add, ...> for the Perl functions that foo defines.  It
does not set e.g. bi_op_add if perl method foo::add does not exist.

Somehow foo.pm must be loaded, and we'll never say 'database perl'
so we can't do it there - but we can do it under 'backend perl'.

-- 
Hallvard