-
-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document ProductOpener Perl modules. #2203
Comments
Agreed, we are lacking a lot in terms of documentation of the code. A lot of it could also certainly be simplified, reorganized etc. Maybe we can start with some of the simpler / most independent modules (and then also see if we could break / reorganize the more complex / big modules). I could try with the Imports.pm module first. I have never used POD, is there a good example of POD best practices for documenting a module? |
Here is the official doc page for pod It lets you write inline markup in your code for headers, function documentation etc. You then run Thanks for following up. |
Love you <3 lol |
I appreciate recommendations from Damian Conway, in Perl Best Practices (2005). We could start with comment templates for functions and methods. Structured/templated comments are easier to write (you can't forget anything and it's easier to write) and also to read. Here is what he writes about it:
which might be filled in like so:
We could test it on a module to see if it fits well? |
I think Perl POD is a good option for a few reasons:
|
script to call pod2html to generate perlpod html doc, issue #2203
@zigouras I have started automating generation using GitHub Actions to publish the doc to GitHub page. |
It has been done since a long time (september 2022), see https://openfoodfacts.github.io/openfoodfacts-server/dev/ref-perl-pod/ |
Is your feature request related to a problem? Please describe.
There is little to no documentation in the code. Perl POD (plain old documentation) can be used to generate a nice document page.
Describe the solution you'd like
Document all
ProductOpener/*.pm
modules with Perl POD including functions, classes, variables etc.Describe alternatives you've considered
Moving blindly through the code.
Additional context
Since these Perl modules are the core of the business logic of the project they should be well documented.
Part of
The text was updated successfully, but these errors were encountered: