summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Ollis <plicease@cpan.org>2019-03-27 21:47:00 -0400
committerGraham✈️✈️ <plicease@cpan.org>2019-03-27 23:23:11 -0400
commitf7c810395c9a4a755975b9426a5d8594131472f2 (patch)
tree33d6e8ab669b32e0f8b45b54e9cf2ed16aed9673
parentb1cb1f26b9fcc03b18192627452641b85c04f673 (diff)
compat with Devel::Hide #6
-rw-r--r--lib/Class/Inspector.pm4
-rwxr-xr-xmaint/cip-before-install5
-rw-r--r--t/class_inspector__devel_hide.t11
3 files changed, 19 insertions, 1 deletions
diff --git a/lib/Class/Inspector.pm b/lib/Class/Inspector.pm
index c295a09..711365f 100644
--- a/lib/Class/Inspector.pm
+++ b/lib/Class/Inspector.pm
@@ -85,7 +85,9 @@ sub _resolved_inc_handler {
my $ref = ref $inc;
if($ref eq 'CODE') {
my @ret = $inc->($inc, $filename);
- if(@ret) {
+ if(@ret == 1 && ! defined $ret[0]) {
+ # do nothing.
+ } elsif(@ret) {
return 1;
}
}
diff --git a/maint/cip-before-install b/maint/cip-before-install
new file mode 100755
index 0000000..badcb2f
--- /dev/null
+++ b/maint/cip-before-install
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+set -ex
+
+cip exec cpanm Devel::Hide
diff --git a/t/class_inspector__devel_hide.t b/t/class_inspector__devel_hide.t
new file mode 100644
index 0000000..f18796a
--- /dev/null
+++ b/t/class_inspector__devel_hide.t
@@ -0,0 +1,11 @@
+use strict;
+use warnings;
+use Test::More;
+use Class::Inspector;
+
+eval q{ use Devel::Hide };
+plan skip_all => 'test requires Devel::Hide' if $@;
+plan tests => 2;
+
+ok( Class::Inspector->installed('Class::Inspector') );
+ok( ! Class::Inspector->installed('Class::Inspector::Bogus') );