user-pic

Tom Wyant

  • About: Fine Perl code for over 0.005 centuries.
  • Commented on Bye, bye search.cpan.org
    Just realized -- there are a LOT of copies of META.json on CPAN with things like this in them: "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, META.yml does not have this -- guess it's a version 2...
  • Commented on Smoking Perl
    Mail was my biggest doubt too. I used to be a desultory CPAN tester, but gave it up a few years back when it became impossible for me to inject mail into their system. I hope things are better now,...
  • Posted Smoking Perl to Tom Wyant

    Sawyer X's

  • Commented on Stupid Testing Trick: Inconstant Constants
    Enclosing the around() call in a BEGIN block does get me the correct values out. Unfortunately Class::Method::Modifiers does not preserve the prototype of the subroutine, so I get "Prototype mismatch" warnings, and the value is not inlined. The prototype errors...
  • Commented on Stupid Testing Trick: Inconstant Constants
    Thanks for the recommendation. Unfortunately this does not appear to affect the value imported from Foo, only the value returned when I call Foo->PLATFORM. When I replace the block in my sample script with your suggestion, it prints 42 twice,...
  • Posted Stupid Testing Trick: Inconstant Constants to Tom Wyant

    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 …

  • 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…

Subscribe to feed Recent Actions from Tom Wyant

  • 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.

  • Grinnz commented on Stupid Testing Trick: Inconstant Constants

    You'd need to do the 'around's in a BEGIN{} block for them to take effect before the constants are important from Foo in the 'use' line.

  • Grinnz commented on Stupid Testing Trick: Inconstant Constants

    imported*. And you don't need to call them as methods, just accessing Foo::MAGIC should work regardless of importing.

  • Grinnz commented on Stupid Testing Trick: Inconstant Constants

    Though on second thought Foo::MAGIC may get compiled out due to being a constant, before the 'around' takes effect if it wasn't done in BEGIN{}.

  • David Hoekman commented on Smoking Perl

    Thanks for writing up that step-by-step guide. Once I saw it was really quite simple to do, it was the nudge that got me to do what I'd always intended to do someday, start smoking...

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.