This also fixes the pure perl version of get_method_map, as it uses
get_all_package_symbols internally.
use strict;
use warnings;
+use B;
use Scalar::Util 'blessed';
use Carp 'confess';
? ( $_ => \&{$pkg ||= $self->name . "::$_"} )
: ( (*{$namespace->{$_}}{CODE}) # the extra parents prevent breakage on 5.8.2
? ( $_ => *{$namespace->{$_}}{CODE} )
- : () ) )
+ : (do {
+ my $sym = B::svref_2object(\$namespace->{$_});
+ my $svt = ref $sym if $sym;
+ ($sym && ($svt eq 'B::PV' || $svt eq 'B::PVIV'))
+ ? ($_ => ($pkg ||= $self->name)->can($_))
+ : () }) ) )
} keys %$namespace;
} else {
return map {