# check for any method
foreach ( keys %{$$pack} ) {
next if substr($_, -2, 2) eq '::';
- return 1 if defined *{${$$pack}{$_}}{CODE};
+
+ my $glob = ${$$pack}{$_} || next;
+
+ if ( IS_RUNNING_ON_5_10 ) {
+ return 1 if ref $glob eq 'SCALAR';
+ }
+
+ return 1 if defined *{$glob}{CODE};
}
# fail