This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
More about the dangers of indent.
[perl5.git] / Porting / pumpkin.pod
index 141a60a..cff54cd 100644 (file)
@@ -1277,6 +1277,21 @@ Anyway, all this leads to quite obscure failures that are sure to drive
 casual users crazy.  Even experienced users will get confused :-).  Upon
 reflection, I'd say leave libperl.so in $archlib.
 
+=item 4.
+
+Indentation style: over the years Perl has become a mishmash of
+various indentation styles, but the original "Larry style" can
+probably be restored with (GNU) indent somewhat like this:
+
+    indent -kr -nce -psl -sc
+
+A more ambitious solution would also specify a list of Perl specific
+types with -TSV -TAV -THV .. -TMAGIC -TPerlIO ... but that list would
+be quite ungainly.  Also note that GNU indent also doesn't do aligning
+of consecutive assignments, which would truly wreck the layout in
+places like sv.c:Perl_sv_upgrade() or sv.c:Perl_clone_using().
+Similarly nicely aligned &&s, ||s and ==s would not be respected.
+
 =back
 
 =head1 Upload Your Work to CPAN