NAME

Devel::Refactor - Perl extension for refactoring Perl code.

SYNOPSIS

use Devel::Refactor;

my $refactory = Dev::Refactor->new($sub_name, $code_snippet);

my $new_sub_code = $refactory->get_new_code();
my $sub_call     = $refactory->get_sub_call();

ABSTRACT

Perl module that facilitates refactoring Perl code.

DESCRIPTION

The Devel::Refactor module is for code refactoring. Pass it a a snippet of Perl code that belongs in its own subroutine as well as a name for that sub. It figures our which variables need to be passed into the sub, and which variabels might be passed back. It then produces the sub along with a call to the sub.

Hashes and arrays within the code snippet are converted to hashrefs and arrayrefs.

Included in the examples directory is a script for use in KDE under Linux. The script gets its code snippet from the KDE clipboard and returns the transformed code the same way. The new sub name is prompted for via STDIN.

AUTHOR

Scott Sotka, <ssotka@barracudanetworks.com<gt>

COPYRIGHT AND LICENSE

Copyright 2003 by Scott Sotka

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.