Re: [Perlgssapi-developer] DESTROY as constant
Brought to you by:
achimgrolms
|
From: Merijn B. <me...@il...> - 2006-02-24 14:48:11
|
Quoting Achim Grolms (per...@gr...):
> On Friday 24 February 2006 13:59, Merijn Broeren wrote:
> > Quoting Achim Grolms (per...@gr...):
> > > Hello,
> > >
> > > during my testing on Authen::SASL::Perl::GSSAPI
> > >
> > > i got warnings from GSSAPI from the constants-Autoload code.
> > >
> > > looking a bit deeper I found out that on some circumstances
> > > the module tried to 'DESTROY' to the autoload handling.
> > > (I don't know why)
> >
> > Normally you provide a simple sub DESTROY {} or check in your
> > autoloader and return if it is DESTROY that is autoloaded.
>
> Just to be sure if I got that right:
> I got the warnings in cleanup, when one of the destructors
> of the xs objects is searched, like GSSAPI::Name::DESTROY.
>
> The desctructor is found by perl, but i get that warnings.
>
> 1. where do I have to place the "sub DESTROY {} "?
>
In each module that you have an autoloader in.
> 2. what means "check in your autoloader"?
>
sub AUTOLOAD {
my ($self, $search, $params) = @_;
my $name = our $AUTOLOAD;
$name =~ s/.*://;
# special case -- need to handle DESTROY or we'll get warnings
# during destruction
return if ($name eq "DESTROY");
is a traditional way to start your autoloader.
>
> But the problem I have to understand is:
> *Why* to I get the warnings when GSSAPI pm ist used
> in the Authen::SASL::Perl::GSSAPI module?
> (One difference is that init() is called twice because of MUTAL_FLAG)
>
init() is called twice as well in gss-server.pl if you connect with
-mutual. Did you try that?
Cheers,
--
Merijn Broeren | Sometime in the middle ages, God got fed up with us
Software Geek | and put earth at sol.milky-way.univ in his kill-file.
| Pray all you want, it just gets junked.
|