user-pic

Tom Wyant

  • About: Fine Perl code for over 0.005 centuries.
  • Commented on Smartmatch in 5.27.7
    Kudos to Karen Etheridge, who already has a version of Try-Tiny that installs under 5.27.7. The fix was to skip_all() in a BEGIN block if $] does not pass muster. That should be OK for Type-Tiny as well....
  • Commented on Smartmatch in 5.27.7
    The new keywords are whereis and whereso. I can see "whereis", but at the moment "whereso" conveys nothing to me. Maybe documenting some rationale for at least "whereso" would help -- sort of like the mnemonics in perlvar. My experience...
  • Commented on What Time is Midnight?
    What I tend to do when I want the current local day with core Perl is something like use Time::Local qw{ timelocal }; $today = timelocal( 0, 0, 0, (localtime)[3 .. 5]); (from eg/almanac in the Astro::Coord::ECI distribution). This algorithm...
  • Posted What Time is Midnight? to Tom Wyant

    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…

  • Posted Iridium Flare End-Of-Life to Tom Wyant

    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…

  • Posted PPIx-Regexp Perl Version Functionality to Tom Wyant

    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…

  • Commented on \d does not validate numbers
    Note that /a requires Perl 5.13.10 or higher....
  • Posted Shire Calendar Update to Tom Wyant

    I have recently adopted modules Date::Tolkien::Shire and DateTime::Fiction::JRRTolkien::Shire.

    The releases to date have been relatively minor fixes, but …

  • Commented on CPAN Testers RULE!
    Second the motion....
  • Commented on CPAN Testers RULE!
    Emphatically yes!. And Slaven has just done it for me again, in RT 118910, in which I was too casual about the placement of a helper routine, forgetting that it was called (indirectly) in a use constant....
  • Posted CPAN Testers RULE! to Tom Wyant

    Late last evening I sent a development version of a Perl module to PAUSE. This module had had a bunch of work on it since the last release, including a change in the way timegm() and timelocal() were called.

    The CPAN testers…

  • Posted DateTime::Calendar::Christian updated to Tom Wyant

    I have been granted co-maintainership of DateTime-Calendar-Christian, and version 0.04_01 went out October 30. Because this module is new to me, and because this is the first release in 13 years, I would like to encourage…

  • Commented on Looking for Eugene van der Pijll
    Thank you very much. I have sent at least three messages to the cpan dot org address over the last 4 weeks without getting any response. But a new address can't hurt, and I have sent a message to the...
  • Posted Looking for Eugene van der Pijll to Tom Wyant

    Eugene van der Pijll is the author of DateTime::Calendar::Christian, which manipulates dates in either Julian or Gregorian calendars, depending on what the date actually is. This module has not been updated since 2003, and…

  • Commented on Do not pass perl globals as arguments to subroutines
    Well, maybe this is cargo cult. Back in 2010 I spent quite a bit of time tracking down a problem where I was returning the value of $+[0] from a subroutine, and the caller was not receiving the value that...
  • Commented on Do not pass perl globals as arguments to subroutines
    The same kinds of things apply to capture variables. And if you are writing the subroutine, you might want to avoid returning things like this as well, and for similar reasons....
  • Commented on Retraction of Geo::Coder::Geocoder::US
    Geo::Coder::Geocoder::US 0.006_01 just went to PAUSE. There are no functional changes, I just wanted people to see my attempt to mark this module as deprecated and under threat of retraction....
  • Commented on Retraction of Geo::Coder::Geocoder::US
    Thank you all for the feedback, and especially to Neil Bowers for the cookbook. At the moment the only notation about what is going on is in the Changes file, and that is pretty terse. I will make at least...
  • Commented on Retraction of Geo::Coder::Geocoder::US
    I have stopped the deletion of Geo::Coder::Geocoder::US pending input here. This module does not seem to me to be in the same position as the one you have cited, in that Nagios::Plugin was potentially the subject of legal difficulties, whereas...
  • Posted Retraction of Geo::Coder::Geocoder::US to Tom Wyant

    Geo::Coder::Geocoder::US is a Perl module that interfaces to the Geocoding API of geocoder.us. Unfortunately that disappeared late 2015. Since this module is therefore useless, I am deleting it from CPAN.

  • Posted Refactor of Perl Critic policy ProhibitUnusedVarsStricter to Tom Wyant

    Perl::Critic::Policy::Variables::ProhibitUnusedVarsStricter (whew!) is a Perl Critic policy that attempts to be more stringent about finding unused variables than the core policy of similar name.…

  • Commented on Stupid Regexp Trick: Fail on match
    My stupid trick does not in fact accommodate underscores in numbers like Perl does, but I believe it could could easily be made to do so. I did not do this, frankly, because I did not think about it. There...
  • Posted Stupid Regexp Trick: Fail on match to Tom Wyant

    I found myself one day trying to come up with a regexp that matched

    m/ \G \s* (?:
            (?<oct> 0b[01]+ | 0[0-7]+ | 0x[[:xdigit:]]+ ) |
            (?<float> [+-]?(?=\.?\d)\d*\.?\d*(?:e[+-]?\d+)? )
        )
        (?! \w )
    /smx…

  • Posted Stupid perldoc-search trick to Tom Wyant

    Perl's copious documentation is one of the things that keeps me using it. But a pretty good idea where to start looking, can be like finding the proverbial needle in a haystack.

    Fortunately, we have Joshua ben Jo…

  • Commented on MacPorts openssl versus Perl
    In follow-up post Son of MacPorts openssl versus Perl I cover how to find all the Perl modules that link to openssl, re-upgrade to the current openssl, and rebuild the necessary modules....
  • Posted Son of MacPorts openssl versus Perl to Tom Wyant

    This post is a follow-up to MacPorts openssl versus Perl. That post told of a problem with a recent MacPorts openssl upgrade, and gave a workaround.

    The right thing to do, however, is to use the c…

  • Posted MacPorts openssl versus Perl to Tom Wyant

    This is only of interest to Mac users who link their Perl against

    This morning I found that Perl code that used LWP::Protocol::https was failing, but only when run by the test harness.

    After some flailing around…

  • Posted Stupid state trick to Tom Wyant

    Occasionally I find myself writing a Perl subroutine that uses a module that no other part of the code needs. This subroutine may be called multiple times, or not at all. At some point I wondered if putting some logic around the require statement would be faster…

  • Commented on Converting glob patterns to regular expressions
    Minor tweak: if you are matching file names like File::Glob does, you need to exclude '/' from the characters matched by the wildcards. Unless you are allowing '**' to match truly anything, in which case you need to distinguish it...
  • Commented on Serializers for Perl: when to use what
    Small carp: Storable does not do Regexps, at least out of the box. $ perl -MStorable -E 'store qr{ fubar }smx, fubar.tmp' Can't store REGEXP items at /.../lib/site_perl/5.20.1/darwin-2level/Storable.pm line 259, at -e line 1. $ perl -v; modver Storable This...
Subscribe to feed Recent Actions from Tom Wyant

  • Ron Savage commented on Smartmatch in 5.27.7

    I didn't mean there was shortage of commentary, just a shortage of commentary having our desired effect.... Bit like auto-deref, actually :).

  • Aristotle commented on Smartmatch in 5.27.7

    Yes, autoderef came to my mind as well.

  • smls commented on Smartmatch in 5.27.7

    Maybe documenting some rationale for at least "whereso" would help

    It's probably inspired by the so function from Perl 6, which simply coerces its argument to Bool - like the not function but without the negation.

  • brian d foy commented on Smartmatch in 5.27.7
  • ronw commented on Smartmatch in 5.27.7

    I think that smart match tried to do too much. the use I had for it was "when" to allow for a more flexible "switch" construct than using a mix of "nswitch", "sswitch" and "rswitch" (and variations, as provided by various CPAN modules).

    Things like "appearing as a value in an array", and other complexities, would be better accomplished by their own operators or functions.

Subscribe to feed Responses to Comments from Tom Wyant

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is hosted by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.