Ticket #525 (new enhancement)

Opened 5 years ago

Last modified 3 years ago

Feature request: "Rename subroutine"

Reported by: rhebus Owned by:
Priority: major Milestone:
Component: Refactoring Perl 5 Version: 0.45
Keywords: refactor Cc:

Description

Subroutine renaming is an important refactoring technique. Often you find that the name you originally used for a subroutine wasn't ideal, but by the time you have thought of a better, clearer name it is already referenced 20 times in 10 files.

A "rename subroutine" function would rename the subroutine *and* all references to it throughout the project. Clearly this requires syntactic parsing of all files in the project; a global search-and-replace is flaky and dangerous since it will change subroutines with the same name in different packages.

More info on subroutine renaming:
http://en.wikipedia.org/wiki/Rename_method
https://eclipse-tutorial.dev.java.net/visual-tutorials/refactoringrenamefieldandmethod.html -- example of rename field and method in eclipse for Java

Change History

comment:1 Changed 5 years ago by szabgab

  • Component changed from editor to advanced perl tools

comment:2 Changed 5 years ago by rhebus

Devel::Refactor provides the functionality needed if someone can help me plumb it in.

comment:3 Changed 4 years ago by zenogantner

  • Keywords refactor added

comment:4 Changed 3 years ago by szabgab

  • Component changed from advanced perl tools to Refactoring Perl 5
Note: See TracTickets for help on using tickets.