Yep that was done to pass the XT tests for a release.  Joe can you
look at those returns again?

That advice from perlcritic needs to be taken with a large grain of salt.
In the past I have been bitten by this several times. It is generally
safer to leave 'return undef' unless one carefully analyzes in what
context a subroutine is being called. I'd suggest to revert that
changeset entirely.
  Mark


If a subroutine is supposed to return exactly one scalar
and is using a return, that return must be a 'return undef'.

Consider the surprising behaviour:

perl -le '
  sub foo {$a=shift; return if !$a; sin($a)};
  ($x, $y, $z) = (foo(3), foo(0), 9);
  print "x=$x, y=$y, z=$z"'

x=0.141120008059867, y=9, z=


  Mark

Reply via email to