Opened 10 years ago

Closed 7 years ago

#565 closed defect (not relevant)

Lexically replace variable does not work on outer variable

Reported by: szabgab Owned by: azawawi
Priority: major Milestone:
Component: Refactoring Perl 5 Version: 0.46
Keywords: refactoring Cc:


my $x = 23;

	my $x = 42;
	print $x;

print $x;

Put the cursor between $ and x in the last $x, right-click and lexically replace by $z. All 4 occurances of $x will be replaced.

Change History (6)

comment:1 Changed 10 years ago by szabgab

Actually same happens when I mark the second $x declaration (within the block)
it replaces all 4 occurances

comment:2 Changed 10 years ago by szabgab

The last problem is that if I mark the first occurrence of $x it will say it cannot find the declaration of the variable.

comment:3 Changed 10 years ago by azawawi

  • Owner set to azawawi
  • Status changed from new to assigned

comment:4 Changed 9 years ago by zenogantner

  • Keywords refactoring added

comment:5 Changed 8 years ago by szabgab

  • Component changed from advanced perl tools to Refactoring Perl 5

comment:6 Changed 7 years ago by bowtie

  • Resolution set to not relevant
  • Status changed from assigned to closed

right mouse

rename variable works

Note: See TracTickets for help on using tickets.