Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.
The code originally had this:
my $CurrentUser = $ENV{SUDO_USER} || getpwuid $>;
Since that should be a constant and I was adding other constants, I changed it to this:
use Readonly;
Readonly my $CURRENT_USER => $ENV{SUDO_USER} || getpwuid $>;
Do you see the bug? It's a fatal error and three people read through the code and missed it (which is really no excuse for me writing it in the first place). Fortunately, it's an easy fix.
Precedence? (Score:2)
Just looking at it, I'd guess that it's a precedence issue and you need some parens thrown in. This is what I get from B::Deparse.
So, not what I expected, but still an
Re: (Score:2)
It's a context error. Consider the first line:
That must be scalar context (in fact, the || forces the left side to be in scalar context). However, consider the new version:
We have a list, not an assignment, so we have list context. getpwuid $> in list context generates more than one value and Readonly recognizes that we're trying to use a scalar, so it dies. The fix is to fo
Re: (Score:1)
Nasty (Score:1)
This is probably one of those times to say “Perl 6 will fix that.”
(Besides providing for such as “
is ro.”)