The Magic Variable 'count'
So, I happened to be looking back through some old files and I found an early programming assignment from my first computer science course back in college. In the middle of the code I found this wonderful line:
while (cownt<years) {
cout<<cownt+1; //"cownt" = "count", but when I entered it spelt correctly it gave me errors.//
As it turns out early on in the code I declared int cownt=0;. I either couldn’t find this typo in debugging my mere 61 lines of code or — what I think was actually going on — I thought count was a reserved magical variable that made loops work — not something I had to declare. Sometimes it’s nice to look back and see how far you’ve come.
Perfect Perl Kwalitee
In the time since Date::Lectionary was added to CPAN, I’ve been working hard to get a perfect Kwalitee score and make a really solid distribution. Documentation on how to make a module are all over the place and I’ve yet to see a good, single article or post to explain how to do it. This is my attempt, I hope you find it useful.
Required Files
README
I like keeping my POD within the code of the module I’m developing and having the README file(s) automatically generated from that. Below is a simple shell script I’ve developed as part of my authoring process to generate well-formed readme files in Markdown, POD, and plaintext. Having all three formats means that GitHub and MetaCPAN both have what they need to render my README as best as possible.
Read more...