Basically, I second smiffy's recommendation, but would use a 4 character TAB ;-).
While reading your example, I find the double backslashes more offending. It is IMHO less readable, esp. as the double backslash has some meaning for similar
looking UNC paths.
Since you do not interpolate yet, you could use single quotes instead of the interpolating double quotes, which saves you 9 characters for the given example and the key looks more natural too. Together with string concatenation, you can break the lines at semantic borders:
I guess, the that 'Microsoft\Windows NT\CurrentVersion\' is used quite often, so it could be placed into a short variable or constant, e.g. $MS_NT_CUR:process_key_r16a_type ($partition,$mountpoint,"software", 'Microsoft\Windows NT\CurrentVersion' .'\Terminal Server\Install' .'\Software\Microsoft\Windows\CurrentVersion' .'\RunOnceEx' );
You could modify process_key_r16a_type(...) or write a wrapper that concatenates surplus arguments into a key or alternatively takes an anonymous array that visually groups the key components.process_key_r16a_type ($partition,$mountpoint,"software", $MS_NT_CUR .'Terminal Server\Install' .'\Software\Microsoft\Windows\CurrentVersion' .'\RunOnceEx' );
Depends on taste..., however perltidy might rip that lines apart (untested)...process_key_r16a_type_arefflavour ($partition,$mountpoint,"software", [ 'Microsoft\Windows NT\CurrentVersion', '\Terminal Server\Install', '\Software\Microsoft\Windows\CurrentVersion', '\RunOnceEx' ] );
In reply to Re: need advice: Perl code layout, long line lengths
by Perlbotics
in thread need advice: Perl code layout, long line lengths
by resistance
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |