Smoking Perl

Sawyer X's Test-Smoke docs.

The following is not a blow-by-blow (painful and uninteresting to read), but rather what I came up with after a few false starts, with emphasis on what I did over and above the Test-S…

Stupid Testing Trick: Inconstant Constants

I have a piece of Perl containing manifest constants that have the same value, but which signify different things. In my testing, I wanted to make sure I was getting the right one out of my code. That seems to mean changing code to test it, which is anathema to me.

It occurred to me today that if I held my tongue right I could change the values of the constants without touching the code they were defined in or exported from. Holy aspect-oriented programming, Batman!

The trick is based on the fact that what use constant really does is to define …

What Time is Midnight?

Yesterday was time change in the U. S. of A. I pulled out my iPod Touch to update a Numbers spreadsheet, and hit the "today" button to put the current date in the date column. But when I did that I got not the current date but 11 PM the previous day. Today it works as advertised.

Now, I am not privy to the internals here, but this behavior would be explained if "today" were implemented by the Objective C (or Swift, or whatever) equivalent of the following Perl:

my $date = time + $zone_offset;
$date -= $date % 86400;

This code is clean, simple, obvious ... and sub…

Iridium Flare End-Of-Life

For twenty years Iridium Communications Inc has provided global communications with a fleet of 66 satellites, plus spares. For most of that time the satellites have had the same design, and a consequence of that design was their ability to produce very bright and predictable flares due to the reflection of the Sun off their Main Mission Antennae. Beginning January 14 2017, though, satellites of the original design are being replaced by a new design that does not flare nearly as often or as brightly.

Perl module ="…

PPIx-Regexp Perl Version Functionality

The PPIx-Regexp package provides a PPI-like parse of Perl regular expressions. Part of its functionality includes reporting on the versions of Perl under which a given regular expression or its elements are valid. Up to this point the version fumctionality has been fairly simple: method perl_version_introduced() returns the version of Perl that introduced the element, and perl_version_removed() returns the version under which it was removed, or /var/www/users/tom_wyant/index.html