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.

Marcel


_______________________________________________
OpenCA-Devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/openca-devel

Reply via email to