Padre::Task::IntroduceTemporaryVariable(3pm)

Padre::Task::IntroduceTemporaryVariable3pm

Introduces a temporary variable using ppi

Usage

  my $tempvarmaker = Padre::Task::IntroduceTemporaryVariable->new(
          document       => $document_obj,
          start_location => [$line, $column], # or just character position
          end_location   => [$line, $column], # or ppi-style location
          varname        => '$foo',
  );
  $tempvarmaker->schedule;

Overview

Given a region of code within a statement, replaces that code with a temporary variable. Declares and initializes the temporary variable right above the statement that included the selected expression.

Usually, you simply set "start_position" to what "$editor->GetSelectionStart" returns and "end_position" to "$editor->GetSelectionEnd - 1".

Releases

2 releases since Debian 7 (Wheezy); the text changed 1 time.

  1. 7
  2. 8

Author

Steffen Mueller "[email protected]"

From padre 1.00+dfsg-3 in Debian 8 (Jessie). Parsed by carta from the page's man source.