Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


use boolean? #171

dkulchenko opened this Issue · 4 comments

3 participants


Maybe include 'use boolean;' as one of the loaded modules?

Globally defines true() and false() so you can do:

if( thisworks() ) {
    return true;

I used to do something like this. I'm dubious about its value. Mostly because it encourages return false; where most of the time you really want return;.

Working with Ingy (the author of boolean) it seems the value of boolean is mostly to provide a boolean object that something like YAML and JSON can serialize properly.


Is it possible to add a warning for return false; and return undef;?


I don't know about a warning, but a perlcritic policy would be easy.

However, there are plenty of times when you DO want to return false.


I suggested a warning because you could (en|dis)able it lexically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.