Marcel Juffermans schrieb:
>
> In OpenSSL.pm there is a code snippet:
>
> if( not(defined($outfile)) || $outfile eq "" ) {
> <snip/>
> } else {
> <snip/>
> }
>
> This doesn't seem to work as expected - if $outfile is undefined, then the
> else clause is taken.
>
> It works as expected if the condition is changed to use 'or' instead of
> '||':
>
> if( not(defined($outfile)) or $outfile eq "" )
>
> or even just:
>
> if( !$outfile )
>
> I'm not a Perl expert, but this seems weird behaviour to me. We're using
> Perl version 5.005_03 on Linux and Solaris, but I've also reproduced this
> behaviour on 5.001. I first thought it might be operator precedence, but eq
> has higher precedence than ||, so that can't be it.I found four such bugs in OpenSSL.pm. All of them are fixed. I attached the changed module. Michael -- ------------------------------------------------------------------- Michael Bell Email (private): [EMAIL PROTECTED] Rechenzentrum - Datacenter Email: [EMAIL PROTECTED] Humboldt-University of Berlin Tel.: +49 (0)30-2093 2482 Unter den Linden 6 Fax: +49 (0)30-2093 2959 10099 Berlin Germany http://www.openca.org
OpenSSL.pm.gz
Description: GNU Zip compressed data
