in reply to Re^2: Improve readability of Perl code. Naming reference variables.
in thread Improve readability of Perl code. Naming reference variables.
sub func { my ( $rs_str, $hr_desktop_info, $ha_files ) = @_; $$str = update_string_ref(); for ( keys %$desktop_info ) { ... push @$files, $file; } .... }
I rather feel that $$str, %$desktop_info and @$files make it pretty clear, not only that your dealing with references, but also what type of references they are.
If you're having problems reading that, I suggest you do what ++stevieb has already alluded to and put the prefixes in a comment. Something like:
my ($str, $desktop_info, $files) = @_; # rs, rh, ra
Update (minor typo fix): s{deck}{desk} in ..., %$decktop_info and ....
— Ken
|
---|
In Section
Meditations