Tag: perl
-
Perl: Semantic Version Sorting via callback puts betas before releases (empty string after text)
Semantic Versioning Semantic program versions are a great help in administration life: When done right, they help you identify if only bugs have been resolved (2.11.z) or features added (2.y.0) or the program has undergone big changes with chances that an upgrade needs a lot of admin intervention (x.0.0). For developers and early testers, additional…
-
perl: rounding KiB values to MiB boundaries
When you have to deal with kilobyte or kibibyte values in today’s real-world computers, you often want extremely similar values to evaluate to “equal”. An easy solution is to round them to full Mebibytes. This can be easily done in every programming language which supports integer division and the modulo operator. For example in Perl:…