Subject: | eval inside Authen::SASL::Perl->client_new dies on Linux due to signals |
inside Authen::SASL::Perl->client_new there's an eval which is intended
to try to find package for the given auth mechanism, and if it's not
found - go to next mechanism:
my @mpkg = sort {
$b->_order <=> $a->_order
} grep {
my $have = $have{$_} ||= (eval "require $_;" and $_-
Show quoted text
>can('_secflags')) ? 1 : -1;
$have > 0 and $_->_secflags(@sec) == @sec
} map {
(my $mpkg = __PACKAGE__ . "::$_") =~ s/-/_/g;
$mpkg;
} split /[^-\w]+/, $parent->mechanism
or croak "No SASL mechanism found\n";
eval "require $_;" works fine on Win, but it fails on Linux. I had to
add
local $SIG{'__DIE__'};
right before my @mpkg = sort
Bug revealed itself last night when Gmail servers update adding XOAuth
mechanism reached our server :)