Don't ask to ask, just ask | |
PerlMonks |
Re: Making program readableby RichardK (Parson) |
on Oct 06, 2015 at 08:36 UTC ( [id://1143893]=note: print w/replies, xml ) | Need Help?? |
I have no OO techniques to suggest, just write clearer code. Don't repeat yourself so much. This :-
could be written as :-
It's clearer and easier to see what your intent was, and there are fewer places for bugs to hide. Variable names like $del_user1_error , $del_user2_error, .. $del_userN_error are always a sign that you should have used any array and you're writing too much code. So instead you could do something like this :-
In Section
Seekers of Perl Wisdom
|
|