Skip Menu |

This queue is for tickets about the Devel-IntelliPerl CPAN distribution.

Report information
The Basics
Id: 52649
Status: resolved
Priority: 0/
Queue: Devel-IntelliPerl

People
Owner: Nobody in particular
Requestors: mgrimes [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: Mark Grimes <mgrimes [...] satch.grimes.homeip.net>
Subject: [PATCH] Bug fix: single match needs to return full string for Vim
Date: Thu, 10 Dec 2009 09:21:51 -0500
To: bug-Devel-IntelliPerl [...] rt.cpan.org
From: Mark Grimes <mgrimes [...] cpan.org>
From: Mark Grimes <mgrimes@satch.grimes.homeip.net> When there is a single match, vim still needs the full string not just the portion to add. Also made a small fix to the pod to get the line numbers to work --- lib/Devel/IntelliPerl.pm | 5 ++--- lib/Devel/IntelliPerl/Editor/Vim.pm | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/Devel/IntelliPerl.pm b/lib/Devel/IntelliPerl.pm index d6dedc5..36de006 100644 --- a/lib/Devel/IntelliPerl.pm +++ b/lib/Devel/IntelliPerl.pm @@ -263,7 +263,6 @@ Devel::IntelliPerl - Auto-completion for Perl my $source = <<'SOURCE'; package Foo; - use Moose; has foobar => ( isa => 'Str', is => 'rw' ); @@ -272,14 +271,14 @@ Devel::IntelliPerl - Auto-completion for Perl sub bar { my ($self, $c) = @_; # $c isa Catalyst - $self->foo-> + $self-> } 1; SOURCE - my $ip = Devel::IntelliPerl->new(source => $source, line_number => 9, column => 12); + my $ip = Devel::IntelliPerl->new(source => $source, line_number => 10, column => 12); my @methods = $ip->methods; diff --git a/lib/Devel/IntelliPerl/Editor/Vim.pm b/lib/Devel/IntelliPerl/Editor/Vim.pm index 84d4aed..0bbd6b6 100644 --- a/lib/Devel/IntelliPerl/Editor/Vim.pm +++ b/lib/Devel/IntelliPerl/Editor/Vim.pm @@ -30,7 +30,7 @@ sub run { print join( "\n", @methods ); } elsif ( my $method = shift @methods ) { - print substr( $method, length $ip->prefix ); + print $method; } elsif ( my $error = $ip->error ) { print "The following error occured:\n" . $error; -- 1.6.5.3
fixed in 0.03 Thank you!