[Perlgssapi-developer] DESTROY as constant
Brought to you by:
achimgrolms
From: Achim G. <per...@gr...> - 2006-02-23 19:26:12
|
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) My first-shot workaround is --- GSSAPI.pm (revision 69) +++ GSSAPI.pm (working copy) @@ -117,6 +117,7 @@ croak "& not defined" if $constname eq 'constant'; my $val = constant($constname, @_ ? $_[0] : 0); if ($! != 0) { + if ( $constname ne 'DESTROY' ) { if ($! =~ /Invalid/ || $!{EINVAL}) { $AutoLoader::AUTOLOAD = $AUTOLOAD; goto &AutoLoader::AUTOLOAD; @@ -124,6 +125,7 @@ else { croak "Your vendor has not defined GSSAPI macro $constname"; } + } } That makes the warnings go away. Do you think the patch may cause any problems? Thank you, Achim |