|Syntactic Confectionery Delight|
Code style questionby AlexP (Scribe)
|on May 20, 2021 at 15:26 UTC||Need Help??|
AlexP has asked for the wisdom of the Perl Monks concerning the following question:
I'm new to perl and already like this language. To learn it, I decided to write a module. However, there is not enough information on the code style.
There is an official https://perldoc.perl.org/perlstyle which is a bit superficial with a few examples. I also came across the following two sources: https://github.com/chusqui/perl-style-guide and https://github.com/htrgouvea/perl-style-guide, who partly contradict each other and even with official perlstyle. Finally i found https://metacpan.org/pod/Perl::Tidy and applied it to my code... Something really strange happened.
So could you please show me the way or good resources about code style?
Also here is my module source code https://github.com/AlexP007/perl-data-dot/blob/main/lib/Data/Dot.pm.
I'll be very thankful if you could tell me what can be done better and what's the best way to format code.
P.S. So what's the right indent: 2 or 4?