in reply to Question perlcritic ProhibitExplicitReturnUndef

Perlcritic tests for common errors; the cases where a return undef; would better be written as a bare return; are probably more common than the other way round, so I wouldn't call it bogus.

You have to decide for yourself if you call it "questionable", but what's wrong with just ignoring the warnings, or turning them off?

Replies are listed 'Best First'.
Re^2: Question perlcritic ProhibitExplicitReturnUndef
by mje (Curate) on Feb 06, 2009 at 10:35 UTC

    There is no problem with turning this warning off - that is easily achieved. I was less complaining about the warning and more the explanation. I was slightly concerned that the critic explanatory text makes it sound like if you use "return undef" you should stop and replace it with a straight return without pointing out that you could easily break your code if you use the function in list context.