Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.
Well, that was clever.
my $_combination_info = {};
sub combination_info {
my $self = shift;
@_ and $_combination_info->{ $self->csv_file_name } = $_[0];
return $_combination_info->{ $self->csv_file_name };
}
Clever is bad. I mean TIMTOWTDI and all that, but as I'm reading through code, I hate seeing a "clever" construct that slows me down and makes me search for meaning and then bugs. It's a waste of my time.
Not Clever, Just a Style (Score:2)
Personally, I hate the style where you test something at the beginning of a statement and then do something if it's true by using
and. I much prefer usingiforunlessat the end of a statement:Huh? (Score:1)
I don’t see what’s wrong with that.
You probably won’t like the way I’d write it either:
Re: (Score:1)
givenmakes that a little less obscure to those unfamiliar with the idiom, or rather, since setting$_is the only point ofgiven, noone has to stop and think 'what's he looping over again?'Re: (Score:1)
Now it's my turn to go 'Huh?' (Score:1)
It's a copy? Why on earth? Nothing in Perl copies its parameters. Doesn't that just make the whole feature hugely less useful? It's not as though
given (my $tmp = $x) {}is that obscure, especially given its common use in conjunction withs///...Oh, and look:
Re: (Score:1)
I suppose it’s nice to be able to write
given ( $foo )in place offor ( my $copy = $foo ). But yeah, that threw me too. It’s a pity; a missed opportunity, even.The fact that you can’t use
givenas a statement modifier doesn’t bother me.