From: Graham B. <gb...@us...> - 2002-01-24 15:21:46
|
Update of /cvsroot/perl-ldap/sasl/lib/Authen/SASL In directory usw-pr-cvs1:/tmp/cvs-serv21369/lib/Authen/SASL Modified Files: Perl.pm Log Message: Allow callback to be called on the connection object Index: Perl.pm =================================================================== RCS file: /cvsroot/perl-ldap/sasl/lib/Authen/SASL/Perl.pm,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- Perl.pm 2002/01/24 12:04:16 1.1.1.1 +++ Perl.pm 2002/01/24 15:21:43 1.2 @@ -56,6 +56,17 @@ 1; } +sub callback { + my $self = shift; + + return $self->{callback}{$_[0]} if @_ == 1; + + my %new = @_; + @{$self->{callback}}{keys %new} = values %new; + + $self->{callback}; +} + # Should be defined in the mechanism sub-class sub mechanism { undef } sub client_step { undef } |