• About: Random observations that may in some way be related to Perl.
  • Commented on When a failure is not a failure
    James sure has a point there. But this is also clearly a documentation bug. Why would some built-in functions have different precedence than others? perldoc even calls exist a "function"....
  • Commented on Conflict Resolution: local::lib and git's Perl
    the error comes as no surprise No? Isn't the question why your system perl doesn't have List::Utils? That module has been in core for quite some time now. It's cases like that (software package $foo relying on a working perl)...
  • Commented on And Now for Something Not Moose Releated
    How about cd $dir cat $( ls -lrt | grep ^\- | tail -1 | awk '{ print $9 }' ) | wc -l ?...
  • Posted Automatic variable highlighting in vim: the easy way to confuseAcat

  • Commented on perldoc -l for modules without pod
    mpath from Module::Path does the trick quite nicely. See also
  • Commented on Tool tip: looking at a module's source
    Neat! I immediately changed my bash function that does this and replaced "perldoc -l" with "mpath". Thank you!...
  • Posted Overheard on stackoverflow to confuseAcat

    Commenter: why did you comment out use strict;?

    OP: because i was getting errors and warnings because not all variables are defined as "my" or "our". it is for testing purposes only. I will uncomment that line later when the script works. …

  • Commented on Data::Dumper::GUI
    Weird. I tried this by dumping \%INC and this will make it segfault every time. Dumping \@INC works just fine....
  • Commented on Kegler spam
    I assume you are ranting about Jeffrey Kegler. Where is the problem? I enjoy his posts and have no idea why you consider them spam. Whether someone automates the posting-process or not is completely irrelevant for judging the contents of...
  • Commented on Pre-Modern Perl VS Post-Modern Perl: Redux
    Don't worry. My guess is that your opinions were largely ignored in that last post. Which is not to say that they should be ignored....
  • Commented on Pre-Modern Perl VS Post-Modern Perl: FIGHT!
    @David: I'm sorry, I guess I was overgeneralizing. You're right, you never said that. @rlauer: I'm sick and tired of your vicious cycles of 1) lamenting ad-hominem attacks, 2) ad-hominem attacks, and 3) weaseling out of 2). That's why I...
  • Commented on Pre-Modern Perl VS Post-Modern Perl: FIGHT!
    Paul, no, those were emphatically not good blog posts about not using Moose. Those were blogs posts that both said "I'm sick and tired of hearing about Modern Perl". Both used Moose as examples, but neither was about Moose. Now...
  • Commented on JQuery and Moose
    I don't quite get it. Is this the anti-modern-javascript post we all have been waiting for?...
  • Commented on Coping with double encoded UTF-8
    First comment! Where is $UTF8_double_encoded? And what's the purpose of if (&utf8::is_utf8)?...
  • Commented on Pre-Modern Perl VS Post-Modern Perl: FIGHT!
    Thanks Buddy! Reading the first few sentences of your post made me think "Ah, someone wrote the post I wanted to write". But it's not quite hitting the bull's eye. At least not the bull's eye I had in mind....
  • Commented on Announcing Perl::Critic::Policy::Variables::ProhibitUnusedVarsStricter
    Wow. Mithaldu is right. This is good news! But Tom isn't really wrong either: AFAIK, the old version wouldn't compile with newer versions of Perl (I forget whether this was with 5.14 or 5.16). I'm a big fan of...
  • Commented on Response to Ejecting From the Perl Core Most sysadmins have switched away from Apache a long time ago? You mean not counting the 50%+ that are still using it?...
  • Posted Modules in core: who cares? to confuseAcat


    When I first read about the idea to remove from core,…

  • Commented on Site Front Page
    Couldn't we simply tell MT to not publish posts that have a body longer than X lines?...
  • Commented on How to be agile without testing
    For me, there are two very good reasons for writing tests. I am lazy and I write web applications. Clicking myself through that up until I find the feature I'm working on just to be greeted by a stupid error...
  • Commented on Encouraging bloggers to use the 'extended' feature
    Ouch! #3 would be more than just helpful. I always thought that "Extended" was some sort of extended editor. I guess #3 is mandatory....
  • Commented on Discoverable tests and creating testing standards
    Very nice. Here's a little more vimscript, also including the GetCorresponding() function:
  • Commented on Test::Whitespaces
    I think this is nice and useful and I hope to use it soon. But: Running the test script from the synopsis using prove doesn't output anything helpful: $ prove t/Whitespace.t t/Whitespace.t .. Failed 364/406 subtests Test Summary Report -------------------...
  • Commented on [FB]izzBuzz in Perl
    It's interesting that you are going for the shortest solution. Jeff's post describes a test for hiring programmers. If I were to hire somebody, I'd put all my bets on the candidate delivering the cleanest code and I'd give lots...
  • Commented on How to use SOAP::Transport::HTTP::Plack
    Oh, sorry. To be fair, the module works very well and I'm grateful you put it on CPAN. But saying that the documentation isn't really helpful actually was quite fair. I didn't post this here to shame you, but to...
  • Posted How to use SOAP::Transport::HTTP::Plack to confuseAcat

    I needed to port a little cgi-script that implements a simple SOAP-server to Plack. After a little searching, I came across SOAP::Transport::HTTP::Plack.

    Unfortunately, t…

  • Commented on LCLOC of the month
    Thanks for the question, Hercynium! It perfectly answers Gabor's question, because the line you posted is almost exactly the line I used to replace that LCLOC....
  • Commented on LCLOC of the month
    git says that this beautiful line just popped into existence....
  • Posted LCLOC of the month to confuseAcat

    Here's the Least Comprehensible Line Of Code I came across this month. Took me a while to make sure it really did what I thought it did.

    my @array;
    # ...
    @array = map {$_;} (@array, keys %{$this->{'someobject'}->get_some_hash_ref()});


  • Commented on YAPC::Europe Day 1
    You were the perfect host for the lightning talks and nothing went wrong. So there you go....
Subscribe to feed Recent Actions from confuseAcat

  • Ether commented on When a failure is not a failure

    tobyink is correct. Consider:

    $; perl -Mwarnings -le 'exit 1 ? 2 : 3' ; echo $?
    Useless use of a constant in void context at -e line 1.
    Useless use of a constant in void context at -e line 1.

    and then:

    $; perl -Mwarnings -le 'sub foo { exit 1 ? 2 : 3} foo()' ; echo $?
    $; echo $?

    The conditional operator is no longer useless, because it provides the return value for the sub.

  • Buddy Burden commented on When a failure is not a failure

    In the question of why warnings didn't catch it, sthoenna is right, and the sub question is a red herring (the original bug wasn't in a sub anyway). That is:

    [absalom:~] perl -Mwarnings -le 'exit 1 ? 2 : 3'
    Useless use of a constant (2) in void context at -e line 1.
    Useless use of a constant (3) in void context at -e line 1.

    true, but:

    [absalom:~] perl -Mwarnings -le 'exit 1 ? 0 : 1' ; echo $?

    For some reason, using 0 and 1 is immune to the warning. I'm sure th…

  • Toby Inkster commented on When a failure is not a failure

    Perl actually has about four different things it calls an expression internally. The thing which is valid after a named unary operator is an "arithexpr"; this is the most limited form of expression, only allowing operators with precedence down to the bitshift operators.

    Next is the "termexpr", which allows anything down to assignment. After that is the "listexpr", which allows anything down to the comma.

    Lastly there is the "fullexpr", which would even accept the low-precedence boolean operators (e.g. and and or).

    In a standard function call,…

  • Ether commented on Conflict Resolution: local::lib and git's Perl

    This seems like a strange problem - e.g. I use perlbrew and local::lib extensively, and always have PERL5LIB set, but I've never had an issue with git commands.

  • preaction commented on Conflict Resolution: local::lib and git's Perl

    I suspect I only ran into it just now because I upgraded List::Util to take advantage of the new pairs features. Otherwise I've been chugging along just fine.

Subscribe to feed Responses to Comments from confuseAcat

About 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 run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.