go ahead... be a heretic | |
PerlMonks |
Re: Code style questionby eyepopslikeamosquito (Archbishop) |
on May 21, 2021 at 02:07 UTC ( [id://11132823]=note: print w/replies, xml ) | Need Help?? |
A quick scan of your module and I'm very impressed! Fantastic start for a Perl beginner! Just a couple of minor points I noticed after a quick scan of your code:
Unless things have changed recently with the introduction of new Perl signatures, the traditional Perl code style advice has always been an emphatic "Don't use prototypes" -- see, for example, item 122 "Don't use subroutine prototypes" at Perl Best Practices. Googling just now turned up this this article by brian d foy on the newer experimental subroutine signatures (which I have no experience with). This line of code from your module:
is definitely wrong. It should read: This is one item that PBP unfortunately got wrong as mentioned here. See also Writing Solid CPAN Modules for general advice on writing CPAN modules. Update: As noted by haukex here: our $VERSION = "1.23"; seems to be the most compatible with the various Perl tools that parse code to find information on modules. I maintain a long list of general references on code standards and style advice at: Re: I need perl coding standards (Coding Standards References)
In Section
Seekers of Perl Wisdom
|
|