![]() |
|
"be consistent" | |
PerlMonks |
Re: only allow certain parametersby Ovid (Cardinal) |
on Aug 09, 2002 at 22:45 UTC ( #189082=note: print w/replies, xml ) | Need Help?? |
Right off the bat, this is what I thought of:
The only real change is the removal of the unless logic. What that does is set the "balance_by" if you have a valid $entry>, else it sets it to the default "foo". However, it seems to me that you wanted a one-time setting of balance_by that could not be changed. Is that correct? In your code "foo" will only be used as a default on the first pass. So, if I understood what you wanted, my code will always set balance_by to $entry if you have a valid $entry. If it's not valid, it sets it to "foo". Cheers, Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
In Section
Seekers of Perl Wisdom
|
|