On Mon, September 12, 2005 1:28 pm, Hirmke Michael wrote: >> The eval should have caught the die. However I would personally >> have placed the assignment outside the eval >> >> $oSASL = eval { Authen::SASL->new( >> mechanism => "GSSAPI", >> callback => { >> user => ' ', >> }, >> ) }; > > $sSASLMech = "GSSAPI"; > $oSASL = eval { Authen::SASL->new( > mechanism => $sSASLMech, > callback => { > user => ' ', > }, > ) }; > > still results in > > No SASL mechanism found > at c:/Programme/Perl/site/lib/Authen/SASL.pm line 73
Do you have a $SIG{__DIE__} handler installed ?? If you don't, then ignore me :-) If you do I suggest you reconsider why you do. The reason is because $SIG{__DIE} is global and prevents the common idiom of eval {} from working without manually doing a local($SIG{__DIE__}, $SIG{__WARN__}); inside the eval {} block. Graham.