From: Sartak Date: Mon, 5 May 2008 08:32:54 +0000 (+0000) Subject: Turn MultiLine::PPI's needs_continuation into a method line_needs_continuation X-Git-Tag: v1.003015~133 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=49946f5ce52c6859a628226f36c7c99ae7a65069;p=p5sagit%2FDevel-REPL.git Turn MultiLine::PPI's needs_continuation into a method line_needs_continuation git-svn-id: http://dev.catalyst.perl.org/repos/bast/trunk/Devel-REPL@4316 bd8105ee-0ff8-0310-8827-fb3f25b6796d --- diff --git a/lib/Devel/REPL/Plugin/MultiLine/PPI.pm b/lib/Devel/REPL/Plugin/MultiLine/PPI.pm index d0040a5..a812b27 100644 --- a/lib/Devel/REPL/Plugin/MultiLine/PPI.pm +++ b/lib/Devel/REPL/Plugin/MultiLine/PPI.pm @@ -20,7 +20,7 @@ around 'read' => sub { my $line = $self->$orig(@args); if (defined $line) { - while (needs_continuation($line)) { + while ($self->line_needs_continuation($line)) { my $orig_prompt = $self->prompt; $self->prompt($self->continuation_prompt); @@ -39,8 +39,9 @@ around 'read' => sub { return $line; }; -sub needs_continuation +sub line_needs_continuation { + my $repl = shift; my $line = shift; my $document = PPI::Document->new(\$line); return 0 if !defined($document);