scrottie/autobox-Core — pull request #23 by RsrchBoy (2014-04-14 19:49:58+00:00)
Title: add ::UNDEF and undef->length()

This is a convienience method, designed to make life easier when dealing
with that may or may not be undefined; namely lists.

e.g.

# ... $warnings *may* be an empty/populated arrayref or undefined
my $warnings;

# ...

# old-school:
if (!!$warnings && @$warnings) { ... }

# new-school: (if I may be so bold)
if ($warnings->length) { ... }

Enabling ->length() to work for any of these contexts stops my eyes from
crossing^W^W^W^W^Wsimplifies the logic required in this common scenario.