From: Chris Marshall Date: Sat, 12 Jun 2010 16:35:13 +0000 (-0400) Subject: Fix RT bug #43151 where _-> completion had error X-Git-Tag: v1.003015~29 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=86f22c23273d4dfa82e5ec216962aeaea896dc65;p=p5sagit%2FDevel-REPL.git Fix RT bug #43151 where _-> completion had error The problem was actually the FindVariable plugin implementation of find_variable. Class::MOP::Package::has_package_symbol method was being called with a name without a sigil which is an error in usage. This skips the call if no sigil is present. --- diff --git a/lib/Devel/REPL/Plugin/FindVariable.pm b/lib/Devel/REPL/Plugin/FindVariable.pm index 9c06906..69a746c 100644 --- a/lib/Devel/REPL/Plugin/FindVariable.pm +++ b/lib/Devel/REPL/Plugin/FindVariable.pm @@ -23,7 +23,8 @@ sub find_variable { my $meta = Class::MOP::Class->initialize($package); - return unless $meta->has_package_symbol("$sigil$name"); + # Class::MOP::Package::has_package_symbol method *requires* a sigil + return unless length($sigil) and $meta->has_package_symbol("$sigil$name"); $meta->get_package_symbol("$sigil$name"); }