even after your update, you probably still want to change the main example in your post ... the initial code black already has the param assigned to a temp variable in the my $arg_ref = shift; line and demonstrates the spirit of the refactoring -- it should be your "post refactoring" example. Your "pre refactoring" example should have every line modifying $_[0] directly.
In reply to Re: Refactoring Perl #7 - Remove Assignments to Parameters
by hossman
in thread Refactoring Perl #7 - Remove Assignments to Parameters
by agianni
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |