
brian d foy
- Website: www.theperlreview.com
- About: I'm the author of Mastering Perl, and the co-author of Learning Perl (6th Edition), Intermediate Perl, Programming Perl (4th Edition) and Effective Perl Programming (2nd Edition).
Recent Actions
-
Commented on Is it still worth adding installation instructions to a distribution?
I think it's still worth it, and it's not causing problems to include it. I have this in my READMEs. You can install this module with a CPAN client, which will resolve and install the dependencies: % cpan Tie::Cycle %...
-
Commented on A Quick Update on Dancer2 2.0.0
And you just gave a talk about it: Dancer 2.0!...
-
Commented on A pipe operator exists on perl v5.42?
As for the pipe operator part of this post, the arrow is not going to do that. A proper pipe operator would feed all of the values from the left hand side to the right hand argument list. The arrow...
-
Commented on A pipe operator exists on perl v5.42?
This is just normal Perl 5 behavior, although your need v5.16 or later for CORE. Here's a demonstration that we build up in [Intermediate Perl](https://www.intermediateperl.com/) (and as a gist where I might expand this). The problem is that the arrow...
-
Commented on MCE - How to?
There's also David Farrell's Make your code run faster with Perl's secret turbo module....
-
Commented on When Laziness Isn't
Crap, this submitted when I was trying to change something. I had an `alias` example right before the `u 14` line. $ alias u="perl -le 'system q(uuidgen) for 1..$$ARGV[0]'"...
-
Commented on When Laziness Isn't
Heh, that's pretty clever to get to some number of values. However, you didn't need the reference: $ perl -le "system q(uuidgen) for 1..5" 76666A86-7155-4EBF-9ED4-F2625DE3CE55 CA1A8D82-467A-4682-8F96-FA0BE0800676 40850CBF-1A41-4803-BE9C-BD87B548826E 08DD5AB6-EBEC-40E9-B4AB-817708A0A584 8BCC70B1-4430-45C6-AF72-5A839EAE6DD5 There can even be a parameter in there: $ u 14...
-
Commented on A deep dive into the Perl type systems
Crosslink to /r/perl...
-
Commented on Wide character (U+XXXX) in substitution (s///)
Oh heck, I copied the error above the one I wanted. You can see in the (W locale) that this is a locale error: Wide character (U+%X) in %s (W locale) While in a single-byte locale (i.e., a non-UTF-8 one),...
-
Commented on Wide character (U+XXXX) in substitution (s///)
If you replace use warnings; with use diagnostics;, you get the longer error messages from perldiag: (S utf8) Perl met a wide character (ordinal >255) when it wasn't expecting one. This warning is by default on for I/O (like print)....
-
Commented on London Perl & Raku Workshop 2024: Recordings & Thoughts
Thanks for the videos! I empathize with the complexity of video, and it's why I don't do video. Changing a small mistake takes so much time compared to editing a text file. One of the YouTubers I follow did a...
-
Commented on Weather::OWM released on CPAN
+1 for weather APIs!...
-
Commented on Let's add Git userdiff defaults for Perl and Perl 6
This is over a decade later, but git now has this in core with many more patterns. See userdiff.c (which you already linked to). You still have to associate the file endings with a the perl driver as you show....
-
Commented on Why does this not work
You're trying to get a hash value, but you are using parens instead of braces. You get: he's barney (barney). he's fred (fred). Change your code to use braces for the single element access to the hash: $fn{"fred"} = "flintstone";...
-
Commented on Carp::Object, an object-oriented replacement for Carp and Carp::Clan
Very cool! And, someone remembered something I wrote almost 20 years ago. :)...
-
Commented on System Thinking
If you want to post anything to /r/perl, know that Reddit has some sort of filter on dev.to. If you message the mods we can approve the link. No idea why this is a thing, but it is in other...
-
Commented on I just discovered Dev.to
Note that Reddit filters out dev.to links that people submit, so if you have problems with that in /r/perl, contact the mods....
-
Commented on ChatGPT for Perl Learning
Reading might not be how younger generations consume info, but that's not the problem here. It has nothing to do with age or place in time. People have always looked for shortcuts and for ways to avoid learning. New technology...
-
Commented on ChatGPT for Perl Learning
I don't think we've had a hard time pumping out docs and examples. The bibliography of Perl books, including The Perl Cookbook, is long. If someone wants to learn Perl, everything they need is in some book....
-
Commented on Ordering Your Tests
Test::Manifest uses this feature to take the test order from a separate file (t/test_manifest)...
-
Commented on Assert Your Environment
This is brilliant and I must now delay everything I was going to do today to integrate it into everything. Seriously. This would have solved some problems from last week....
-
Commented on Outstanding GitHub Items
I had this problem a couple years ago. I was horrified that there were issues in my repos that I'd never seen because I thought I was good at responding to them even if I didn't have a fix. But,...
-
Commented on Scalar Context: Lists Versus Arrays
There's also the perlfaq4 answer to "What is the difference between a list and an array?" https://perldoc.perl.org/perlfaq4#What-is-the-difference-between-a-list-and-an-array?...
-
Commented on Installing wxPerl for Strawberry Perl v5.32.0, or: Future of wxPerl?
I've had this class of problem on macOS too. Raku's configure script would find a mix of tools from gcc and clang. Ah, I actually found the link: https://stackoverflow.com/questions/34781571/why-does-moarvm-complain-about-built-for-archive-which-is-not-the-architecture/35094347#35094347...
-
Commented on Proposal for Perl Foundation Memberships
What vital activities do you think TPF is funding? Conferences mostly raise their own money and TPF is a pass through. TPF is almost completely absent (or present in name only) for most things that keep working. Before you think...
-
Commented on Reimagining perl5-porters email list for 2021 and beyond
There are a few other solution issues aside from the functional aspects. If you look at p5p, a small number of people dominate conversations. It's not that they are more active, but they reply more and push their agenda more....
-
Commented on Subject Verb Object notation; declarative Perl without the framework
Generally, I try to hide all such technical details. A method can decide to do it's work any way it likes, including calling different packages. However, when you subvert all of that to make resolution specific, you now have to...
-
Commented on I failed to pause before blogging
The PAUSE code to discover which packages you use is very simple because it doesn't want to run code. It does a static search for "package IDENTIFIER". Although this won't help in your case, but that's why you sometimes see...
-
Commented on Perl dying? Well now I don't care
I have many enhancements to Pod. You don't need to add anything to the basic Pod to get what you want because you can always write your own translator to get it. I think that's a better way to go....
-
Commented on Bill & Ted's Bogus Journey
I used to do something similar, but now I pay more attention to whatever CI system I'm using. I'll print a bunch of diagnostic stuff in the setup/install phase....

Comment Threads
-
Tony Cook commented on
When Laziness Isn't
The $$ in $$ARGV[0] is being replaced when the alias is created:
tony@venus:~$ alias u="perl -le 'system q(uuidgen) for 1..$$ARGV[0]'"
tony@venus:~$ alias
alias u='perl -le '\''system q(uuidgen) for 1..95370ARGV[0]'\'''
The shell doesn't use @ here so @ARGV[0] works.The single $ARGV is replaced with nothing, so it also doesn't work:
$ alias u="perl -le 'system q(uuidgen) for 1..$ARGV[0]'"
tony@venus:~$ alias
alias u='perl -le '\''system q(uuidgen) for 1..[0]'\'''You can avoid the replacement with bash an…
-
Brett Estrade commented on
A pipe operator exists on perl v5.42?
A pipe operator would be good and totally consistent with Perl relationship with unix. You want to check out my Sub::Genius module, which allows you do this using concurrent semantics. There are other modules that do this kind of thing, but as far as I know the concurrent semantics are unique to Sub::Genius. I gave a talk on it when everyone was hiding from covid and we didn't have a Perl conference. The drawback of course is it's "plan" based and not code based like what you're suggesting. I still like it.
-
Brett Estrade commented on
A pipe operator exists on perl v5.42?
Other modules (noted in my POD at the time of writing):
Pipeworks, Sub::Pipeline, Process::Pipeline
-
6031796 commented on
Is it still worth adding installation instructions to a distribution?
Honestly, I'd keep them. They take up very little space in the grand scheme of things and if having them helps prevent one person from just manually copying files around (which still happens with alarming frequency) then they have already been worth it.
-
Aristotle commented on
Is it still worth adding installation instructions to a distribution?
I’ll take this opportunity to plug my Pod::Readme::Brief, which generates a README roughly along the lines that brian suggests. You can look at its own README for an example of its output.

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.