Refactoring

Extraction of subroutines is supported by the use of the CPAN Devel::Refactor module.

To extract a subroutine, mark the code to extract and select RefactorExtract Subroutine from the popup menu.

Extract Subroutine Selection

In the popup menu insert the name of the new subroutine and press Enter.

Extract Subroutine Dialog

The new subroutine will be placed at the end of the Perl script (before __END__ section) and the selection will be replaced with the subroutine call.

Extract Subroutine Result