Subject: | [Patch] CompletionDriver::Turtles fails to complete command_\w+ subs |
Hi,
The regex that matches for turtle subs to complete can only match subs named like
expr_command_\w+ due to a bad regex.
The attached patch allows it to complete commands like command_\w+ as well.
--
Best regards,
David Jack Olrik <david@olrik.dk> http://david.olrik.dk
GnuPG fingerprint C290 0A4A 0CCC CBA8 2B37 E18D 01D2 F6EF 2E61 9894
["The first rule of Perl club is You do not talk about Perl club"]
Subject: | Devel-REPL-1.003012.patch |
diff --exclude=.base-functions --exclude=.base-prerequisites-metadata -NurB Devel-REPL-1.003012.orig/lib/Devel/REPL/Plugin/CompletionDriver/Turtles.pm Devel-REPL-1.003012/lib/Devel/REPL/Plugin/CompletionDriver/Turtles.pm
--- Devel-REPL-1.003012.orig/lib/Devel/REPL/Plugin/CompletionDriver/Turtles.pm 2010-09-27 19:24:04.000000000 +0200
+++ Devel-REPL-1.003012/lib/Devel/REPL/Plugin/CompletionDriver/Turtles.pm 2011-04-19 13:09:42.000000000 +0200
@@ -23,7 +23,7 @@
(
map { "$pre$_" }
grep { $_ =~ $filter }
- map { /^expr?_command_(\w+)/ ? $1 : () }
+ map { /^(?:expr_)?command_(\w+)/ ? $1 : () }
map { $_->name }
$self->meta->get_all_methods
),