Fix implementation of _STRINGLIKE0
authorDave Rolsky <autarch@urth.org>
Sat, 18 Feb 2012 16:55:32 +0000 (10:55 -0600)
committerDave Rolsky <autarch@urth.org>
Sat, 18 Feb 2012 16:55:32 +0000 (10:55 -0600)
commitdcba17d107994b1899c36dd92b1e7b7c93a8f86a
treec15f00f487c6a704fbb2158472a1d7fb1fc223b2
parent48b6c41f9fe4ff286f381bb567b8e689942707f9
Fix implementation of _STRINGLIKE0

This was checking for string overloading but only considered that valid if it
returned a non-zero length string, even though for plain old strings, an empty
string was accepted.

In practice, this didn't matter, because if this check failed, it would just
check to see if "$_[0] eq q{}", which stringified the object.
lib/Moose/Util.pm