|Think about Loose Coupling|
Coming up with good examples in PODby Lady_Aleena (Curate)
|on Jul 25, 2020 at 19:02 UTC||Need Help??|
Lady_Aleena has asked for the wisdom of the Perl Monks concerning the following question:
I have been writing POD for some of my modules, and one of the harder aspects of writing POD is coming up with good examples in the synopsis. I came up with, what I think is, a good example for numerical use; but I am stuck on coming up with a good example for the alpha use of the following sub.
The sub splits the values of the list into two parts, sorting by the first part, then sorting by the second part.
Please note, I do not know why I wrote this, since I am not using it anywhere in my code. I even searched my history here to see if I brought it up before and can not find anything, which is strange because most of what I write ends up here at some point.
The list I came up with for the numerical option is:
I included a cautionary note in the POD that 02 is the same as 2 when using this.
I just can not come up with a list where this might be needed on alphabetical strings.
Comments on the code are always welcome.
Edit: I have a feeling I added the usage for alphabetical strings for completeness, nothing more. I have tried coming up with lists of alphabetical strings that would change if this is used and have not found any. I am now thinking that I should just put a note in saying that the alphabetical usage is redundant.
My OS is Debian 10 (Buster); my perl versions are 5.28.1 local and 5.16.3 or 5.30.0 on web host depending on the shebang.
No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!