
Tom Wyant
Recent Actions
-
Posted My Favorite Modules: PerlIO::via to Tom Wyant
OK, I confess: PerlIO::via is not a module that I use every day. It allows you, easily, and with minimal code, to modify an I/O stream before it gets to the reader of the stream. or after the writer has written…
-
Posted Regexp Delimiters to Tom Wyant
Perl lets you use almost anything as a regular expression delimiter. It is usual to use punctuation of some sort, but characters that match
/\w/
can be used provided there is white space between the operator and the delimiter:m X foo…
-
Commented on PSA: Changing your b.p.o password is recommended
Done. Thanks. Note that I had no luck using the "Edit Profile" page accessible from the initial log-in. I hit "Post", (which required a second login with the same password), and then had no trouble....
-
Posted Making GitHub CI work with Perl 5.8. to Tom Wyant
A while back. I got a pull request from Gabor Szabo adding a GitHub action to one of my distributions. I have been working with this, but have not (so far) blogged about it because, quite frankly, I am still not sure I know what I am doing.
One of my personal desires was to test my distrib…
-
Commented on New feature: HTTPS support
Thanks! Not only that, but it displays correctly under Firefox. Well done!...
-
Commented on On interpolating stuff into pattern matches
Thank you for clarifying a point I, at least, found obscure. And for making this a top-level post, which it deserves to be....
-
Posted Match Anything, Quickly -- Revision 1 to Tom Wyant
O wad some Power the giftie gie us
It wad frae mony a blunder free us,
An' foolish notion: ...My previous blog post, Match Anything, Quickly, brou…
-
Commented on CPM0 frl-plugin:perlscript: ERROR: 'times' trapped by operation mask at /usr/lib64/perl5/B.pm line 183.
blogs.perl.org tends to be a blogging platform, not a help platform. You might try over on Perl Monks. You might get better response there if you post something more informative than "I get this error. Why?" The Perl Monks node...
-
Commented on Match Anything, Quickly
Boy, am I embarrassed. Thanks for picking up on the missing /smx. I did proofread, but obviously not enough....
-
Posted Match Anything, Quickly to Tom Wyant
Revision: that Cincinnati Perl Mongers found an error in the benchmark script used for this post. Match Anything Quickly - Revision 1 discusses their findings and links to a revised benchmark script.…
-
Commented on Numeric Variable Names With Leading Zeroes
Published Perl::Critic::Policy::Variables::ProhibitNumericNamesWithLeadingZero. I figured when the lead article of this week's Perl Weekly alludes to it I kind of have to....
-
Commented on Numeric Variable Names With Leading Zeroes
The policy is valid as far as I know. No false positives, at least. My bias toward non-publication (beyond GitHub) is because it does not address a current problem, and it appears to me that the single instance of this...
-
Posted Numeric Variable Names With Leading Zeroes to Tom Wyant
Over on the p5p mailing list, a user raised the issue that use of variable
$00
is an error starting with Perl 5.32, and asked that this "regression" be fixed.I have alw…
-
Commented on Sorting Subroutine Results
There are two cases that the compiler needs to distinguish between: Specifying a user-provided function as a comparator for the sort, and Calling a function and then sorting the list returned by that function; The Perl compiler assumes the former....
-
Commented on Sorting Subroutine Results
My list came straight from perldoc -f sort, so maybe a pull request on perlfunc.pod is in order?...
-
Posted Sorting Subroutine Results to Tom Wyant
The Perl
sort
built-in is mostly (at least by me) called assort LIST
orsort BLOCK LIST
. But there is a third way to call it: -
Commented on Scalar Context: Lists Versus Arrays
I do not know about old time usefulness. If it was, it was before I started using Perl, and that was at about version 5.6. Honestly, I think of this list behavior as Perl weirdness, and have no idea why...
-
Commented on Scalar Context: Lists Versus Arrays
Quite right. The only reason I can think of for not short-circuiting in scalar context is if the extra data returned in list context need to be computed anyway....
-
Posted Scalar Context: Lists Versus Arrays to Tom Wyant
For a long time after I first encountered Perl, I looked on "list" and "array" as essentially interchangeable concepts. A list was simply the source construct corresponding to an array. This idea is mostly correct. But as they say, the devil is in the details.
One of the d…
-
Commented on ERROR: 'flock' trapped by operation mask at /usr/lib64/perl5/vendor_perl/Storable.pm
perldiag says: '%s' trapped by operation mask (F) You tried to use an operator from a Safe compartment in which it's disallowed. See Safe. Perl is a compiled/interpreted language (a.k.a P-coded, a.k.a. byte coded). That is, it compiles the code...
-
Posted Announcing perlcritic Policy ValuesAndExpressions::ProhibitFiletest_rwxRWX to Tom Wyant
Since several places in the Perl documentation caution against the use of the file access operators (
-r
and friends), and since I was unable to find aPerl::Critic
policy dealing… -
Commented on Smart Match in CPAN
Thank you. The short answer is yes, the modules critiqued are most recent as of 6/24. The long answer is a little more complicated, because there are circumstances when more than one distribution can be "current." One such is when...
-
Posted Smart Match in CPAN to Tom Wyant
There is nothing like looking, if you want to find something. -- The Hobbit, iv, "Over Hill and Under Hill"
Recently on the p5p mailing list the topic of removing smart match re-surfaced. There was a fairly vigorous discussion about the effect this would have on CPAN. S…
-
Posted Annotated Perl::Critic Policy Index to Tom Wyant
In the wake of my postings on the file access tests (
-r
and friends) I wondered if there was aPerl::Critic
policy to find them. So I constructed an -
Posted My Favorite Modules: <code>File::stat</code> to Tom Wyant
File::stat
overrides the corestat()
andlstat()
functions. Instead of arrays, the new functions return an object having methods corresponding to… - Posted Core Modules: <code>filetest</code> to Tom Wyant
-
Posted The File Access Operators: To Use, or Not to Use to Tom Wyant
The file access operators are, for the purpose of this blog entry, the file test operators
-r
,-w
,-x
, -
Posted What's In That String? to Tom Wyant
One of the steps of debugging Perl can be to find out what is actually in a string. There are a number of more-or-less informative ways to do this, and I thought I would compare them.
For this I used two short strings. The first was just the concatenation of the characters whose ordinals a…
-
Posted My Favorite Modules: Time::Piece to Tom Wyant
Time::Piece
is a date/time module that replaces the built-in functionsgmtime()
and -
Posted My Favorite Modules: Errno to Tom Wyant
The
open or die
idiom is fairly ubiquitous in Perl. To be useful, the exception should say something about what went wrong:open ... or die "Open error: $!"
, for example.The …

Comment Threads
-
Deven commented on
Match Anything, Quickly
Easy mistake to make! I never noticed it until I added extra code to print the results of the matches and discovered that the subs never matched!
Your basic point still stands though -- without using
/o
when calling aqr//
regex, it is several times slower than using the anonymous subroutine... -
Aristotle commented on
On interpolating stuff into pattern matches
Yeah, this time, as I was writing a comment on your entry and it was getting longer and longer I did think that hold on, we had this conversation before. 🙂
-
Martin McGrath commented on
New feature: HTTPS support
Great stuff!
-
Neil Bowers commented on
New feature: HTTPS support
Thanks for doing this Aristotle!
-
Aristotle commented on
PSA: Changing your b.p.o password is recommended
Good point. That had been reported three separate times over the years. Unfortunately those all came in during the era when learned helplessness was the attitude toward MovableType, and the fact that there was a workaround (the one which you found on your own) didn’t help.
I’ve taken the time now to track down and fix that problem.
There is a variety of …

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.