user-pic

Tom Wyant

  • About: Fine Perl code for over 0.005 centuries.
  • Commented on My Y2020 Bug
    Before I respond to your comment above, thank you very much for Modern functions in a post-modern language. If only we had a core timegm() that round-tripped with gmtime()! strptime() does not go back before 1900. The module in question...
  • Commented on My Y2020 Bug
    So far my personal problem seems limited to a test where I specified a two-digit year. That is now corrected, and that may be all I do. However, had the code originally been written with the then-unavailable *_modern variants, this...
  • Posted My Y2020 Bug to Tom Wyant

    For reasons that must have been clear at the time, I once wrote a test in terms of epoch time, and wanted it to run on systems that did not use January 1 1970 as the epoch. So I loaded Time::Local and added timegm( 0, 0,…

  • Commented on Tabs vs Spaces. Article about symbols that are used for indentation in 3.8 million Perl files on CPAN
    One explanation for mixed spaces and tabs is laziness, though in the common sense not the Larry Wall sense. By default, vi and friends indent 4 spaces per level. But they render a tab as 8 spaces. So one level...
  • Commented on Perl Unicode versions
    After doing this the hard way for Perl, I discovered how to do it without groveling through the kits: corelist -a Unicode To get this you need to install Module::CoreList....
  • Posted Perl Unicode versions to Tom Wyant

    A spell of hacking around with Unicode got me wondering which version up with:

    Perl version Unicode version
    5.7.33.1.1
    5.8.0
  • Posted Stupid Unicode Trick: Noncharacters to Tom Wyant

    Perl RT 133292 is a request to expose the internal perl subroutine that does string interpolation, so that one does not need to figure out how to double-quote a string (escaping where necessary)…

  • Posted Wildcard Unicode Property Values to Tom Wyant

    In addition to Native Variable-Length Lookbehind, Perl 5.29.9 (sic) includes another Regexp enhancement: wildcard Unicode property values. (And yes, this blog post sat around in draft form for over…

  • Posted Native Variable-Length Lookbehind to Tom Wyant

    No, I'm not talking about Dr. Regex' emulated variable-length lookbehinds, which frankly make my head hurt. Beginning with Perl 5.29.9, Perl has honest-to-heaven, really truly variable-length lookbehinds.

  • Posted Untrusted Numeric Input -- /[0-9]/ to Tom Wyant

    My blog entry of a couple weeks ago, dealt mainly with the problem of ensuring that supposedly-numeric input actually consisted only of ASCII digits. One of the ways to do this was to …

  • Commented on bless is good parts of Perl language
    I do not see Perl's object model as incomplete, merely as different. If object models were automobiles, Perl's "bless" model would be an old Chevy with no hood, chromed air cleaner and valve covers, and a candy apple paint job...
  • Commented on Untrusted Numeric Input
    Just to add to the mix, when researching my response to a letter triggered by this blog post, I found the following as the last paragraph in the perlrecharclass section on POSIX Character Classes: It is proposed to change this...
  • Posted Untrusted Numeric Input to Tom Wyant

    David Farrell's Perl.com article got me thinking, specifically about the role of \d in sanitizing input. I am…

  • Commented on Check of the Perl 5 interpreter using a static analyzer
    It strikes me that code written in Perl is also subject to this. Is there a Perl::Critic policy that covers this?...
  • Posted Iridium Flare End-Of-Life II to Tom Wyant

    Late last year, I blogged about my in the Astro-satpass distribution given that these satel…

  • 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....
Subscribe to feed Recent Actions from Tom Wyant

  • byterock commented on Tabs vs Spaces. Article about symbols that are used for indentation in 3.8 million Perl files on CPAN

    IMHO the bloger would of better off spending his time doing a few pull requests and fixing some bugs then spending a bunch of time exaiming the ages old 'tab' vs 'space' debate.

    Since the days PC computers got more than 640K of disk space on a floppy it has stopped to be an issue.

    In the good old days of 64k many of old farts would argue for 'tabs' as the took only 8 bits of less memory than while '4 spaces' took up 32.

    In the big scope of things it really doesn't matter much

  • Aristotle commented on My Y2020 Bug

    Isn’t Time::Piece->strptime( '1970-01-01', '%Y-%m-%d' ) far more defensive in that sense than either timegm( 0, 0, 0, 1, 0, 1970 ) or timegm_modern( 0, 0, 0, 1, 0, 1970 )?

    (Isn’t it great that that says … 1, 0, 1970 rather than … 1, 1, 1970? Do you always immediately remember which one is supposed to be zero and which one is 1 and why?)

  • Aristotle commented on My Y2020 Bug

    Thank you very much for Modern functions in a post-modern language.

    You provided the impetus to write it. 🙂 There had been other discussions about the new functions, but the conversation in this comment thread is what pushed me to consolidate my thoughts into an article – both so I wouldn’t have to repeat myself, but more importantly to have the scope to lay out the full case, since individual points by themselves are not very persuasive.

    But the suppor…

  • David Cantrell commented on SSH Can Do That? Productivity Tips for Working with Remote Servers

    For persistent connections I find it better to use the %C token in ControlPath. It produces a shorter string, so will help get around some path length restrictions. Also, that really ought not to be a path in a world-readable place like /tmp!

  • Smylers commented on SSH Can Do That? Productivity Tips for Working with Remote Servers

    Both good ideas. %C didn't exist when I wrote the above.

    On a laptop only used by me, I was using /tmp/ (it avoids need to know your username to put in the config), but for shared computers it isn't a good idea.

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 with a graphic design donated by Six Apart, Ltd.