weedom has asked for the wisdom of the Perl Monks concerning the following question:
I'm currently reviewing someone elses code, and have come across this little gem
now, I want to throw this back for a little bit more work, cos it just looks wrong. I don't like the fact that it just leaves the loop hanging in mid-air.
But I need a wee bit more ammo than simply "I don't like it". Is there anything actually "bad" about doing this? Or am I just being fussy?
UPDATE: Wow! I expected a lot more support for my way of thinking - I stand corrected, and will now go back and eat humble pie.
Thanks, Monks. Anonymous Monk, I shall pass your code on to my reviewee. :)
foreach my $enum( @$enums) { return 1 if ( $check_type eq $enum); }
now, I want to throw this back for a little bit more work, cos it just looks wrong. I don't like the fact that it just leaves the loop hanging in mid-air.
But I need a wee bit more ammo than simply "I don't like it". Is there anything actually "bad" about doing this? Or am I just being fussy?
UPDATE: Wow! I expected a lot more support for my way of thinking - I stand corrected, and will now go back and eat humble pie.
Thanks, Monks. Anonymous Monk, I shall pass your code on to my reviewee. :)
Back to
Seekers of Perl Wisdom