X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-perl%2FSampleLDAP.pm;h=f1ca8775974ff6cbd79575d00ad89040eb270c47;hb=e0952945d0b6da70703a711c91306be07d31ea1a;hp=7e42dad86c122e513f87a30aa11f1c106c238992;hpb=d6444a108d14c35568ea7100571b2e1473489d83;p=openldap diff --git a/servers/slapd/back-perl/SampleLDAP.pm b/servers/slapd/back-perl/SampleLDAP.pm index 7e42dad86c..f1ca877597 100644 --- a/servers/slapd/back-perl/SampleLDAP.pm +++ b/servers/slapd/back-perl/SampleLDAP.pm @@ -1,13 +1,8 @@ -package SampleLDAP; -use strict; -use warnings; -use POSIX; - # This is a sample Perl module for the OpenLDAP server slapd. # $OpenLDAP$ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2008 The OpenLDAP Foundation. ## Portions Copyright 1999 John C. Quillan. ## All rights reserved. ## @@ -28,15 +23,20 @@ use POSIX; # # See the slapd-perl(5) manual page for details. -our $VERSION = '1.00'; +package SampleLDAP; +use strict; +use warnings; +use POSIX; + +$SampleLDAP::VERSION = '1.01'; sub new { my $class = shift; my $this = {}; bless $this, $class; - print , "Here in new\n"; - print , 'Posix Var ' . BUFSIZ . ' and ' . FILENAME_MAX . "\n"; + print {*STDERR} "Here in new\n"; + print {*STDERR} 'Posix Var ' . BUFSIZ . ' and ' . FILENAME_MAX . "\n"; return $this; } @@ -49,7 +49,7 @@ sub search { my ( $base, $scope, $deref, $sizeLim, $timeLim, $filterStr, $attrOnly, @attrs ) = @_; - print , "====$filterStr====\n"; + print {*STDERR}, "====$filterStr====\n"; $filterStr =~ s/\(|\)//gm; $filterStr =~ s/=/: /m; @@ -150,7 +150,7 @@ sub delete { my ($dn) = @_; - print , "XXXXXX $dn XXXXXXX\n"; + print {*STDERR} "XXXXXX $dn XXXXXXX\n"; delete $this->{$dn}; return 0; } @@ -160,8 +160,8 @@ sub config { my (@args) = @_; local $, = ' - '; - print , @args; - print , "\n"; + print {*STDERR} @args; + print {*STDERR} "\n"; return 0; }