Subject: | Fix check glob |
MIME-Version: | 1.0 |
X-Mailer: | MIME-tools 5.427 (Entity 5.427) |
X-RT-Original-Encoding: | utf-8 |
Content-Type: | multipart/mixed; boundary="----------=_1333122957-10815-535" |
Content-Length: | 0 |
Content-Type: | text/plain; charset="UTF-8" |
Content-Disposition: | inline |
Content-Transfer-Encoding: | binary |
Content-Length: | 214 |
I have fix a glob search in t/01_about_verbose.t
The next Text::More version will add stuff in name space, and one of them is a Scalar. So to
prevent looking for something wrong, I check the if the ref is a glob.
Subject: | fix-glob-search.txt |
MIME-Version: | 1.0 |
Content-Type: | text/plain; charset="utf-8"; name="fix-glob-search.txt" |
X-Mailer: | MIME-tools 5.427 (Entity 5.427) |
Content-Disposition: | inline; filename="fix-glob-search.txt" |
Content-Transfer-Encoding: | binary |
X-RT-Original-Encoding: | ascii |
Content-Length: | 580 |
diff --git a/t/01_about_verbose.t b/t/01_about_verbose.t
index 88a74eb..a393201 100644
--- a/t/01_about_verbose.t
+++ b/t/01_about_verbose.t
@@ -40,7 +40,7 @@ while(@stack) {
}
elsif (
defined *{$this . '::ISA'} or defined &{$this . '::import'}
- or ($this ne '' and grep defined *{$_}{'CODE'}, values %{$this . '::'})
+ or ($this ne '' and grep {defined $_ && ref $_ eq 'GLOB' && defined *{$_}{'CODE'}} values %{$this . '::'})
# If it has an ISA, an import, or any subs...
) {
# It's a class/module with no version.